diff --git a/todoblue/src/app/[lang]/useCycleState.ts b/todoblue/src/app/(utils)/useCycleState.ts similarity index 75% rename from todoblue/src/app/[lang]/useCycleState.ts rename to todoblue/src/app/(utils)/useCycleState.ts index bbb6eae..6dbdc1e 100644 --- a/todoblue/src/app/[lang]/useCycleState.ts +++ b/todoblue/src/app/(utils)/useCycleState.ts @@ -1,6 +1,11 @@ import {useCallback, useMemo, useState} from "react" +/** + * **Hook** similar to {@link useState}, but which allows a value to be chosen from a cycle of items. + * + * @param items The items in the cycle. + */ export function useCycleState(items: any[]) { const [index, setIndex] = useState(0); diff --git a/todoblue/src/app/[lang]/board/[board]/useBoard.tsx b/todoblue/src/app/[lang]/board/[board]/useBoard.tsx index 12c4751..19fe675 100644 --- a/todoblue/src/app/[lang]/board/[board]/useBoard.tsx +++ b/todoblue/src/app/[lang]/board/[board]/useBoard.tsx @@ -7,7 +7,7 @@ import {useBoardTaskEditor} from "@/app/[lang]/board/[board]/useBoardTaskEditor" import {useBoardWs} from "@/app/[lang]/board/[board]/useBoardWs" import {TaskGroup, useBoardTaskArranger} from "@/app/[lang]/board/[board]/useBoardTaskArranger" import {useBoardTitleEditor} from "@/app/[lang]/board/[board]/useBoardTitleEditor" -import {useCycleState} from "@/app/[lang]/useCycleState" +import {useCycleState} from "@/app/(utils)/useCycleState" import {Dispatch, SetStateAction, useState} from "react" export interface UseBoardReturns {