Skip to content

Commit

Permalink
add claimed tab ui
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Oct 28, 2024
1 parent d0afa2b commit adb9375
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/components/pages/migrate/MigrationNamesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ import { CheckCircleSVG, Colors, DisabledSVG, PlusCircleSVG } from '@ensdomains/
import { ensAvatarConfig } from '@app/utils/query/ipfsGateway'
import { formatDurationOfDates } from '@app/utils/utils'

const icons: Record<NameListTab, any> = {
type Tab = 'eligible' | 'ineligible' | 'approved' | 'claimed'

const icons: Record<Tab, any> = {
eligible: <PlusCircleSVG />,
ineligible: <DisabledSVG />,
approved: <CheckCircleSVG />,
claimed: <CheckCircleSVG />,
}

const colors: Record<NameListTab, { fg: Colors; bg: Colors; hover: Colors }> = {
const colors: Record<Tab, { fg: Colors; bg: Colors; hover: Colors }> = {
eligible: {
fg: 'bluePrimary',
bg: 'blueSurface',
Expand All @@ -30,6 +33,11 @@ const colors: Record<NameListTab, { fg: Colors; bg: Colors; hover: Colors }> = {
bg: 'greenSurface',
hover: 'greenLight',
},
claimed: {
fg: 'greenPrimary',
bg: 'greenSurface',
hover: 'greenLight',
},
}

const Container = styled.div(
Expand Down Expand Up @@ -113,7 +121,7 @@ const NameCard = styled.div(
`,
)

const nameListTabs = ['eligible', 'ineligible', 'approved'] as const
const nameListTabs = ['eligible', 'ineligible', 'approved', 'claimed'] as const

export type NameListTab = (typeof nameListTabs)[number]

Expand Down
11 changes: 11 additions & 0 deletions src/components/pages/migrate/MigrationTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,17 @@ const ExtensionTab = ({
</Button>
<Button colorStyle="greenSecondary">{t('cta.learn-more')}</Button>
</ButtonContainer>
{/* {match({ isConnected, allNamesAreApproved })
.with({ isConnected: true, allNamesAreApproved: true }, () => (
<MigrationNamesList
names={approvedNames}
activeTab={activeTab}
setTab={setTab}
tabs={tabs}
/>
))
.with({ isConnected: false }, () => null)
.exhaustive()} */}
</Header>
</>
)
Expand Down

0 comments on commit adb9375

Please sign in to comment.