feat: appdata

This commit is contained in:
2023-11-13 16:51:29 +00:00
parent 540f29dd69
commit 24978f4e62
29 changed files with 181 additions and 136 deletions

View File

@ -181,7 +181,10 @@ export const TagsTab = (params: { tag?: string }) => {
};
const DefaultTab = () => {
const { preferences, publicKey } = useLogin();
const { preferences, publicKey } = useLogin(s => ({
preferences: s.appData.item.preferences,
publicKey: s.publicKey,
}));
const tab = publicKey ? preferences.defaultRootTab ?? `notes` : `trending/notes`;
const elm = RootTabRoutes.find(a => a.path === tab)?.element;
return elm;