Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…eb-app into fix-wallet-connect-modal-responsivity
  • Loading branch information
Jonath-z committed Aug 1, 2022
2 parents 42671b9 + 258798f commit 9c0e359
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions pages/create/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
/* eslint-disable @next/next/no-page-custom-font */
import React from "react";
import React, { useEffect, useLayoutEffect } from "react";
import CreateNftPage from "@components/CreateNftPage";
import Head from "next/head";
import { useRecoilState, useRecoilValue } from "recoil";
import { walletAddressAtom, walletAtom } from "@lib/atoms";
import { useRouter } from "next/router";

const Create = () => {
const routes = useRouter();
const { address } = useRecoilValue(walletAddressAtom);
const [isWalletsDisplayed, setIsWalletsDisplayed] =
useRecoilState(walletAtom);

useLayoutEffect(() => {
if (!address) {
routes.push("/");
setIsWalletsDisplayed(!isWalletsDisplayed);
}
}, [address]);

const create = () => {
return (
<>
<Head>
Expand All @@ -16,4 +31,4 @@ const create = () => {
);
};

export default create;
export default Create;

0 comments on commit 9c0e359

Please sign in to comment.