-
Notifications
You must be signed in to change notification settings - Fork 564
Dashboard: Migrate contract/accounts page from chakra to tailwind #7739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
graphite-app
merged 1 commit into
main
from
07-29-dashboard_migrate_contract_accounts_page_from_chakra_to_tailwind
Jul 29, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
74 changes: 35 additions & 39 deletions
74
.../src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/AccountsPage.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,47 @@ | ||
"use client"; | ||
|
||
import { ButtonGroup, Flex } from "@chakra-ui/react"; | ||
import { LinkButton } from "chakra/button"; | ||
import { Heading } from "chakra/heading"; | ||
import type { ThirdwebContract } from "thirdweb"; | ||
import { UnderlineLink } from "@/components/ui/UnderlineLink"; | ||
import type { ProjectMeta } from "../../../../../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/types"; | ||
import { AccountsCount } from "./components/accounts-count"; | ||
import { AccountsTable } from "./components/accounts-table"; | ||
import { CreateAccountButton } from "./components/create-account-button"; | ||
|
||
interface AccountsPageProps { | ||
export function AccountsPage(props: { | ||
contract: ThirdwebContract; | ||
isLoggedIn: boolean; | ||
projectMeta: ProjectMeta | undefined; | ||
} | ||
|
||
export const AccountsPage: React.FC<AccountsPageProps> = ({ | ||
contract, | ||
isLoggedIn, | ||
projectMeta, | ||
}) => { | ||
}) { | ||
return ( | ||
<Flex direction="column" gap={6}> | ||
<Flex | ||
align={{ base: "left", md: "center" }} | ||
direction={{ base: "column", md: "row" }} | ||
gap={4} | ||
justify="space-between" | ||
> | ||
<Heading size="title.sm">Accounts</Heading> | ||
<ButtonGroup | ||
flexDirection={{ base: "column", md: "row" }} | ||
gap={2} | ||
w="inherit" | ||
> | ||
<LinkButton | ||
href="https://portal.thirdweb.com/wallets/smart-wallet/get-started#3-connect-smart-wallets-in-your-application" | ||
isExternal | ||
variant="solid" | ||
> | ||
View Documentation | ||
</LinkButton> | ||
<CreateAccountButton contract={contract} isLoggedIn={isLoggedIn} /> | ||
</ButtonGroup> | ||
</Flex> | ||
<AccountsCount contract={contract} /> | ||
<AccountsTable contract={contract} projectMeta={projectMeta} /> | ||
</Flex> | ||
<div> | ||
<div className="flex flex-col md:justify-between gap-4 md:flex-row md:items-center"> | ||
<div> | ||
<h1 className="text-2xl font-semibold tracking-tight mb-1"> | ||
Accounts | ||
</h1> | ||
<p className="text-sm text-muted-foreground"> | ||
View list of smart accounts that have been created for this | ||
contract.{" "} | ||
<UnderlineLink | ||
href="https://portal.thirdweb.com/transactions/sponsor" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Learn more about gas sponsorship | ||
</UnderlineLink> | ||
</p> | ||
</div> | ||
<CreateAccountButton | ||
contract={props.contract} | ||
isLoggedIn={props.isLoggedIn} | ||
/> | ||
</div> | ||
|
||
<div className="h-5" /> | ||
|
||
<AccountsTable | ||
contract={props.contract} | ||
projectMeta={props.projectMeta} | ||
/> | ||
</div> | ||
); | ||
}; | ||
} |
23 changes: 0 additions & 23 deletions
23
...)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Review accessibility and UX of the linkBox pattern.
The current implementation uses a
before:absolute before:inset-0
pseudo-element to make the entire row clickable, but this can create accessibility issues. ThelinkBox
className and pseudo-element approach may interfere with screen readers and keyboard navigation.Consider using a more accessible approach:
🤖 Prompt for AI Agents