feat(core): add ai onboarding (#6544)

This commit is contained in:
CatsJuice
2024-04-15 07:25:30 +00:00
parent 8bb597d7ad
commit 257e946d5d
19 changed files with 485 additions and 1 deletions
@@ -0,0 +1,14 @@
import { useEffect } from 'react';
export const useBlurRoot = (blur: boolean) => {
// blur modal background, can't use css: `backdrop-filter: blur()`,
// because it won't behave as expected on client side (texts over transparent window are not blurred)
useEffect(() => {
const appDom = document.querySelector('#app') as HTMLElement;
if (!appDom) return;
appDom.style.filter = blur ? 'blur(7px)' : 'none';
return () => {
appDom.style.filter = 'none';
};
}, [blur]);
};