From dd6f099ba78adefca30159cb633a932614181175 Mon Sep 17 00:00:00 2001 From: Maxime Kubik Date: Tue, 14 Dec 2021 19:19:26 +0100 Subject: [PATCH] fix: allow user to see my-creation and my-nft pages --- pages/dashboard/my-creations.js | 10 ++-------- pages/dashboard/my-nfts.js | 8 -------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/pages/dashboard/my-creations.js b/pages/dashboard/my-creations.js index 074e0d8..d7fa915 100644 --- a/pages/dashboard/my-creations.js +++ b/pages/dashboard/my-creations.js @@ -18,9 +18,11 @@ export default function MyCreation() { const [nfts, setNfts] = useState([]) const [sold, setSold] = useState([]) const [loadingState, setLoadingState] = useState('not-loaded') + useEffect(() => { loadNFTs() }, []) + async function loadNFTs() { const web3Modal = new Web3Modal({ network: "mainnet", @@ -109,14 +111,6 @@ export const getServerSideProps = async (context) => { if (session) { // Do something... } - // Redirect the user if not logged to github - else { - - // note: we should trigger an alert if the user isn't connect - return { - redirect: { destination: '/dashboard', permanent: false } - } - } return { props: { diff --git a/pages/dashboard/my-nfts.js b/pages/dashboard/my-nfts.js index 78066c4..0c10c15 100644 --- a/pages/dashboard/my-nfts.js +++ b/pages/dashboard/my-nfts.js @@ -87,14 +87,6 @@ export const getServerSideProps = async (context) => { if (session) { // Do something... } - // Redirect the user if not logged to github - else { - - // note: we should trigger an alert if the user isn't connect - return { - redirect: { destination: '/dashboard', permanent: false } - } - } return { props: {