Skip to content

Commit

Permalink
fix: merged from main
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleySuira committed Apr 18, 2024
2 parents 7eb7fbe + f515875 commit c506396
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
5 changes: 3 additions & 2 deletions src/app/components/CreateFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ export default function CreateFrame() {
const [description, setDescription] = useState<string>("");
const [collective, setCollective] = useState<number>(0);
const [erc20Token, setErc20Token] = useState<TokenInfo | null>(null);
const [price, setPrice] = useState<string>("0.000");
const [price, setPrice] = useState<string>("0.00000");
const { exchangeRateInEth } = useGetExchangePrice(erc20Token?.coinGeckoId);

console.log(exchangeRateInEth, "exchange price");
const [frameData, setFrameData] = useState<FrameWithZoraUrl | null>(null);
const router = useRouter();

Expand Down Expand Up @@ -77,7 +78,7 @@ export default function CreateFrame() {
const handlePriceChange = (e: FormEvent<HTMLInputElement>) => {
let amount = e.currentTarget.value;

if (!amount || amount.match(/^\d{1,}(\.\d{0,4})?$/)) {
if (!amount || amount.match(/^\d{1,}(\.\d{0,10})?$/)) {
setPrice(amount);
}
};
Expand Down
22 changes: 11 additions & 11 deletions src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,23 @@ export default function Dashboard() {
});
};
return (
<div className="flex flex-col w-full md:w-4/5">
<div className=" flex flex-col w-full md:w-4/5">
{loading ? (
<div className="flex text-center justify-center text-lg">
Loading your Memes ...
</div>
) : (
<div className="flex flex-col mt-8 p-8 bg-white bg-opacity-70 rounded-[10px] text-black">
<div className="flex flex-col p-8 bg-white bg-opacity-70 rounded-[10px] text-black">
<div className="flex justify-center mt-4">
<a
href="/create-frame"
className="rounded-full mb-8 px-4 py-2 bg-purple-500 disabled:opacity-75 text-white focus:outline-none focus:ring-0"
>
Create another NFT
</a>
</div>
<div className="flex flex-col">
<div className="flex">Active Frames ({frames?.length || 0})</div>
<div className="flex">Previous NFTs ({frames?.length || 0})</div>
<div className="flex mt-4 mb-12 flex-col">
{frames.map((frame) => (
<div className="flex flex-col items-center" key={frame.id}>
Expand Down Expand Up @@ -80,14 +88,6 @@ export default function Dashboard() {
))}
</div>
</div>
<div className="flex justify-center mt-12">
<a
href="/create-frame"
className="rounded-full px-4 py-2 bg-purple-500 disabled:opacity-75 text-white focus:outline-none focus:ring-0"
>
Create another Meme NFT
</a>
</div>
</div>
)}
</div>
Expand Down

0 comments on commit c506396

Please sign in to comment.