Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
raducristianpopa committed Jun 19, 2024
1 parent 6e1d390 commit 7d31cf7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 69 deletions.
2 changes: 1 addition & 1 deletion packages/wallet/frontend/src/components/BackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const BackButton = () => {
router.back()
}}
>
<Back className="text-green h-4 w-4" />
<Back className="h-4 w-4 text-green" />
</button>
)
}
14 changes: 10 additions & 4 deletions packages/wallet/frontend/src/components/cards/AccountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const AccountCard = ({ account, idOnboarding }: AccountCardProps) => {

return (
<Link
id={idOnboarding}
id={idOnboarding}
href={`account/${account.id}`}
// prettier-ignore
className={`text-right ease-in-out transition-[box-shadow,transform,] duration-200 aspect-[5/3] rounded-lg flex flex-col p-3 border-2
Expand All @@ -50,9 +50,15 @@ export const AccountCard = ({ account, idOnboarding }: AccountCardProps) => {
}
}}
>
<span className="flex h-9 w-9 items-center justify-center rounded-md bg-[--accent] text-white dark:text-purple text-xl">{formattedAmount.symbol}</span>
<span className="leading-4 mt-auto text-[--accent] text-ellipsis whitespace-nowrap overflow-hidden">{account.name}</span>
<span className="text-[--accent] text-2xl font-semibold -tracking-wider">{formattedAmount.amount}</span>
<span className="flex h-9 w-9 items-center justify-center rounded-md bg-[--accent] text-xl text-white dark:text-purple">
{formattedAmount.symbol}
</span>
<span className="mt-auto overflow-hidden text-ellipsis whitespace-nowrap leading-4 text-[--accent]">
{account.name}
</span>
<span className="text-2xl font-semibold -tracking-wider text-[--accent]">
{formattedAmount.amount}
</span>
</Link>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const AppLayout = ({ children }: AppLayoutProps) => {
<>
<Menu />
{isUserFirstTime && <Onboarding />}
<main className="mt-[84px] md:mt-0 px-8 py-7 md:px-16 md:py-12 md:[grid-column:2/3]">
<main className="mt-[84px] px-8 py-7 md:mt-0 md:px-16 md:py-12 md:[grid-column:2/3]">
{children}
<Toaster />
<Bubbles className="fixed inset-y-0 right-0 hidden h-full lg:block" />
Expand Down
68 changes: 5 additions & 63 deletions packages/wallet/frontend/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,76 +54,18 @@ const HomePage: NextPageWithLayout<HomeProps> = ({ accounts, user }) => {
</Link>
{accounts.length > 0
? accounts.map((account) => (
<>
<AccountCard
key={account.id}
account={account}
idOnboarding={account.assetCode === 'EUR' ? 'eurAccount' : ''}
/>
<AccountCard
key={account.id}
account={account}
idOnboarding={account.assetCode === 'EUR' ? 'eurAccount' : ''}
/>
<AccountCard
key={account.id}
account={account}
idOnboarding={account.assetCode === 'EUR' ? 'eurAccount' : ''}
/>
<AccountCard
key={account.id}
account={account}
idOnboarding={account.assetCode === 'EUR' ? 'eurAccount' : ''}
/>
<AccountCard
key={account.id}
account={account}
idOnboarding={account.assetCode === 'EUR' ? 'eurAccount' : ''}
/>
<AccountCard
key={account.id}
account={account}
idOnboarding={account.assetCode === 'EUR' ? 'eurAccount' : ''}
/>
<AccountCard
key={account.id}
account={account}
idOnboarding={account.assetCode === 'EUR' ? 'eurAccount' : ''}
/>
</>
<AccountCard
key={account.id}
account={account}
idOnboarding={account.assetCode === 'EUR' ? 'eurAccount' : ''}
/>
))
: null}
</div>
</>
)
}

// <div className="mt-5 flex w-full flex-col space-y-5 md:max-w-md">
// <div className="flex items-center justify-between">
// <h3
// className="text-lg font-semibold leading-none text-green"
// id="accounts"
// >
// My Accounts
// </h3>
// </div>
// {accounts.length > 0 ? (
// <div className="grid grid-cols-2 gap-6">
// {accounts.map((account) => (
// <AccountCard
// key={account.id}
// account={account}
// idOnboarding={account.assetCode === 'EUR' ? 'eurAccount' : ''}
// />
// ))}
// </div>
// ) : (
// <div className="flex items-center justify-center p-4 text-green">
// No accounts.
// </div>
// )}
// </div>

export const getServerSideProps: GetServerSideProps<{
accounts: Account[]
user: {
Expand Down

0 comments on commit 7d31cf7

Please sign in to comment.