Add new post

add new code sandbox component
This commit is contained in:
DefectingCat
2022-08-12 11:01:18 +08:00
parent b9bc6cdef6
commit 047fc0c775
16 changed files with 520 additions and 75 deletions

12
lib/hooks/useMounted.tsx Normal file
View File

@ -0,0 +1,12 @@
import { useState, useEffect } from 'react';
const useMounted = () => {
const [mounted, setMounted] = useState(false);
useEffect(() => setMounted(true), []);
return {
mounted,
};
};
export default useMounted;