Skip to content
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

fix: tools page, improve global.css #1320

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion src/components/tools/FungibleToken/CreateTokenForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,13 @@ const CreateTokenForm: React.FC = () => {
label="Total Supply"
placeholder="e.g., 1000"
error={errors.total_supply?.message}
{...register('total_supply', { required: 'Total supply is required' })}
{...register('total_supply', {
required: 'Total supply is required',
pattern: {
value: /^[1-9][0-9]*$/,
message: 'Total supply must be a whole number',
},
})}
/>
<Input
label="Decimals"
Expand Down
8 changes: 6 additions & 2 deletions src/components/tools/FungibleToken/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ const FungibleToken = ({ tokens }: { tokens: FT[] }) => {
return (
<>
<CreateTokenForm />
<hr />
<ListToken tokens={tokens} />
{tokens.length != 0 && (
<>
<hr />
<ListToken tokens={tokens} />
</>
)}
</>
);
};
Expand Down
10 changes: 7 additions & 3 deletions src/components/tools/NonFungibleToken/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ const NonFungibleToken = ({ tokens }: { tokens: NFT[] }) => {
return (
<>
<MintNft />
<hr />
<ListToken tokens={tokens} />
<hr />
{tokens.length != 0 && (
<>
<hr />
<ListToken tokens={tokens} />
<hr />
</>
)}
<CommunityTools />
</>
);
Expand Down
1 change: 0 additions & 1 deletion src/pages/tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const ToolsPage: NextPageWithLayout = () => {

const { transactions: nfts } = useNearBlocksTxns('nft.primitives.near', 'nft_mint');
const nftsProcessed = processTransactionsToNFT(nfts);
console.log('near', { nftsProcessed, ftProcessed });

const { requestAuthentication } = useSignInRedirect();
return (
Expand Down
3 changes: 2 additions & 1 deletion src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
:root {
--gateway-page-container-padding-y: 2rem;
--gateway-page-container-padding-x: 1rem;
scrollbar-gutter: stable;
}

p,
Expand Down Expand Up @@ -75,4 +76,4 @@ w3m-modal {
right: 2px;
bottom: 10px;
}
}
}
Loading