Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
fix: allow user to see my-creation and my-nft pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mkubdev committed Dec 14, 2021
1 parent 576becc commit dd6f099
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
10 changes: 2 additions & 8 deletions pages/dashboard/my-creations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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: {
Expand Down
8 changes: 0 additions & 8 deletions pages/dashboard/my-nfts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit dd6f099

Please sign in to comment.