fix: missing empty state in /apps/installed/web3 (#6377)
* refactor: turn enum into const assertion * feat: add web3 to icon list * fix: type * fix: type cast query params and add category list * fix: conditional rendering * feat: add i18n keys * fix: type errors Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
8fc0dfb763
commit
ce9413e0dd
5 files changed
+37
-31
No files matched your search
@@ -44,13 +44,15 @@ export default function InstalledAppsLayout({
|
||||
children,
|
||||
...rest
|
||||
}: { children: React.ReactNode } & ComponentProps<typeof Shell>) {
|
||||
const variant: typeof InstalledAppVariants[number] = "payment";
|
||||
|
||||
const query = trpc.viewer.integrations.useQuery({
|
||||
variant: InstalledAppVariants.payment,
|
||||
variant,
|
||||
onlyInstalled: true,
|
||||
});
|
||||
let actualTabs = tabs;
|
||||
if (query.data?.items.length === 0) {
|
||||
actualTabs = tabs.filter((tab) => tab.name !== InstalledAppVariants.payment);
|
||||
actualTabs = tabs.filter((tab) => tab.name !== variant);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user