Add risk creation form

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Jonathan
2025-05-21 17:20:24 +02:00
committed by Sacha Al Himdani
parent 15cf471454
commit 3d4ecf5f8f
29 changed files with 1330 additions and 119 deletions

View File

@@ -1 +1,2 @@
export { usePageTitle } from "./usePageTitle";
export { useToggle } from "./useToggle";

View File

@@ -0,0 +1,7 @@
import { useCallback, useState } from "react";
export function useToggle(initialValue: boolean) {
const [value, setValue] = useState(initialValue);
const toggle = useCallback(() => setValue((prev) => !prev), []);
return [value, toggle] as const;
}