1.adjust export/import database;

This commit is contained in:
mitsuha
2022-09-02 15:59:24 +08:00
parent 8adc00a944
commit 14a3cdff41
10 changed files with 89 additions and 116 deletions
+9 -29
View File
@@ -74,41 +74,21 @@ const _useUserAndSpacesForFreeLogin = () => {
if (location.pathname.startsWith('/local')) {
navigate('/local');
} else {
navigate('/demo');
navigate(`/${BRAND_ID}`);
}
setLoading(false);
}
}, []);
useEffect(() => {
if (localTrigger) {
setUser({
photo: '',
id: BRAND_ID,
username: BRAND_ID,
nickname: BRAND_ID,
email: '',
});
} else {
if (location.pathname.startsWith('/local')) {
setUser({
photo: '',
id: 'local',
username: 'local',
nickname: 'local',
email: '',
});
} else {
setUser({
photo: '',
id: 'demo',
username: 'demo',
nickname: 'demo',
email: '',
});
}
}
}, [localTrigger, location, setLoading, setUser]);
setUser({
photo: '',
id: BRAND_ID,
username: BRAND_ID,
nickname: BRAND_ID,
email: '',
});
}, [setUser]);
const currentSpaceId: string | undefined = useMemo(() => user?.id, [user]);