Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions entrypoints/sidepanel/routes/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FetcherWithComponents, Link, useFetcher, useRouteLoaderData } from "react-router-dom";
import { Box, Button, Group, Stack, Menu, ActionIcon } from "@mantine/core";
import { Box, Button, Group, Stack, Menu, ActionIcon, Text } from "@mantine/core";
import { IconPlus, IconSettings } from "@tabler/icons-react";
import { useEffect } from "react";
import TagFilters from "../components/TagFilters";
Expand Down Expand Up @@ -57,13 +57,21 @@ export default function Home() {
<TagFilters tags={tags} filtersEnabled={filtersEnabled} searchQuery={searchQuery} fetcher={fetcher} />

<Stack align="flex-start" w="100%" gap={0}>
{accounts.map(account => (
<Box w="100%" key={account.address}>
<Link to={`/accounts/${account.address}`}>
<AccountDisplay account={account} />
</Link>
</Box>
))}
{accounts.length === 0 ? (
<Text c="dimmed" size="sm">
{searchQuery || filtersEnabled
? 'No accounts match your search or filter criteria'
: 'No accounts yet. Click "Add Account" to get started.'}
</Text>
) : (
accounts.map(account => (
<Box w="100%" key={account.address}>
<Link to={`/accounts/${account.address}`}>
<AccountDisplay account={account} />
</Link>
</Box>
))
)}
</Stack>
</Stack>
)
Expand Down