mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
feat: add single player mode
This commit is contained in:
11
packages/lib/client-only/hooks/use-is-mounted.ts
Normal file
11
packages/lib/client-only/hooks/use-is-mounted.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export const useIsMounted = () => {
|
||||
const [isMounted, setIsMounted] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsMounted(true);
|
||||
}, []);
|
||||
|
||||
return isMounted;
|
||||
};
|
||||
Reference in New Issue
Block a user