Add vendor certifications tab
Signed-off-by: Bryan Frimin <bryan@getprobo.com> Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
b94b58e2de
commit
df23fd635f
7
packages/hooks/src/useToggle.ts
Normal file
7
packages/hooks/src/useToggle.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user