Uniformize folder structure (#693)
* Uniformize folder structure * Fix icons * Fix icons * Fix tests * Fix tests
This commit is contained in:
13
front/src/hooks/useFirstMountState.ts
Normal file
13
front/src/hooks/useFirstMountState.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { useRef } from 'react';
|
||||
|
||||
export function useFirstMountState(): boolean {
|
||||
const isFirst = useRef(true);
|
||||
|
||||
if (isFirst.current) {
|
||||
isFirst.current = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return isFirst.current;
|
||||
}
|
||||
Reference in New Issue
Block a user