mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
update useInView hook
This commit is contained in:
@ -21,8 +21,7 @@ const RUACodeSandbox = ({ url }: Props) => {
|
||||
const currentTheme = theme === 'system' ? systemTheme : theme ?? 'light';
|
||||
|
||||
const { ref, inView } = useInView();
|
||||
const sandUrl = new URL(url);
|
||||
const embed = sandUrl.pathname.split('/')[2];
|
||||
const embed = new URL(url).pathname.split('/')[2];
|
||||
const [src, setSrc] = useState('');
|
||||
useEffect(() => {
|
||||
inView &&
|
||||
|
Reference in New Issue
Block a user