invite url

This commit is contained in:
archer
2023-08-20 20:35:48 +08:00
parent c20fba11ba
commit 7a231c6501
20 changed files with 345 additions and 43 deletions

View File

@@ -35,6 +35,7 @@ const queryClient = new QueryClient({
function App({ Component, pageProps }: AppProps) {
const router = useRouter();
const { hiId } = router.query as { hiId?: string };
const { i18n } = useTranslation();
const [scripts, setScripts] = useState<FeConfigsType['scripts']>([]);
@@ -50,6 +51,10 @@ function App({ Component, pageProps }: AppProps) {
})();
}, []);
useEffect(() => {
hiId && localStorage.setItem('inviterId', hiId);
}, [hiId]);
useEffect(() => {
const lang = getLangStore() || 'zh';
i18n?.changeLanguage?.(lang);