Skip to content

Commit

Permalink
fix some caching and login state
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed Apr 9, 2024
1 parent bc4fc76 commit d0aedcf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
37 changes: 19 additions & 18 deletions packages/client/src/components/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function UserMenu({
disableAppSettings,
children,
}: UserMenuProps) {
const isLoggedIn = useIsLoggedIn();
const [isLoggedIn] = useIsLoggedIn();
const isOffline = useIsOffline();
const appId = useAppId();

Expand Down Expand Up @@ -62,23 +62,7 @@ export function UserMenu({
Offline - some features may be unavailable
</div>
)}
{getIsPWAInstalled() ? (
<DropdownMenuItem onClick={openPwaHackCatalog}>
More apps
<DropdownMenuItemRightSlot>
<Icon name="new_window" />
</DropdownMenuItemRightSlot>
</DropdownMenuItem>
) : (
<DropdownMenuItem asChild>
<a href={`${CONFIG.HOME_ORIGIN}/apps`} target="_blank">
More apps
<DropdownMenuItemRightSlot>
<Icon name="new_window" />
</DropdownMenuItemRightSlot>
</a>
</DropdownMenuItem>
)}

{!isLoggedIn ? (
<DropdownMenuItem
asChild
Expand All @@ -101,6 +85,23 @@ export function UserMenu({
</a>
</DropdownMenuItem>
)}
{getIsPWAInstalled() ? (
<DropdownMenuItem onClick={openPwaHackCatalog}>
More apps
<DropdownMenuItemRightSlot>
<Icon name="new_window" />
</DropdownMenuItemRightSlot>
</DropdownMenuItem>
) : (
<DropdownMenuItem asChild>
<a href={`${CONFIG.HOME_ORIGIN}/apps`} target="_blank">
More apps
<DropdownMenuItemRightSlot>
<Icon name="new_window" />
</DropdownMenuItemRightSlot>
</a>
</DropdownMenuItem>
)}
{!disableAppSettings && (
<DropdownMenuItem asChild>
<a href={`/settings`}>
Expand Down
2 changes: 2 additions & 0 deletions web/src/components/storage/VerdantLibraries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const libraryData = graphql(
`
query VerdantLibraryData($appId: String!) {
plan {
id
libraryInfo(app: $appId) {
...LibraryFragment
}
Expand All @@ -48,6 +49,7 @@ const resetSync = graphql(
mutation ResetSync($appId: String!) {
resetSync(app: $appId) {
plan {
id
libraryInfo(app: $appId) {
...LibraryFragment
}
Expand Down

0 comments on commit d0aedcf

Please sign in to comment.