Skip to content

Commit

Permalink
Add skeleton loader when loading networks + Resize abi ninja logo (#108)
Browse files Browse the repository at this point in the history
* fix: add skeleton when loading networks

* Add bg-neutral to NetworksDropdown skeleton

* Fix abi ninja logo width and height

---------

Co-authored-by: port <[email protected]>
  • Loading branch information
ByteAtATime and portdeveloper authored Jun 18, 2024
1 parent 4334a48 commit baeec4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/nextjs/components/NetworksDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const NetworksDropdown = ({ onChange }: { onChange: (options: any) => any
}
}, []);

if (!mounted) return null;
if (!mounted) return <div className="skeleton bg-neutral max-w-xs w-44 relative h-[38px]" />;
return (
<Select
defaultValue={groupedOptions["mainnet"].options[0]}
Expand Down
4 changes: 1 addition & 3 deletions packages/nextjs/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,21 +175,19 @@ const Home: NextPage = () => {
>
{tabValue === TabName.verifiedContract ? (
<div className="my-16 flex flex-col items-center justify-center">
<Image src="/logo_inv.svg" alt="logo" width={128} height={128} className="mb-4" />
<Image src="/logo_inv.svg" alt="logo" width={119} height={87} className="mb-4" />{" "}
<h2 className="mb-0 text-5xl font-bold">ABI Ninja</h2>
<p>Interact with any contract on Ethereum</p>
<div className="mt-4">
<NetworksDropdown onChange={option => setNetwork(option ? option.value.toString() : "")} />
</div>

<div className="w-10/12 my-8">
<AddressInput
placeholder="Contract address"
value={verifiedContractAddress}
onChange={setVerifiedContractAddress}
/>
</div>

<button
className="btn btn-primary min-h-fit h-10 px-4 text-base font-semibold border-2 hover:bg-neutral hover:text-primary"
onClick={handleLoadContract}
Expand Down

0 comments on commit baeec4e

Please sign in to comment.