From a035bea0de96ce58f02c3900889ecfc1232257df Mon Sep 17 00:00:00 2001 From: "ghalielouarzazi@hotmail.com" Date: Thu, 4 Nov 2021 23:36:20 +0100 Subject: [PATCH 001/199] nfts api refactor --- actions/follower.ts | 44 ++++++++++++++++++++++---------------------- actions/nft.ts | 39 +++++++++++++++++++++++++++++++-------- actions/user.ts | 13 ++----------- pages/profile.tsx | 2 +- 4 files changed, 56 insertions(+), 42 deletions(-) diff --git a/actions/follower.ts b/actions/follower.ts index 8a880bfe..14d43251 100644 --- a/actions/follower.ts +++ b/actions/follower.ts @@ -19,6 +19,28 @@ export const getFollowed = async (walletId: string, page: string="1", limit: str return result; }; +export const getFollowersCount = async (walletId: string) => { + const res = await fetch(`${NODE_API_URL}/api/follow/countFollowers/${walletId}`); + if (!res.ok) throw new Error(); + let result = await res.json() as number; + return result; +}; + +export const getFollowedCount = async (walletId: string) => { + const res = await fetch(`${NODE_API_URL}/api/follow/countFollowed/${walletId}`); + if (!res.ok) throw new Error(); + let result = await res.json() as number; + return result; +}; + +export const isUserFollowing = async (walletIdFollowed: string, walletIdFollower: string) => { + const queryString = `?walletIdFollowed=${walletIdFollowed}&walletIdFollower=${walletIdFollower}` + const res = await fetch(`${NODE_API_URL}/api/follow/isUserFollowing/${queryString}`); + if (!res.ok) throw new Error(); + let data: {isFollowing: boolean} = await res.json(); + return data; +}; + export const follow = async (walletIdFollowed: string, walletIdFollower: string) => { const cookie = Cookies.get("token") const queryString = `?walletIdFollowed=${walletIdFollowed}&walletIdFollower=${walletIdFollower}` @@ -49,26 +71,4 @@ export const unfollow = async (walletIdFollowed: string, walletIdFollower: strin }else{ throw new Error("Unvalid authentication"); } -}; - -export const isUserFollowing = async (walletIdFollowed: string, walletIdFollower: string) => { - const queryString = `?walletIdFollowed=${walletIdFollowed}&walletIdFollower=${walletIdFollower}` - const res = await fetch(`${NODE_API_URL}/api/follow/isUserFollowing/${queryString}`); - if (!res.ok) throw new Error(); - let data: {isFollowing: boolean} = await res.json(); - return data; -}; - -export const getFollowersCount = async (walletId: string) => { - const res = await fetch(`${NODE_API_URL}/api/follow/countFollowers/${walletId}`); - if (!res.ok) throw new Error(); - let result = await res.json() as number; - return result; -}; - -export const getFollowedCount = async (walletId: string) => { - const res = await fetch(`${NODE_API_URL}/api/follow/countFollowed/${walletId}`); - if (!res.ok) throw new Error(); - let result = await res.json() as number; - return result; }; \ No newline at end of file diff --git a/actions/nft.ts b/actions/nft.ts index 1c7cd70d..f42868a8 100644 --- a/actions/nft.ts +++ b/actions/nft.ts @@ -6,7 +6,11 @@ import { DEFAULT_LIMIT_PAGINATION } from "../utils/constant"; export const filterNFTs = (data: NftType[]) => data.filter((item) => item.creatorData && item.ownerData && item.media && envStringToCondition(Number(item.id))) export const getOwnedNFTS = async (id: string, onlyFromMpId: boolean, listed? :number, page: string="1", limit: string=DEFAULT_LIMIT_PAGINATION, noSeriesData: boolean = false) => { - const res = await fetch(`${NODE_API_URL}/api/NFTs/owner/${id}?page=${page}&limit=${limit}${listed!==undefined ? `&listed=${listed}` : ""}${onlyFromMpId ? `&marketplaceId=${MARKETPLACE_ID}` : ""}&noSeriesData=${noSeriesData}`); + const paginationOptions = {page, limit} + const filterOptions: any = {owner: id, noSeriesData} + if (listed) filterOptions.listed = listed + if (onlyFromMpId) filterOptions.marketplaceId = MARKETPLACE_ID + const res = await fetch(`${NODE_API_URL}/api/NFTs/?pagination=${JSON.stringify(paginationOptions)}&filter=${JSON.stringify(filterOptions)}`); if (!res.ok) throw new Error('error fetching owned NFTs'); let result: CustomResponse = await res.json(); result.data = filterNFTs(result.data) @@ -14,8 +18,10 @@ export const getOwnedNFTS = async (id: string, onlyFromMpId: boolean, listed? :n }; export const getCreatorNFTS = async (id: string, page: string="1", limit: string=DEFAULT_LIMIT_PAGINATION, noSeriesData: boolean = false) => { + const paginationOptions = {page, limit} + const filterOptions: any = {creator: id, noSeriesData} const res = await fetch( - `${NODE_API_URL}/api/NFTs/creator/${id}?page=${page}&limit=${limit}&noSeriesData=${noSeriesData}` + `${NODE_API_URL}/api/NFTs/?pagination=${JSON.stringify(paginationOptions)}&filter=${JSON.stringify(filterOptions)}` ); if (!res.ok) throw new Error('error fetching created NFTs'); let result: CustomResponse = await res.json(); @@ -23,10 +29,12 @@ export const getCreatorNFTS = async (id: string, page: string="1", limit: string return result; }; -export const getCategoryNFTs = async (codes?: string | string[], page: string="1", limit: string=DEFAULT_LIMIT_PAGINATION, noSeriesData: boolean = false) => { - const queryString = !codes ? "" : (typeof codes==='string' ? `&codes=${codes}` : `&codes=${codes.join("&codes=")}`) +export const getCategoryNFTs = async (codes?: string[], page: string="1", limit: string=DEFAULT_LIMIT_PAGINATION, noSeriesData: boolean = false) => { + const paginationOptions = {page, limit} + const filterOptions: any = {noSeriesData, marketplaceId: MARKETPLACE_ID} + if (codes) filterOptions.categories = codes const res = await fetch( - `${NODE_API_URL}/api/NFTs/category/?marketplaceId=${MARKETPLACE_ID}&listed=1&page=${page}&limit=${limit}&noSeriesData=${noSeriesData}${queryString}` + `${NODE_API_URL}/api/NFTs/?pagination=${JSON.stringify(paginationOptions)}&filter=${JSON.stringify(filterOptions)}` ); if (!res.ok) throw new Error('error fetching NFTs by categories'); let result: CustomResponse = await res.json(); @@ -35,13 +43,26 @@ export const getCategoryNFTs = async (codes?: string | string[], page: string="1 }; export const getNFT = async (id: string, incViews: boolean = false, viewerWalletId: string | null = null, ip?: string, noSeriesData: boolean = false, marketplaceId?: string) => { - const res = await fetch(`${NODE_API_URL}/api/NFTs/${id}?incViews=${incViews}&viewerWalletId=${viewerWalletId}&viewerIp=${ip}&noSeriesData=${noSeriesData}${marketplaceId ? `&marketplaceId=${marketplaceId}` : ""}`); + const filterOptions: any = {noSeriesData, marketplaceId} + const res = await fetch(`${NODE_API_URL}/api/NFTs/${id}?filter=${JSON.stringify(filterOptions)}&incViews=${incViews}&viewerWalletId=${viewerWalletId}&viewerIp=${ip}`); if (!res.ok) throw new Error('error fetching NFT'); let data: NftType = await res.json(); if (!data.creatorData || !data.ownerData || !data.media) throw new Error(); return data; }; +export const getLikedNFTs = async (walletId: string, page: string="1", limit: string=DEFAULT_LIMIT_PAGINATION, noSeriesData: boolean = false) => { + const paginationOptions = {page, limit} + const filterOptions: any = {liked: walletId, noSeriesData} + const res = await fetch( + `${NODE_API_URL}/api/NFTs/?pagination=${JSON.stringify(paginationOptions)}&filter=${JSON.stringify(filterOptions)}` + ); + if (!res.ok) throw new Error(); + let result: CustomResponse = await res.json(); + result.data = filterNFTs(result.data) + return result; +} + export const getUserNFTsStat = async (id: string, onlyFromMpId: boolean): Promise<{ countOwned: number, countOwnedListed: number, @@ -50,8 +71,10 @@ export const getUserNFTsStat = async (id: string, onlyFromMpId: boolean): Promis countFollowers: number, countFollowed: number }> => { - const res = await fetch(`${NODE_API_URL}/api/NFTs/stat/${id}${onlyFromMpId ? `?marketplaceId=${MARKETPLACE_ID}` : ""}`); + const filterOptions: any = {} + if (onlyFromMpId) filterOptions.marketplaceId = MARKETPLACE_ID + const res = await fetch(`${NODE_API_URL}/api/NFTs/stat/${id}?filter=${JSON.stringify(filterOptions)}`); if (!res.ok) throw new Error('error fetching user NFTs stat'); let result = await res.json() return result; -}; \ No newline at end of file +}; diff --git a/actions/user.ts b/actions/user.ts index dc381a10..fb2273df 100644 --- a/actions/user.ts +++ b/actions/user.ts @@ -1,6 +1,5 @@ -import { CustomResponse, NftType, UserType } from 'interfaces/index'; -import { filterNFTs } from "./nft"; -import { DEFAULT_LIMIT_PAGINATION, NODE_API_URL } from "../utils/constant"; +import { CustomResponse, UserType } from 'interfaces/index'; +import { NODE_API_URL } from "../utils/constant"; import Cookies from 'js-cookie'; export const getUser = async (token: string) => { @@ -103,11 +102,3 @@ export const unlikeNFT = async (walletId: string, nftId: string, serieId: string throw new Error("Unvalid authentication"); } } - -export const getLikedNFTs = async (walletId: string, page: string="1", limit: string=DEFAULT_LIMIT_PAGINATION, noSeriesData: boolean = false) => { - const res = await fetch(`${NODE_API_URL}/api/users/${walletId}/liked?page=${page}&limit=${limit}&noSeriesData=${noSeriesData}`) - if (!res.ok) throw new Error(); - let result: CustomResponse = await res.json(); - result.data = filterNFTs(result.data) - return result; -} \ No newline at end of file diff --git a/pages/profile.tsx b/pages/profile.tsx index f7cd1246..e131bf2a 100644 --- a/pages/profile.tsx +++ b/pages/profile.tsx @@ -10,7 +10,7 @@ import cookies from 'next-cookies'; import { getUser } from 'actions/user'; import { getOwnedNFTS, getCreatorNFTS } from 'actions/nft'; import { getFollowers, getFollowed } from 'actions/follower'; -import { getLikedNFTs } from 'actions/user'; +import { getLikedNFTs } from 'actions/nft'; import { NftType, UserType } from 'interfaces'; import { NextPageContext } from 'next'; import { decryptCookie } from 'utils/cookie'; From 463301e771c11c7f62f687e689df9aa37dc7aad4 Mon Sep 17 00:00:00 2001 From: "ghalielouarzazi@hotmail.com" Date: Fri, 5 Nov 2021 12:45:11 +0100 Subject: [PATCH 002/199] refactor followers route and add getCategories route --- actions/follower.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/actions/follower.ts b/actions/follower.ts index 14d43251..218901da 100644 --- a/actions/follower.ts +++ b/actions/follower.ts @@ -4,16 +4,22 @@ import { DEFAULT_LIMIT_PAGINATION } from "../utils/constant"; import Cookies from 'js-cookie'; export const getFollowers = async (walletId: string, page: string="1", limit: string=DEFAULT_LIMIT_PAGINATION, searchText?: string, certifiedOnly?: string) => { - const query = `${searchText ? `&nameOrAddressSearch=${searchText}`: ""}${certifiedOnly ? `&certifiedOnly=${certifiedOnly}` : ""}` - const res = await fetch(`${NODE_API_URL}/api/follow/followers/${walletId}?page=${page}&limit=${limit}${query}`); + const pagination = {page, limit} + const filter: any = {} + if (searchText) filter.searchText = searchText + if (searchText) filter.certifiedOnly = certifiedOnly + const res = await fetch(`${NODE_API_URL}/api/follow/followers/${walletId}?pagination=${JSON.stringify(pagination)}&filter=${JSON.stringify(filter)}`); if (!res.ok) throw new Error(); let result = await res.json() as CustomResponse; return result; }; export const getFollowed = async (walletId: string, page: string="1", limit: string=DEFAULT_LIMIT_PAGINATION, searchText?: string, certifiedOnly?: string) => { - const query = `${searchText ? `&nameOrAddressSearch=${searchText}`: ""}${certifiedOnly ? `&certifiedOnly=${certifiedOnly}` : ""}` - const res = await fetch(`${NODE_API_URL}/api/follow/followed/${walletId}?page=${page}&limit=${limit}${query}`); + const pagination = {page, limit} + const filter: any = {} + if (searchText) filter.searchText = searchText + if (searchText) filter.certifiedOnly = certifiedOnly + const res = await fetch(`${NODE_API_URL}/api/follow/followed/${walletId}?pagination=${JSON.stringify(pagination)}&filter=${JSON.stringify(filter)}`); if (!res.ok) throw new Error(); let result = await res.json() as CustomResponse; return result; From 69b98f74cacd189b06778f82488cb5fb4a61bef9 Mon Sep 17 00:00:00 2001 From: "ghalielouarzazi@hotmail.com" Date: Fri, 5 Nov 2021 12:57:15 +0100 Subject: [PATCH 003/199] add get categories action and decrease timeout for follower search --- actions/category.ts | 11 +++++++++++ components/pages/Profile/Profile.tsx | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 actions/category.ts diff --git a/actions/category.ts b/actions/category.ts new file mode 100644 index 00000000..8bbf3fea --- /dev/null +++ b/actions/category.ts @@ -0,0 +1,11 @@ +import { CategoryType } from "interfaces"; +import { NODE_API_URL } from "utils/constant"; + +export const getCategories = async (codes?: string[]) => { + const filter: any = {} + if (codes) filter.codes = codes + const res = await fetch(`${NODE_API_URL}/api/categories/?filter=${JSON.stringify(filter)}`); + if (!res.ok) throw new Error(); + let result = await res.json() as CategoryType[]; + return result; +}; \ No newline at end of file diff --git a/components/pages/Profile/Profile.tsx b/components/pages/Profile/Profile.tsx index 77ab9414..b1da85d7 100644 --- a/components/pages/Profile/Profile.tsx +++ b/components/pages/Profile/Profile.tsx @@ -221,7 +221,7 @@ const Profile: React.FC = ({ const timer = setTimeout(() => { loadMoreFollowers(true) loadMoreFollowed(true) - }, 1500) + }, 1000) return () => clearTimeout(timer) }, [searchValue, isFiltered]) From 5f1b3ac3f6f70458e9079cee24b2199c11a835e3 Mon Sep 17 00:00:00 2001 From: Igor Papandinas Date: Tue, 2 Nov 2021 14:55:26 +0100 Subject: [PATCH 004/199] task: Root font-size set in order to use rem unit --- style/base.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/style/base.scss b/style/base.scss index 5c56616a..0a25db93 100644 --- a/style/base.scss +++ b/style/base.scss @@ -1,3 +1,7 @@ +html { + font-size:62.5% +} + body { padding: 0px; margin: 0px; From 3bc6714ac7d3899450e5bf6f0464dfaec882e9a6 Mon Sep 17 00:00:00 2001 From: Igor Papandinas Date: Tue, 2 Nov 2021 17:08:36 +0100 Subject: [PATCH 005/199] =?UTF-8?q?feat:=20Integration=20of=20the=20new=20?= =?UTF-8?q?=E2=80=98Create=20NFT=E2=80=99=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pages/Create/Create.module.scss | 162 ++++----- components/pages/Create/Create.tsx | 400 ++++++++++----------- 2 files changed, 268 insertions(+), 294 deletions(-) diff --git a/components/pages/Create/Create.module.scss b/components/pages/Create/Create.module.scss index 278bd442..8b1766ac 100644 --- a/components/pages/Create/Create.module.scss +++ b/components/pages/Create/Create.module.scss @@ -10,101 +10,106 @@ .Wrapper { margin-left: auto; margin-right: auto; - width: 1100px; + width: 110rem; display: flex; flex-direction: column; box-sizing: border-box; - padding: 70px 24px; + padding: 9.6rem 2.4rem; } .Title { font-family: "Airbnb Cereal App Bold"; - font-size: 42px; - line-height: 48px; - margin: 0px; - margin-top: 18px; - margin-bottom: 14px; + font-size: 6.4rem; + line-height: 1.3; + margin: 0; } -.InnerContainer { - background: #ffffff; - box-shadow: 0px 0px 11px 2px rgba(0, 0, 0, 0.05); - border-radius: 27px; - width: 100%; - padding: 40px 60px; - box-sizing: border-box; - margin-top: 32px; - display: flex; - flex-direction: column; -} - -.Top { +.Subtitle { display: flex; - justify-content: space-between; align-items: center; - margin-bottom: 24px; -} - -.TopInf { - font-size: 18px; - line-height: 26px; font-family: "Airbnb Cereal App Medium"; - display: flex; - justify-content: center; - align-items: center; + font-size: 2rem; + line-height: 1.3; + margin-top: 4rem; } .EyeSVG { - width: 24px; - margin-right: 10px; + width: 2.4rem; + margin-right: 1rem; fill: black; } +.NFTPreview { + width: 100%; + height: 32rem; + display: flex; + position: relative; + border-radius: 1.6rem; + box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); + box-sizing: border-box; + cursor: pointer; + margin-top: 5.4rem; +} + .Data { display: flex; width: 100%; + margin-top: 12rem; + + >* { + box-sizing: border-box; + display: flex; + flex: 1; + flex-direction: column; + + > :first-child { + margin-top: 0; + } + + } } .Left { - display: flex; - flex-direction: column; - box-sizing: border-box; - margin-right: 70px; - position: relative; + border-right: 1px solid #E0E0E0; + padding-right: 13.6rem; } .Right { - display: flex; - flex-direction: column; - width: 350px; - box-sizing: border-box; + padding-left: 13.6rem; } -.Subtitle { - font-family: "Airbnb Cereal App Bold"; - font-size: 16px; - line-height: 20px; - margin: 0px; - margin-bottom: 8px; -} .InputShell { display: flex; flex-direction: column; width: 100%; - margin-bottom: 24px; + margin-top: 6.4rem; + + &Description { + flex: 1; + } +} + +.InputLabel { + font-family: "Airbnb Cereal App Bold"; + font-size: 2rem; + line-height: 1.3; + margin: 0; } .Input { width: 100%; - background: #ffffff; - border: 1px solid #e1e1e1; + background: #F7F7F7; + border: 0.2rem solid rgba(0, 0, 0, 0); + border-radius: 0.8rem; font-family: "Airbnb Cereal App Book"; - box-sizing: border-box; - border-radius: 7px; + font-size: 1.6rem; + margin-top: 1.6rem; outline: none; - width: 100%; padding: 14px 16px; - font-size: 15px; + + &:focus { + border: 0.2rem solid #7417EA; + } } .Input::placeholder { @@ -116,17 +121,8 @@ } .Textarea { - font-size: 15px; - width: 100%; - background: #ffffff; - border: 1px solid #e1e1e1; resize: none; - border-radius: 7px; - height: 100px; - font-family: "Airbnb Cereal App Book"; - padding: 12px; - outline: none; - box-sizing: border-box; + flex: 1; } .Textarea::placeholder { @@ -142,17 +138,6 @@ color: #c1c1c1; } -.NFTPreview { - width: 278px; - height: 458px; - border-radius: 27px; - display: flex; - box-sizing: border-box; - position: relative; - box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); - cursor: pointer; -} - .NFTSPreview { width: 190px; height: 320px; @@ -196,6 +181,7 @@ cursor: pointer; display: none; } + .HiddenInput { width: 100%; height: 100%; @@ -226,6 +212,7 @@ height: 100%; border-radius: 27px; } + .WaterMarkSVG { width: 160px; position: absolute; @@ -329,20 +316,27 @@ margin-left: 24px; } +.Advice { + color: #7417EA; + font-family: "Airbnb Cereal App"; + font-size: 1.6rem; + line-height: 0.8; + margin: 7.2rem auto 0; +} + .Create { display: flex; justify-content: center; align-items: center; + align-self: center; background: $primary; - color: white; - padding: 14px 40px; - border-radius: 40px; - cursor: pointer; + border: none; + border-radius: 4rem; color: white; font-family: "Airbnb Cereal App Bold"; font-size: 13px; - align-self: center; - margin-top: 56px; + margin-top: 2.4rem; + padding: 0.8rem 2rem; transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); z-index: 1; @@ -456,6 +450,7 @@ justify-content: center; align-items: center; } + .InnerContainer { width: 100%; padding: 24px 24px; @@ -516,6 +511,7 @@ .Subtitle { font-size: 14px; } + .NFTPreview { width: 250px; height: 430px; @@ -533,4 +529,4 @@ .UploadSVG2 { width: 30px; } -} +} \ No newline at end of file diff --git a/components/pages/Create/Create.tsx b/components/pages/Create/Create.tsx index 8fead40b..f49ae680 100644 --- a/components/pages/Create/Create.tsx +++ b/components/pages/Create/Create.tsx @@ -1,9 +1,7 @@ import React, { useEffect, useState } from 'react'; -import Link from 'next/link'; import style from './Create.module.scss'; import Footer from 'components/base/Footer'; import FloatingHeader from 'components/base/FloatingHeader'; -import ArrowBottom from 'components/assets/arrowBottom'; import Upload from 'components/assets/upload'; import WhiteWaterMark from 'components/assets/WhiteWaterMark'; import Eye from 'components/assets/eye'; @@ -47,22 +45,28 @@ const Create: React.FC = ({ setError, setProcessed, }) => { - const [exp, setExp] = useState(false); const [nftData, setNFTData] = useState(initalValue); const { name, description, quantity } = nftData; - const [isRN, setIsRN] = useState(false) - const [acceptedFileTypes, setAcceptedFileTypes] = useState([".jpg", ".jpeg", ".png", ".gif", ".mp4", ".mov"]) + const [isRN, setIsRN] = useState(false); + const [acceptedFileTypes, setAcceptedFileTypes] = useState([ + '.jpg', + '.jpeg', + '.png', + '.gif', + '.mp4', + '.mov', + ]); useEffect(() => { setIsRN(window.isRNApp); }, []); useEffect(() => { - if (isRN){ - setAcceptedFileTypes([".jpg", ".jpeg", ".png", ".gif"]) + if (isRN) { + setAcceptedFileTypes(['.jpg', '.jpeg', '.png', '.gif']); } - }, [isRN]) - + }, [isRN]); + const validateQuantity = (value: number, limit: number) => { return value && value > 0 && value <= limit; }; @@ -117,33 +121,44 @@ const Create: React.FC = ({ ) => { const { target } = event; let file = null; - let isError = false + let isError = false; if (!(target && target.files && target.files[0])) { setFunction(file); setSelect('Select NFT Option'); return; } - if (!isError && isRN && target.files[0]!.type.substr(0, 5) === 'video'){ + if (!isError && isRN && target.files[0]!.type.substr(0, 5) === 'video') { setError("You can't select video type on mobile DApp yet."); - isError = true + isError = true; } - if (!isError && !(target.files[0]!.type.substr(0, 5) === 'video' || target.files[0]!.type.substr(0, 5) === 'image')){ - setError(`You can't select files different from ${!isRN ? "videos or " : ""}images.`); - isError = true + if ( + !isError && + !( + target.files[0]!.type.substr(0, 5) === 'video' || + target.files[0]!.type.substr(0, 5) === 'image' + ) + ) { + setError( + `You can't select files different from ${ + !isRN ? 'videos or ' : '' + }images.` + ); + isError = true; } if (!isError && target.files[0].size > 31000000) { setError('Max file size is 30mb.'); - isError = true + isError = true; } if ( - (target.files[0]!.type.substr(0, 5) === 'video' || target.files[0]!.type === 'image/gif') && + (target.files[0]!.type.substr(0, 5) === 'video' || + target.files[0]!.type === 'image/gif') && (select === 'Blur' || select === 'Protect') ) { setSelect('Select NFT Option'); } - if (!isError){ + if (!isError) { file = target.files[0]; - }else{ + } else { setModalCreate(true); setSelect('Select NFT Option'); } @@ -176,217 +191,180 @@ const Create: React.FC = ({ setModalCreate(true); } - function checkType() { - if ( - secretNFT!.type.substr(0, 5) === 'video' || - secretNFT!.type === 'image/gif' - ) - return false; - else return true; - } return (

Create NFT

-
-
- - - NFT Preview - + + + NFT Preview + +