diff --git a/models/common/shortenUuid.ts b/models/common/shortenUuid.ts new file mode 100644 index 0000000..c9c0570 --- /dev/null +++ b/models/common/shortenUuid.ts @@ -0,0 +1,3 @@ +export default function shortenUuid(uuid: string): string { + return uuid.slice(0, 4); +} diff --git a/pages/_app.tsx b/pages/_app.tsx index 4ff1578..3114244 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -17,7 +17,7 @@ const theme = createTheme({ }, }, typography: { - fontFamily: ['Product Sans'].join(','), + fontFamily: ['Lexend'].join(','), h1: { fontSize: '3rem', fontWeight: 500, diff --git a/pages/index.tsx b/pages/index.tsx index 165332d..071fbdf 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -29,10 +29,6 @@ const Home: NextPage = () => { -
diff --git a/pages/wallets/[walletid].tsx b/pages/wallets/[walletid].tsx index 6a62b26..ab7918c 100644 --- a/pages/wallets/[walletid].tsx +++ b/pages/wallets/[walletid].tsx @@ -5,6 +5,7 @@ import { useEffect, useState } from 'react'; import { faker } from '@faker-js/faker'; import { Wallet } from '../../models/entities/Wallet'; import formatWalletName from '../../models/wallet/formatWalletName'; +import shortenUuid from '../../models/common/shortenUuid'; import { Token } from '../../models/entities/Token'; import useTransferWizard from '../../models/transfer/useTransferWizard'; @@ -23,18 +24,12 @@ export default function Wallet() { } else { const wallet = { id: faker.datatype.uuid(), - name: faker.internet.userName(), + name: 'wallet2', balance: faker.datatype.number({ min: 1000, max: 100000 }), createdAt: faker.date.past(), logo: faker.image.url(), }; setCurrentWallet(wallet); - const token = { - id: faker.datatype.uuid(), - walletId: wallet.id, - createdAt: faker.date.past(), - }; - setChosenToken(token); } } @@ -51,6 +46,8 @@ export default function Wallet() { }); }, [currentWallet, chosenToken]); + const title = (chosenToken && ('Token #' + shortenUuid(chosenToken.id))) || (currentWallet && formatWalletName(currentWallet)) || ''; + return (