Enter the URL of the YouTube video to download subtitles in many different formats and languages.
I want to congratulate you that you have
taken the first step to become a pro web
3.0 developer and this you're going to
build a stunning application with all
the functionality and the best part of
this application is going to be that
everything you can see in this
application all the functionality that's
going to be controlled by the smart
contract so this project will give you a
tons of learning and it's going to be a
very great addition in your resume if
you want to start your career in web 3.0
because in this project we're going to
cover almost every single technology
which is out there utilizing blockchain
like how you can do the testing of the
smart contract how to use hard hat how
to use react.js next year modern
technology as a front-end to build
application like this we also learn
about the powerful packages like open
Zeppelin for building the smart contract
building all the logic for fetching the
data and doing the API request through
the access API so tons of things are
coming in this project and this project
is pretty huge it will take you to 22
hours to complete this entire project
every single thing in detail and we have
divided that entire application in small
small components so you can focus in one
thing at a time so this is how we're
going to complete this project first
we're going to Smart contract and the
applications include 16 plus Pages after
that we're going to build this third
part we're going to connect the smart
contract and find an application
together so tons of things you will
learn in this pretty huge course so hope
you will enjoy and learn a lot of this
because it took me almost one and a half
months to complete this huge project I
hope this project will help you to
become a web 3.0 Pro level of developer
because you will learn almost every
single thing which you need to know
about the web3 Technologies and
blockchains so that's the only thing I
want to cover in this intro part you can
I feel nauseous believe me never had a
lot of come easy had to work hard
struggle just to be me had to rise up
just so they could see me did what I had
to do just to feed me and what was left
over I put towards my dreaming but the
only thing in life that has meaning are
the things you gotta work for believe me
plan your own hands can land your own
brand and damn I feel like no one takes
accountability they want the credibility
convincingly unwilling to put in the
hours it takes to get some power don't
be freaking sour take a cold shower
scream until you're louder work until
you're prouder and brother doubters
I swear to God they'll let me down I
don't spot just to wear the crown
it's only worth it if you work for it
it's only worth it if you work for it I
won't stop till they hear me now I
telling you to fight for your dreams but
to stop what it seems man it's hard to
when everybody wants to begin yeah they
all wanna ring yeah we all Wanna Be Free
so show me what you got what you bring
how you fight in the ring how you take a
do you got heart are you mean got some
scars got some needs are you willing to
go please I swear to God they'll let me
down I don't respond just to wear the
crown I'm starving these clouds
it's only worth it if you work for it
it's only worth it if you work for it
don't stop till they hear me now I won't
every word I move so descriptive like an
adjective I got a vendetta against
people who patented being negative when
you should be getting after it I got
facts over facts over tracks this and
that spitting slow spitting fast like a
roast like a gas tank I'm okay or less
but I don't know if that can erase all
the past and the pettiness a reflection
of The Emptiness hilarious you think
you're worth my time you're Delirious
mysterious because you are behind the
fake exterior interior you know I'll
always be a bit Superior get off of me
this ain't no humble brag I want you to
hear words you can say them back I want
you to feel free from the chains at last
and you believe in what you got it was
you wanna play tough and wanna hate this
although we show up and make a statement
gonna learn the consequence of being
incompetent mental health is confidence
but instead of say something not
responsible but they're always possible
if you just believe you could be so
remarkable thoughts in my head a collage
and they spread I'll be great one day
going off of my meds so I'm not giving
up no I'm not giving in I will make it
to the top taking off you know when I
gotta make it I'm saving every day to
taste it I'm patient got my mind if you
know they take it I'm chasing a dream
that I'd ever several modern Kingdom for
I feel nauseous believe me never had a
lot of to come easy had to work
hard struggle just to be me had to rise
up just so they could see me did what I
had to do just to feed me and what was
left over I put towards my dreaming but
the only thing in life that has meaning
are the things you gotta work for
to plan your own hands can land your own
brand and damn I feel like no one takes
accountability they want the credibility
convincingly unwilling to put in the
hours it takes to get some power so we
can sour take a cold shower scream until
you're louder work until you're proud or
inflate tough and wanna hate this I'll
always show up and make a statement I
don't never slow up no I don't take it
I've got no love for the fake news
in this project we're going to use
visual core studio for building our full
stack nft Marketplace so let me tell you
what I have done so far in this project
so all I have done I have created an
empty folder nft Marketplace smart
contract so open up your terminal type
CLS to clear your terminal and now we
have to initialize the npm okay so type
npm in it and we have to give the name
to our npm package the project name we
have to call it so let's call it a nft
now you can give the description to your
project I'll call it nft Marketplace
then you can give your name as an author
just clear the terminal and here you can
see we have successfully initialized our
and if you go to this packages and file
this will contain all the information
about the project that what are the npm
packages we are using the name the
version the descriptions and the scripts
so all the data you will find about your
project right in this file okay let's
open your terminal and now we have to
initialize hard hat because that's the
tool we're going to use for building our
smart contract and testing okay
so simply initialize that so if you
haven't installed hardette in your
computer so the very first thing you
have to do is to open up your browser
type hard hat go to this installation
documentation from there you have to
copy this line and simply come and in
your terminal and paste and install the
package so once you successfully install
then we have to initialize that so some
this will initialize the hard hat now
click on enter enter and enter so here
we have initialized the package and now
we have to install this recommended npm
package by hard hat okay so simply copy
this npm install and paste it and
install this process will take a little
so we have successfully initialized hard
hat in our project and on the right hand
side you can see that hard hat created
couple of files and couple of folders so
the first folder is the contract we have
the script folder we have the test
folder we have the git ignore file hard
at packages and readme files so all
these files are created by harder okay
so let's clear the terminal and come to
this contract inside that you will have
a demo contract by the name lock Soul if
you open that here you will have a demo
contract so you can have a look that how
they have written the smart contract but
we're going to create our own smart
copy this one and we need to delete this
lock contract file and now we have to
create our own so I'll call it nft
Marketplace dot sold so this is the name
we're going to give to our smart
this is the file in which we go to write
the smart contract and this is the node
module in this all the packages which
you will install and use in your project
that's all you will find inside this
which you don't need to worry about it
because we're not going to use in this
any of these so and here you have the
another folder script and that script
deploy.js deploy.js and inside that you
will have this pre-written code which
allow us to deploy our smart contract
okay so here we go to do a little bit
modification okay so first thing I want
to do is to remove all these extra code
all these commands Okay and I want to
remove these code as well you can keep
it or you can remove it it's totally up
to you but I don't want to add any extra
information in our smart contract so I
will simply select this and I will
delete this one okay I'm going to remove
this because we are not passing any
information in our smart contract in our
Constructor we are passing anything like
that then definitely we're going to add
those but for the time being let's
remove it and let's remove this command
as well so we should start with a clean
environment so this is our deploy script
which allow us to deploy our smart
contract so let's close this one and
close and inside this test so we had a
demo contract in our contract file and
that's the test is written so if you
want to test your smart contract in your
terminal you can do it using hard at
okay or if you are using ganache then
you can do that as well okay but I'm not
going to do the testing using harder
okay so we just leave this file as it is
okay so you can have a look that how you
can test okay this is not a fancy it's a
very simple code and you can use all
this function to test the contract
so let's close this one and here we have
the get ignore so here we are ignoring
couple of files so we don't want to push
this data to get up so ultimately once
we build this project we're going to
push this project to the GitHub
and here I have defined that I don't
want to push my DOT ENB file which we
which we don't have in this project we
don't want to push the node module so
all the files which we don't want to
push to get up that's all we'll Define
here okay and this is the hard config
file here we're going to do the
okay so let's close this for timing and
here we have this packages and file and
here you can see here we have the
packages and file which contain all the
information about the project so
recently we have installed the hardat
package recommended package that hard
hat toolbox and you can able to find
here you can see that we have the hard
ad installed so everything's working
fine for this here it is the readme file
and now we have to install one of the
most important package which allow us to
create nft and build our smart contract
that is open Zeppelin so open Zeppelin
is a very powerful tool which you can
utilize which you can use it to build
any kind of smart contract so we're
going to use inherit some of the
property from open Zeppelin for creating
nft nft Marketplace okay contract so to
do that let's come here I'm here on mpm
JS so make sure you type simply npm JBS
and it will come to this article and you
can simply copy this npm install open
select this one and copy come back and
so here the installation is completed
and if you come to this packages and
while here you will find the information
about this so here we have installed
4.7.3 version okay you make sure you
should always use the latest version
now let's come back to our nft
so now we're going to build the smart
contract for our nft Marketplace because
we have done all the general settings we
packages which we need to build the
smart contract so I hope all these
things are making sense and now we are
going to write the smart contract for
our nft Marketplace okay so first thing
we have to do is to provide this license
identifier which is spdx license
identifier and I'll call it MIT you can
call it unlicensed it's totally up to
you but I will call it MIT now I have to
define the version sorority version so
0.8.4 so that's the general convention
we have to follow whenever we want to
write our smart contract now I'm going
to import the open Zeppelin contract
which we're going to use in this project
okay so we're going to call some
internal import let me give this comment
nft from open the plane and I will
simply paste this okay so once you
install open Zeppelin smart contract all
these packages will get installed into
your node modules and from there we are
getting this okay so the first one we
all these packages first one we have
this contract inside the contract we
have this utils and then we have this
so this counter will allow us to keep
the track that how many items are
getting created how many items are
getting nfts are getting sold how many
users are creating that nft so it will
keep us it will allow us to keep the
track of the number of token okay
so if you click on this you will come
here and here you can able to find that
what we are exactly using from this
contract so as you can see this is the
contract we have in that we have this
three functions so here we have this
three function the first one is the
current one which will give you the
okay when you will call this functions
and now we have the second function
which is the increment its work is to
increment the number okay and the third
one we have is this decrement function
so this will decrement the number okay
so these are the three function we are
inheriting from this Con a counter
contract so let me simply close this one
and here you can see here we have the
token contract and here we are importing
the token contract so inside the token
contact we have this erc21 and we have
using this extension version click on
this and here you will find the contract
so in this contract we are inheriting
some of the property from ERC 70 21 okay
and you can able to find that what
okay you can see all this now here we
so what are the things we are using in
this so that's all information you can
able to find about these each of these
packages okay you have two options
either you can use this packages to
build your smart contract or you can
write the entire code from scratch
but I would never recommend you to go
with scratch because once you do that
you have to do the testings and the
packages which we are getting from open
Zeppelin it is well tested and a lot of
companies are using these packages to
build the nfts okay so you should always
follow those code which are already
exist and which is already tested by
various company okay so that's why I'm
taking this approach okay so these are
the three Imports we have to do now I
want to do one more import we import the
hardhat console because we want to check
the value in our console so these are
the four import we are doing and now
let's start writing our smart contract
and we're going to give the name to our
and we're going to inherit some of the
and now we're going to use the counter
so for using that we have to say using
counter dot counter so this is how we
can use the contract of counter okay
so we have the counter and now we have
to take the variable so first is going
to be the counter dot counter and
and it's called The Token ID because
every nft will have a unique ID okay on
the base of that we're going to identify
the owner and the selling properties
okay so token ID and we'll take another
tokens sold so this will keep the track
that how many tokens are getting sold
okay so these are the two variables we
have and now we have to take the address
people honor so when we deploy the smart
contract so whoever will deploy the
smart contract became the owner of this
contract empty Marketplace okay
and we are making this payable so it can
table now we have to create the mapping
and that we're going to do with UNT okay
and this will become private and I call
items so let me tell you what is
happening here so every nft will have a
and we will pass that ID in this mapping
and this is Market item is the struct
we're going to create which will have
all the details about that particular
nft like the like the owner of the
contract the seller of the contract the
ID the balance the sell property okay so
just imagine that this ID this ID is
unique to Nifty so when you will call
this ID it will give you the details
about that particular nft okay so this
is how we are mapping now let's define
the struct so we'll call it Market item
because that what we have defined in the
market item in the mapping so call it
Market item and we have to Define that
so first it's going to be you in it UNT
token ID the second one is going to be
the address PayPal and the seller so the
one who will create the rft and
UNT and this will be the price of the
nft and now we have to keep the status
track okay whether the nft is sold or
and now we have to trigger the event so
whenever any kind of transaction happens
whether it's buying or selling we have
and I'm not coming up with this function
because this is the standard we have to
for building an nft smart contract for a
Marketplace okay so these are the
standards which is defined in the open
Zeppelin smart contract you can have a
so we're going to Define that I'll call
created okay now in this we're going to
pass the exact thing we have passed in
so first thing is going to be UNT index
then one is going to be the address
seller third one is going to be the
then UNT is going to be a price
and the last one is going to be the
Boolean is going to be sold okay so
these are the events why I'm getting
this error let's provide this comma
and right now still we have the error
okay let's continue working so let's
and we're not going to pass anything in
this Constructor but we're going to use
721 and in this we're going to define
the symbol of our nft all the nft will
all the nft will created we have to
assign the symbol and a name okay
okay and the symbol I will provide is my
nft so this is the name and the symbol
to my nft smart contract okay
and let's provide this bracket you might
be thinking from where I'm getting this
if you come here here we have this
inheriting this if you click on this
you can come here and here you can see
let's scroll down here we are passing
that in the Constructor so we are
passing the name and we are passing the
so that's what we are passing here
so once you pass this the rest will take
care by the open Zeppelin okay
so we have to use this property let's
okay these are the name these are the
symbols now well take the honor is going
to be the message payable message dot
okay so whoever will deploy the smart
contract become the owner and we are
using this payable so it can receive
funds so this is our Constructor that's
the only thing we want to do and as you
can see we have gone the we have no
longer having that error because we
haven't used the Constructor that's why
we had got that error but now the error
now we'll take a create a function and
this will call update listing price okay
and the reason why I want to create this
function because as a owner of the
marketplace I want to charge money so
those who will create nft they have to
pay certain amount to me as a one of the
marketplace okay and this function will
allow me to update the price which we
which I will Define in my smart contract
initial price and if I want to charge
higher so this function will allow me to
change the price higher or less okay so
this is the function for that
so it's going to be a UNT it will take
the UNT and we'll call it listing price
and it's going to be a public PayPal
because the price will change so we have
to define a modifier because I want that
this function should be only called by
the owner of the smart contract no other
person can call this function okay so if
we live this function like this so
anybody can update the pricing listing
pricing of our smart contract but I want
that only honor can update the pricing
of this listing okay so we have to
create a modifier for that so let's come
up here and I'll call it modifier and
and here we have to set the condition
for that okay so we go to check that
that whoever is calling this function it
if someone else call this function we
have to say only honor of the contract
okay so this is the modifier we are
using simply come here and now we have
to give this Dash and this and this
means that once this modifier get
success means is true then the other
function will keep continuing okay so
this is how you have to continue code
now what you have to do simply
simply copy this only honor and here we
so in this way we can easily able to
call the modifier whenever someone will
and now we're going to do the changes
okay so we are receiving that listing
so let's call it listing price but
actually we haven't defined that listing
price in our state variables okay so
let's come up here and here we're going
to Define that listing price so let's
come down let's call it take a UNT and
and initially we want to charge
so this is the amount we want to charge
and now we have to update this with the
functions why I'm getting this error
okay we are getting so here we have to
Define that whether we are charting the
fee in terms of way ether write that so
we're going to say that we are charging
so here we have that listing price
so let's decrease to 15 okay now it's
so here we have the modifier let's close
all this one close this one as well
now let's come down and now we have to
write a function which allow us to fetch
the listing price so anybody can check
that what's the amount they have to pay
for creating nft okay so we'll call it
and it's gonna be a public so anybody
can call this function view returns
U and T we have to return the UNT and
then we're going to return the simply
so listing price okay so if you're new
to solidity so here what I'm doing I'm
making this function public so anybody
can call it and I'm using this view
keyword you can use it Pure or view but
why we have to use view because we are
checking reading the state variables so
listing price is a state variable so if
we want to read that variable then we
have to use the view and we are using
the return keyword which allow us to
return any value okay and here we have
returning that so that's our get listing
now let me give this comment I call it
now we're going to start actually
working on our nft smart contract
now let's come down let's call it
token so with this function we try to
create a token and assign to a
nft so this is how we can track and do
the mapping okay so that token is going
to be let's say string and in that we
have to pass the token URI so the token
URI is actually the URL of the nft so
when someone will upload that nft we
will get the URL of that nft and that's
going to have a specific ID okay so
that's what I'm doing here so simply
remove this and it will also take the
price so how much price setting by the
and price it will come public payable
and we have to return this one and the
thing we want to return is the UNT
is going to be the basically the ID of
so here we have to do a couple of things
so as you can see we are doing this
normal thing we are taking the URL of
the nft by getting the price and we are
now here we're going to call the token
ID and we'll call it increment so
whenever someone will create nft
this token ID will get increase
and now we have to use this one okay
it will get the increase now we'll take
so first we are incrementing the token
ID and then we are getting that current
token ID and that current token ID we
are assigning to this new token ID which
is going to be assigned to the nft okay
now let's come down and we'll call this
and that we go to pass this to message
dot sender and we have to pass this new
and again we are using this Min function
from open zipline okay so to see what's
in there all you have to do is to click
on this and you will land here and here
you can able to find the function that
what exactly Happening Here inside that
we are passing this to address and token
ID it's internal function and here we
are doing two check first the address
was deploying this nft it's not any
contract it has to be the address user
address okay and the second check we are
doing and passing the second tree we are
doing that whether this ID is already
exist or not okay so that's the two
check we are doing and then we are
okay we are doing this transfer once
again I tell you that you don't need to
all you have to do is to Simply use this
function and if you want to become an
expert then definitely you can check the
to take the reference to take the idea
now let's continue working now we're
going to call one more function we'll
call it set token URI and that we have
to pass this new token ID and simply in
this we have to pass this token URI the
image URL simply remove this one and
close this one again we are getting this
function from the open Zeppelin and we
head react from getting here from me and
receiving here now let's come here and
now we have to create one more function
an item and in this we're going to pass
the two thing so first thing we'll pass
the new token ID and the price and this
function is not in coming from open
Zeppelin we're going to create this
function and in that we're going to pass
this to to data token ID and the price
okay so this function is not there we
and now once everything is got
successful we have to return the token
new token ID okay simply copy that
and simply come here and now we have to
create this function so we'll call it
create market items so first function
will create the token ID for that that
particular nft and this function will
at Market items actually the nft and it
will assign the data all the data to
in this we're going to receive the two
data which we have passed so let's Let
me give this command by creating Market
in this I'm going to pass this two data
and it's going to be let's say remove it
and let's call it token URI let's token
ID and the second one is going to be the
so let's call it price it's gonna be uh
let's say private functions because
we're going to call this internally not
externally okay so that's the two data
we are passing here receiving and here
so first check we'll do that price
should be greater than zero if it's less
than that then we have to display this
error message Prime must be at least one
we have to do the other check and here
we're going to check that message Dot
should be equal to listing prices
because we have to get our commission so
they have to at least set the price to
and if it's less than that then we have
to display this error message price must
so this is the true condition we are
checking if it passes then we can
continue with the work let's come up
here and so here we have the mapping
each nft will have a unique ID
and all these nfts are stored inside
this ID Market item okay we're going to
use this and pass the ID to find the nft
and the entire data okay so that's the
entire logic so simply copy this and
we're going to Simply pass the token ID
because this is how we can identify that
which item is getting created it's going
we have to call the struct and here we
have to update the entire data okay
we are assigning a unique ID to that nft
and then we are calling the struct and
so first is going to be the token ID
because 1mt can have one unique ID the
other one is going to be the payable and
it will going to be a message dot sender
and we have to say payable address this
okay and this address this means that
the nft or the money belong to the
contract itself message dot sender is
the one who will call this function it
could be anybody who tried to create the
nft but address this means the smart
so paper now we have to get the price
and we have to set the false
So currently the nft is not sold so we
have to set the status to false
so that's why we are setting false and
here we have to give the comma and now
we have to call this transfer functions
so we want to transfer the function
sorry we want to transfer the nft from
the message dot sender the one who
creating the nft to the contract
and here we call address this
and we have to pass this token ID okay
token ID so this is the transfer
functions why we are getting this error
remove this one and now we don't have
the error so let me tell you what
happening once again here we are taking
the ID Market item which contain all the
nfts and that we are assigning this
token ID and that took an ID constraints
the information about the entire data of
that nft token ID message dot sender
contract address price and the false
status okay and then we are transferring
honor to the contract with the 90 okay
and again this transfer function we are
it's coming from the simply opens up
and now we have to call this event okay
because we have created an event and
whenever the transfer of tokens happen
we have to call this event so we'll call
it Market item created and here we have
to fill out all these details so make
sure you have to fill the data in the
same order which you have defined in the
event okay so when you call the event
it's called emit then you give the name
of that event whatever you have defined
and all the parameter you have set that
in the wave in make sure you should
assign the value in the same order
that's the thing you have to keep in
mind otherwise it will give you an error
so let's come here here you can see here
and this is how we are calling it here
we're going to do the changes we'll call
and the owner is going to be that
we have the price and we have to set the
okay this is this is the initial data
we'll assign when some will create nft
that's looking good let's see let's
close we are done with this done
and these all are looking good let's
and this is the create token close this
one as well close this one as well and
now let's write other function as well
so let's come down and let me give this
so this result function will allow user
to sell their nft if they have their nft
and if they want to resell in a higher
price so this function allows them to do
that so let's write the function for
that so well I will call it resell
token and in that we're going to pass
ID okay and we have to pass the updated
price whether he want to sell at a
so he will pass the price and now it
will become a public because so and
payable so anybody can call this
functions and payable keyword is there
because there is a transaction of money
now we have to check for conditions so
item you have to pass the ID token ID
and we have to check the honor that who
is the owner of that particular token
the ID has provided and we'll call it
message dot sender okay so why we are
getting this error okay we have to
so now it's working fine so here again
we are calling this and we are checking
here so what we are doing here when
someone will call this function he or
she has to pass these two data first one
is the token ID and the price so on the
base that of in the base of the token ID
we are mapping the data and this all
data is inside this ID Market item we're
checking that who is the owner of that
nft and the person is calling the
function if both the address get matched
then we want to continue further okay
and make the cell happen resale happen
last come down so that's the very first
check and here we have to pass the
message error message only item owner
operation or purchase okay let's come
down we have to do another checks and in
this we have to pass that Ms dot value
if it's less than that then we have to
pass this error message because we have
to make commissions whenever someone do
in our application okay so that's the
second check we are doing now we'll come
here we'll take this Market item we have
token ID and we want to change the
status sold state is going to be false
and because we have to change the price
and here we have to let's say change the
paper to the message dot sender and here
and here is going to be the owner
so this will become address this
so when someone will research their nft
the nft will go to the contract and
contract become the owner okay so that's
the entire logic we are not doing
anything fancy we are simply changing
the entire State The Constructor we have
defined okay so that's the data let's
come down and now we have to call this
item sold and we have to decrease the
count because every time any cell will
happen or anybody buy any nft this item
sold count will go up okay but when
someone resale that this number will go
down okay so that's will keep the track
of it now we have to call this transfer
function so message dot sender and the
we'll go to the contract address so
address this and the token ID would be
there okay so this is the transfer
so this is our resale token function
so everything is working fine now let's
write the other functions so let me give
this command it's called function create
Market item sale so this function will
allow to create cells okay so function
and we'll call it create Market cell
and in this we're going to take the UNT
we have to take the token ID because
that's the unique to every nft and we
have to call it pay public payables and
we have to Simply do couple of checks
so to create the cells we're going to
take the UNT and it will call Price and
this nft price is available inside this
ID nft we have to pass the token ID dot
price so in this way we can able to get
which is coming from inside this here
and now let's working on our contract so
may come down and we have to do the
check so message dot sender sorry value
should be equal to the price
and if it not then we have to display
this error message so please submit the
price in order to complete the purchase
okay if someone wants to buy this nft
so they have to provide the exact price
which is available in the nft for making
the sale okay so here we are checking
let's come down we have to do take this
nft item and we have to pass this token
ID and then we have to check for the
owner honor is going to be the PayPal
Dot message dot sender so whoever is
calling the functions he will become the
owner once he make the payment okay so
that's we are changing the State honor
State and now we'll call this pass this
token ID and we'll say sold to true
and now we have to Simply say payable
so right now this contract this nft is
so that's simple thing I hope everything
is making sense to all of you nothing
fancy very simple we are just updating
the data and transferring the token from
now let's come down we have to call this
item sold we have to increment that
and now we have to call this function so
this time address this the contract
address will send the token because when
someone will list the token it will go
to the contract itself and when someone
buy the token it will they have to buy
from them okay from the contract so
we'll send to message dot sender and we
then we have to call it payable
and we have to get our commission so
we'll take the commissions like listing
price so whenever any sale will happen
we have to get our commissions and this
is going to be available in our
means I'm going to deploy the Smart
Control so I become the owner of the
marketplace and whenever someone will
sell the token I'll get the money the
listing price which I have assigned
and the rest amount I'm going to send to
the nft owner okay and the data we have
is there pass that and from here I will
so the owner of the nft and then we have
and we'll transfer the message.value so
the exact nft value which he has and I
so this is how we are making the sale
so this is our create Market sale
function so everything is looking good
this is this is now let's come down
let's write the other functions for that
so let's come here let me give this
nft data so we want to display the data
all the nft from our smart contract so
let's write the function for that and
that's what we are doing so I'll call it
and fetch market items so all the nft we
want to fetch okay so it's going to be a
public view return and we're going to
take a let's say Market item an array
and memory okay so this is the array
so let's come here we're going to take a
UNT first we call it item count so we
have to get the total items and we're
going to find it inside the total ID dot
current so this will give that how many
nfts are there in our nft Marketplace
because every time someone will create
nft this number will keep increasing
okay so I hope everything is making
now we have to take another UNT and in
sold items so those stroke and those nft
which has not sold so we have to keep
the track of that so what we'll do we'll
dot current and we're going to subtract
number of token gets sold okay
so if I subtract the token ID with the
total sold I'll get that unsold item
so let's come here and I call it current
index initially it will be become zero
and why it's happening like this okay I
have to format this let's bring it back
so here we have the current index
because we're going to Loop already okay
so we're going to Loop over the entire
nft and we're going to store inside this
current index okay so everything's will
come make sense so it's just walking
so here I will take a let's say
nft Market item array and memory
memory and I can call it item so here
I'm taking an array in which I'm going
to store all the unsold unsold nft okay
so I'll call this new I'll call it
Market item array and here I have to
the length the number of the number of
array the number of item I want to
return so this is how you have to do it
so new is a in new is a keyword
and that's what we are using okay and
here I have to provide the length and
this length I'm getting from the unsold
item okay so I want to fetch only those
nft which are not sell so I can able to
display on my front end application okay
so this is how we are creating that now
we're going to Loop over it so I'll take
it UNT I is equal to zero if I is less
than item count then I want to increment
we're going to do a couple of things so
first I'll do the if statement if Market
so let me repeat once again what is
happening here so those nft belong to
this at the Smart contract address this
is the Smart contract those those nft is
not sold okay it's unsold nft and we
want to get those nft only okay so
that's the check we are doing
why we're getting okay just remove this
so that's the check we are doing
if we find those nft we have to take
this UNT and we'll call it current
ID and we going to Simply increment that
I plus one okay every time this Loop
will happen this current ID will
and that will pass this storage current
and we're going to call this item and in
that we're going to pass this current ID
that's how we are keeping the track same
thing we are doing what we have done
above so I I hope things are getting
if you are still confused on anything do
leave in the comment section I have a
Discord team so do join that Discord
where we can able to answer your
questions quickly and all a lot of
members are already there so if you have
any common problems and if they have
already faced that so they might can
help you okay so make sure you join our
Discord server and write down your
so we can we can help you in that so
and in this we're going to pass the
current index and we're going to track
it so current item okay and now we have
to Simply increase this index
so that's the thing we are doing and
finally we have to return the array
so this is our fetch ID Market item
function which allow us to get those nft
which are unsold and this is how we are
we are trying to find out that what nfts
are belong to the contract that means
and try to fetch that so that's the
function for unsold nft we have written
okay you can check double check one more
time we are not getting any error
now let's come down let's write the
other functions so I'll call it
we're going to display all the nft which
you have bought in your profile in your
nft collection so for that we are
so it's going to be a public view return
and we have to return the array of nft
okay because one user can have multiple
nft okay so that's why we will return
and here we're going to do things okay
first we'll take this UNT the same thing
we have to do what we have done from
fetching the an unsold item okay the
same thing we have to follow here same
so I'll call it total count initially it
would be let's say number of token we
have to find so let's call it token ID
then we have to take another UNT and in
this we have to take this item count
initially b0 we'll take another UNT it
will call current index it could be zero
okay so we are taking this item count
and total item count and then we're
going to solve this problem okay then we
will take a UNT I is equal to zero if I
then we have to supplement increment the
so in this we're going to check ID
equal to message dot sender so here we
are checking for that that who is the
owner whether the owner is the message
dot sender okay that's the check we are
if it's that then we have to update the
data so our item count plus one
here we're going to take the market item
because once we get the data once we get
this it nft belongs to this particular
user we have to store somewhere okay and
so we can render that we can get that
okay so we'll call this Market item
memory items and we call this new market
item and here we have to provide the
length which is inside this item count
okay so all the nft pal pass and now
we'll run for loop on this so I is equal
that's total count then we have to
supplement increment that I okay and we
have to Simply take a variable called
and in that we have to increment this as
we'll take a market items and we'll say
equal to ID and then we have when we
pass this current ID same thing what we
have done over and then finally we're
going to update the status so I terms
item okay and here we're going to call
this current index plus one so updating
the data exactly the thing we have done
so these are the in this way we can able
okay I miss so I have to write this wrap
this entire thing in if statement so
let's take a if statement Market item
and I plus 1 then we have to check the
message dot sender and then we have to
write the entire code inside this copy
so that's the simple change you have to
do okay in this way we can able to get
the entire and nft belongs to a
and once we've done that we have to
return the entire nft so items okay
and we have the data if for statement
and now we are looping over it and
getting returning the data let's come
and let's write the other function so
let's call it uh let me give this
so we want to also display the
information about the nft individually
okay so that's the logic we're going to
write okay so let's come here we'll take
return and we want to return the
so try this as and now finally we have
to return that so before we run that we
have to take this UNT and I'll call it
total count same thing we have to do
so this total count is available inside
this ID so token ID dot current
and it becomes items count zero and we
have to take another one it will call
variables now let's come here we'll take
we run our loop I is equal to 0 I less
and then we have to increment the I so
and now we have to do a couple of checks
we'll take if market items I plus 1
equal to messaged on cylinder okay if
the person who's calling this function
is equal then we have to continue this
function and we'll say item count to
and we'll take this another Market array
Market item array it's gonna be a memory
New Market item and then we have to pass
this ID and total count total number of
nfts okay so that's the same convention
We are following hope you guys are
getting familiar let's continue
so in this we're going to run a for Loop
count then we have to increment the I
and we'll call it if I market items I
plus 1 it belongs to the address as
we want to Simply take this UNT to 56.
and we have to increment that as well
so we'll take this Market item storage
and we have to call this ID Market item
current item we have to pass in that and
now we have to get that items current ID
and once we have that we have to
simply we have to return that so return
items same thing we have done in what we
have done in the last three function
uh get a nft okay same thing we are
doing here for getting the nft so you
can see we have no more error and let's
have a look so this is our fetch nft
listed function okay we have written
you have to have this function a for
Market item array let's come up here
this is the fetch my nft functions which
allow us to give the nft belong to a
particular address and this is a fetch
Market item which is which will return
the unsold nft that belongs to the
and this we are looping over it and this
Market sale okay so when someone want to
buy nft this function will get triggered
and it will update the status and the
and transfer of money okay so here we
are doing all the things and now we have
this resale so if someone have bought it
and they want to resell this function
and here we are changing the state and
from pay from sender to the contract
and here we have the create token so
this function will create the unit ID
and here we have this get listing price
so let's open this one this is the get
and here we have this update listing
and this is our Constructor this is our
and this is the struct and mapping and
this is the state variable we have
defined in the smart contract so with
this we are done with our complete nft
Marketplace smart contract and right now
we can't test it because we haven't
built the front-end application okay so
in this video we have completed the
entire smart contract for our nft
Marketplace in the next video from the
next video we go to build the front end
and once we build the complete funded
application we're going to integrate
this empty Marketplace smart contract
with our foreign application and then we
can do the testing and we'll create nft
and list in our Marketplace so once
we'll do that so we have built this nft
Marketplace we will build the entire
front end so we'll do the testing with
the smart contract and once we're done
with the entire thing then we're going
to build the back end part okay
so I believe that whatever we have
covered in this complete nft Market
project smart contract development
project everything is making sense I'll
try to explain as simple as it so you
guys can understand that what are the
things goes into this when you want to
create your own nft Marketplace or any
so just imagine that if I want to write
this from scratch without using any
external packages which we are used in
this project like open Zeppelin if I
have to create the same functionality I
have to write thousands of code
so it's always good you should always
tools which is available in the market
okay so anybody can create code okay
writing code is not the big deal but you
have to know that what codes are already
exist what are the best practices are
only follow in the industry for that
particular project which you want to
in that way you can able to save a lot
of time you can able to build faster
project and you will have the security
because if I build the same project from
scratch by my own who will be there to
because that's the most important part
of the smart contract this contract will
keep like a lot of nfts and those nft
will cost billion dollar a million
dollar depend on the type of project you
are working on so if that nft get highly
evaluated then you have to be secure
that your smart contract is non-hackable
no one can hack it and no one can take
those nft so that's the thing you have
to keep in mind okay you should always
review a smart contract never sit down
once you build your smart contract it's
a constronously evaluation you have to
do throughout the entire process right
now you have built the smart contract
each of every time you have to test
and that's why I have used open sapling
because it's already tested well tested
for minting functions for transfer
function these are already well tested
so that's what we have used okay so I
hope everything is making sense to you
again I'm telling you the final code is
already provided to you all of you on my
website you can go you can get the
starter file you can get the complete
file you can go to all the assets which
we have in use in this project and if
you stuck anywhere or if you find that
nothing is working something's wrong in
the code you can simply copy the code
and compare your code I would not tell
you to Simply copy the entire code and
use as it is okay in that way you would
not learn anything okay that becomes
simply copy paste so just right along
with me if you're strugg compare the
codes and that's only I provided this
code only for comparison purpose okay
only for comparing if you're stuck
anywhere you can compare because I do
understand that when you build right
application like this you will commit
some sort of mistakes you will find some
sort of error and my code would be
different from yours in certain
positions so in those scenario if you
get an error you can compare but don't
simply copy and paste because that will
teach you nothing okay that will teach
you nothing when you start building from
fresh you will find that you know
so all these assets all the codes are
so that's the only thing I wanted to
cover again I'm telling you we have
finally completed the entire smart
contract for our nft Marketplace in the
next video we're going to build our
front-end applications so from the next
for an application okay we have built a
smart contract from The Nest we're going
to build the front-end applications and
that part I have divided in couple of
more parts because you can see that our
nft Marketplace is really huge we have
to build 16 plus Pages we have to build
home seller authors a lot of pages we
have to build so each of the things are
very complicated because it's nft
Marketplace we have to build a lot of
things so I have divided the entire
project into a small component so one
time we are dealing with the navigation
okay the fetching data so you can
understand that how we are passing the
states how we are passing the component
okay and I'm going to create some demo
data and from there we go to do the
rendering so when we actually fetch the
data from our API we don't have any
trouble all you have to do is to Simply
plug this API information and the entire
rendering process will happen Okay so
you will find a lot of things in that so
you will find that it's there is a lot
of things but exactly there is a lot of
and there is a lot of learning for you
okay so with this I hope you have
enjoyed this NFTA smart contract project
and in the next video we'll start
working on our templates so hope to see
you there and I hope you are enjoying
enjoying this complete project okay so
that's the only thing I want to share if
you are new to my channel hit like And
subscribe that will motivate me a lot to
build this project and it tooks really a
lot of effort for me to come up with
this project took me around a month to
if you build this project we are
building a lot of things smart contract
front end and the back end it will take
around 15 to 20 hours to build this
complete project so hope you will enjoy
it and this is a huge course so I want
take rest and then continue with the
project so that's it have a wonderful
get started so what I have done so far
for Designing this front end I have
created a folder by the name nft
Marketplace video and in this we're
going to keep all the files for our nft
Marketplace template okay so here I have
already opened the visual core Studio
you can pick any code editor but I would
recommend you to use visual core Studio
because that will give you a better idea
I'm doing and you will be on the same
path okay so here I'm in my directory
and first thing you have to do is to
Simply open up your terminal and we're
going to initialize couple of things
okay so first thing we're going to do is
to clear the terminal and type npx
create next app same directory so in
this project we're going to use the
Technologies like react.js nextgs
node.js HTML CSS and javascripts for
Designing this entire front end and I'm
using next GS project okay so here I'm
initializing the next JS just wait let
the installation get completed so we
have successfully initialized next.js
simply clear your terminal and on the
right hand side you will find couple of
folders and files which is created by
so here in the in this packages and file
you will find all the details about the
packages about the tools we're going to
use in this complete nft Marketplace
template design so here you will find so
the name of the folders the versions the
private and we have couple of scripts
which allow us to run and here we have
dependencies So currently we are using
three dependency the one is next react
and react demo which is uh created by
the next years and here we have the dev
dependency okay but what I want to do I
don't want to use this s line okay
because I don't want to configure so I'm
going to remove simply this packages
which I don't want to use in this
project so simply open up your terminal
and we need to just install this
packages so type in PM unstall s-len
paste and hit enter this will install
the package Sim to do the same thing
from this copy and simply install this
so we can start with a clean environment
so now looking good let's bring this
down here we have that close this one
and we have to delete this file as well
eslin.json file because we no longer
using this link delete this one
and here we have the readme file here we
have the git file so if you haven't
installed get in your computer then
definitely you won't have this file but
I have get installed in my computer so
I'm getting this so if you're not
getting this don't worry about again
because we're not going to use it okay
so in this you will find all the folders
which you don't need to worry about it
then we have this not mole node modules
so all the npm packages we will use in
this project that's all going to be
stored inside this node module folder
which you don't need to worry about it
okay simply close this here we have the
page folder inside that we have three
files the first one we have this API
folder then we have app.js then we have
index.js so simply delete this API
delete this one open this app.js and
here we have to do couple of changes
okay so instead of using normal function
we go to convert this into a arrow
okay simply to remove this const give
equal sign and we have to convert this
and I want to return instantly okay so
that's why I will do in this way simply
cut this one and we have to remove this
and we have to remove this return
so in in Arrow function this is how you
app.js file close this one let's come
back to the index so this is the demo
code we have in our index.js so we're
going to Simply remove it and we go to
right from the clean environments type
rafc this will create the reacts
functional base component and the reason
I can able to create this by writing
this sort form because I have installed
react snippet okay so make sure you
install that extension and I believe
that you guys already have in your
computer okay so let's work on this
let's change this to home Okay this is
the main page which initialize our
project an app okay so let's close this
one in the public folder we have this
icons and we have this files okay which
close this one let's come come back here
in the style folder and here you will
find two CSS file the first one is home
modules and the second one is the global
CS file so simply remove this home
module because we're not going to
include this and here we have this
Global CSS file so if you want to style
any so if you want to apply any Global
styling in your applications you can do
it from here and we're going to use this
file for applying Global stylings like
colors fonts and we're going to remove
some padding borders so that's all we're
going to do you will find that how we
are applying it so here you will find
so let me close this one close this one
so this is the getting your folder and
here you will find all the files and
folder which you don't want to push to
get up okay so it's automatically get
generated so when you will push this
code it will go to get up but this file
will not include it in that so what I
will do after every lessons after every
component design I'm going to post this
like code to get up so you guys can get
and compare from there okay but I want
to give you a quick disclaimer that
don't simply copy paste because I will
try to explain everything the logic
behind that why I'm using the code the
way I have written okay so after every
session I will deploy this code to the
getup so you guys can get and I have
already explained that how you can get
the code simply visit to the articles in
my website and from there you will have
the sections and from there you can able
to download the code okay so this is the
get ignore file so here you will find
the dependency we have the testings
next.js build modules mins and debug
script and all this we have simply close
this one and here we have this packages
in which you don't need to worry okay
here we have the packages and file and
here we have the readme file so simply
do one thing simply select this all and
so I'm going to keep all the notes for
this project in this file so you guys
can have a reference okay or if I were
to give any code as a note and so that's
all I will provide here so that's the
readme file and let's close this and
so that's all we have let's open up your
terminal and we have to type npm run
them we have to check our application
and this script I'm tapping because
we have this script in our npm package
for the development environment okay so
if I click here and here you can able to
find that we have all these four script
we have Dev Bill start lint okay so we
are using the development mode
and that's coming from next shares okay
let's bring this save it okay let's hit
and this will initialize our project on
localhost 3000 so to open this all you
have to do is to Simply compress control
Mouse on this 3000 link and this will
open the application in your browser on
so let's come here here you can see it's
and finally we have initialize and open
our application on localhost 3000 and
you can see that it's written home
let's zoom out okay it's working fine
and let's bring the terminal down I'll
keep my server running so whatever that
changes whatever code I will like that
will display here okay so don't stop the
so so far everything is working fine now
let's create the folder and file
structure and this project is going to
be really huge and there are a lot of
things that involved so it's very
important that we have to create the
right folder and file structure for our
nft Marketplace because in this we are
doing a lot of thing we are managing lot
of stakes lot of component so it's
always important to have a proper
component structure so if you want to do
any changes in future so it become very
easy and it's become very navigatable
for other developers to do the changes
and work on this project okay so folder
and faster is very important if you work
in an organization definitely they will
going to ask you that how you can
organize the entire code because
building code is really not that hard
but organizing and working on a
scalability level it's very important so
first thing we're going to do we're
going to create couple of folder and
files so we'll create the component
folder and this we're going to have all
nft Marketplace and in that we're going
to create couple of files okay couple of
folder and couple of files so the first
I will call is index.js in this I'm
going to import the entire component
and from here we're going to export it
okay so that's the entire logic so we
have this index.js inside that we're
going to create a folder and I call it
navbar okay and that I'll create the
files so let's select that come here
let's create the other folder I'll call
inside the photo will create the
and in that we're going to create one
more file which is footer dot module.css
so in next.js this is the extension you
have to provide footer modules dot CSS
then you can able to add the external
CSS file okay so this is my photo
component both with jsx and the CSS part
now let's come to the navigation bar and
click on this and let's create the
folder so our navigation bar is going to
be the biggest component because there
we have a lot of things we have a
sidebar we have a discover menu DB have
a help menu section we have notification
we have a user profile we have button so
there are a lot of components involved
in our navigation bar and although it's
a mega menu navigation bar so I'm going
to structure that entire navigation bar
into a small component okay so let's
create the folders for that so I'll call
so this is the first folder we we have
menus and inside the Discover we're
going to create the file discover.jsx
and we're going to create the CSS file
for this module dot CSS so this is the
Discover component now let's come back
to the nav bar and let's create other
one mode so I'll take a folder and I'll
call it help section help center sorry
and let's create the files for that so
helpcenter.jsx and we could create help
center dot module.css so this is the two
component for our Mega menu okay so one
menu for the Discover one menu for the
so let's close this one and let's come
here and here you can able to find we
have this two part which is the two
and now let's click on this nav bar and
let's create one more folder so this
will call notification component and
inside that we're going to create the
and notification module.css for the CSS
okay let's click on this we have to
create one more file folder sorry and
profile.jsx and profile module.css
so I believe that you guys can make the
sense that how we are approaching this
so let's close this one now let's click
and let's come here create one more
folder and this call we our sidebar
sidebar.jsx and we have to create
so this is our sidebar component so we
have all these okay simply close all
this open file so here we have the
navigation structure let's close all
this and let's open this discover
section uh this one I'm working fine
profile sidebar and we have this index
so let's come back go to the footer and
simply import the CSS file for the
footer so let's call it internal import
style from the same folder slash folder
modules okay let's close this one so now
with the navigation bar so let's
come here and create one more file so
this time we are not creating folder we
are creating file in the same navigation
so in this folder we're going to import
and we have to create the CSS file for
so in this snapbar jsx we're going to
import all this component and we're
going to build the entire navbot okay so
don't be scared because of this folder
and file structure it will make our work
very easy and you will find that how it
doing it okay I'll try to keep this
thing separately so it's become very
easy to navigate in the project
so let's come here and type rafc
and we have a number let's import the
that's coming from the same directory
dot let's bring it down navbar model CSS
okay so this is we have the CSS and now
that's what we have let's close this one
close this one now let's close open this
and here we have the Nam bar let's come
here and let's start working on our
navigation bar okay so before we walk
let's come here in the Discover folder
and we have to type this rafc otherwise
we'll get the error when we'll import
so let's close this one and do same
thing for others so RAF CE this is
Health Center let's do for the
and we have to do for the sidebar rafce
close this and close this one close this
close all these fold open folders
and inside the nav bar we're going to
create one more file this time not going
to be folder it will file and I'll call
index.jsx so in this file we're going to
import all the navbar component
from there we're going to export it
so this is the file we have let's come
here and let's import all the component
and Dot slash discover component we have
to take okay so this is how we are
importing the component in this index.js
so let's close this one and let's call
help center and that's coming from the
same directory dot help center slash
it will call Profile that's coming from
and that's coming from the same dot
notification slash notification but you
have noticed one thing here when we are
importing the file we are getting two
files one with extension or without
extension so both the files are same you
can import whatever you want if you want
to give the extension you can give
otherwise you can simply give normal
import okay so that's the notification
so I'll call it sidebar and that's
coming from the same directories sidebar
so these are the five components are
involved in our navigation bar and now
we have to export them so let's come
down and we'll call it export and in
this bracket we're going to pass this
all okay so first one is going to be
let's say discover second one is going
to be help center third one is going to
be profile notification and sidebar
so these are the five exports we are
doing from this file okay let's close
this one let's come here and now
so here we have that let's close this
come to navbar and here we're going to
import all this folder okay and now we
can start working on our navigation bar
okay so let's open up your browser and
we need to install react icons and
because that's what we are using in our
project for getting icons okay so let's
come here type react icons come here
click on this and this is the command we
have to do okay so we have to install
react so simply copy this npm install
react icons this will give the complete
library of react icons okay so let's
and simply stop the application from
running or you can simply open up a new
terminal both the thing you can do all
good open the new terminal and I will
clear the terminal and I will simply
paste this npm react icons okay just
so we have installed react simply clear
icons now let's come back to the
packages and file you can find the
details about this package so the
version we are using 4.4.0 okay so no
matter what version you are using you
always get the supported version okay
so here we have the react icon so let's
close this one and now we can start
let's come here we have to import couple
of things from directly so it's used it
and we have to take use effect
now we have to do import the image from
next.js now we have to import the link
from next link and now import the icons
now we're going to import icons and the
first icon we want to import is MD
notifications and if you want to know
from where I'm getting these name of
this notification you can simply visit
the react icon and if you search the
name you will find that okay so I'm
getting from there so it's coming from
the react icons and slash MD so there
are a lot of providers icon provider so
we're going to use multiple providers to
get the icons because in this project I
wasn't finding one provider which have
all the icons okay so we're going to use
multiple provider and once you install
this react icons you get all the
providers in your node modules and from
there you can easily able to use it okay
so this is the notification icon now
let's import one more it will call BS
search so this is going to be the search
icon and this is coming from
bootstrap okay BS let's import other
icons so like we'll call it CG menu left
right and that's coming from react icon
so this is the I can import and this is
the react Imports and next year's import
let's come down here in internal Port we
we have to import the components okay
which is coming from index okay so first
one is going to be discovered
and we have this inside this nav index
so if from this index file we are
importing or exporting all the
components so from there we have to
import okay make sure you do that
in this we're going to import the health
center we're going to import the
notification and the profile and the
so these are the component we have
okay so we have the component now let's
let's come here and click on
this component and we need to create one
more component okay and the component
we're going to create in the component
curve folder so we're going to create
the button component because we have
button in our navigation bar
and I am creating button component
address separate because we have a we
are we are using button in multiple
places and all the buttons have same
styling but minor differences so I'm
taking as a component reusable component
so we don't need to style over and over
again okay so we have this button
and inside that we're going to create
and we will have the CSS file as well
modules dot CSS we'll type that rafce
and here we have this now close this one
and let's come here and in the component
we have this file dot index.js but I
don't want to create name conflict so
here in this we're going to import all
the component itself okay in the
component file so I'm going to change
the name so I'll call it let's say I'll
call it component index so you guys can
become very easy for you to understand
that what what are the things we are
importing inside this component index.js
so here we're going to import couple of
things so first thing we're going to
and that's coming from the component
same directory button now we have to
import the let's say footer we have in
the same folder footer slash footer and
here we are importing the navigation bar
so nav bar and that's coming from there
so these are the import component import
and now we have to export this as well
so we are not exporting right now let's
come here and here we have to import
button and that's coming from Dot
uh that's a dot dot slash component
so here we have the button component
which is coming from component index
so that's the button let's close this
one and let's come here and here I have
already provided this images to all of
so once you get the startup file from
the website where you will find this
so here in this images you can see we
have all the images which we are using
in this project we have the nfts we have
the user we have the social media icons
we have the background images so all the
images which you will find right in this
folder so make sure you can download
from the articles which I have mentioned
so here in you will notice one thing
inside the images folder we have one
more index.jss file so what approach I'm
taking you can import the images in the
component individually okay but here
what approach I'm taking I'm exporting
all the images I'm importing all the
images in one file this is called
index.js and from here I'm exporting so
it's become very easy to get the images
without typing the code over and over
again okay so here you will find all the
images we have import so we have the
collections and background images we
have the user images and we have this
logo and here finally we are making
default export so we can easily able to
access this images in any component okay
which you will find that how we are
going to access this okay so that's the
index for the images let's close this
one let's close this as file and here
we're going to import the images
and that's coming from dot dot slash
so in this way we can easily able to
access all the images all the images
so here we have the internal port and
now we can start working on our G j6
part okay but before that we have to let
me give this comment let's stay used it
okay and we're going to take a couple of
component initially it would be false
and this will call Help Center initially
we have to take another one it would be
and we have to take this U State use
State snippet and it will call Profile
initiated with B false okay we have to
take one more and this will call let's
say open sidebar and this would be false
so here we are taking the state for each
of this component because we have to
open and close it okay so that's why we
so these are the five states for the
now let's call it use com a state
and now we can start writing on the jsx
of our navigation bar okay so simply
remove this and we go to instantly
return it so I'll take a div it will
have a class and I call it style dot
navbar okay insert that we have will
have another debit will have a class
Napper Dash box Dash container sorry
so this is how I'm going to write the
jsx okay inside that we're going to have
another div it will call Style
navbar Dash container Dash left
so one our navigation is divided into
part one is the left section and the
other one is the right section okay so
this is the pattern I'm going to follow
for every single jsx every single
and the reason why I'm taking this
approach because if you want to convert
this into a bug templates so it's become
very easy if you want to convert this
entire CSS in perk template or if you
want to use SAS so SAS converter for
converting this CSS file to the SAS it's
become very easy for you as well so
so inside we're going to replicate this
and we're going to change this to right
and inside the left container left we're
going to write start writing okay so
we'll have our Dev it will take a class
and that will have a image component SRC
dot so here we have imported the image
and in that we have all the images so we
have to provide the dot and we have to
give the name images so here we have the
logo okay so in this way we can easily
and we have to provide the alt
text and we have to assign the width 100
and height is going to be 100.
so this is the image now let's come down
we'll take another div it will have a
class and then we'll call style dot
navigation bar left box input okay
so here we will have the search input so
we'll have a div inside that will have
another class style dot navigation left
and I'm giving this huge name because
you guys can understand that what
component we are using and styling in
you should always give descriptive name
that what exactly happening in the code
okay so in that way it's become very
readable for other developers and that's
what you have to keep in mind when you
are building your project so these names
looks like very big why I'm giving this
big name but it will help you a lot when
you will do the editing okay and review
a code so in that we have to take this
input and it will have a let's say type
is going to be text let's give this
bracket text and we'll have a
placeholder say search let's small
okay we'll come down and we'll have our
and it will have a on click property so
when will some so when someone type
anything and will hit the enter will
have to display those nft okay so right
empty callback function on click
and it will have a class as well so
I come okay here we have this div now
and we have to take the let me get this
and now we can start on working on the
right section okay and this right
section is going to be a little bigger
okay because a lot of components are
there all the components we have created
that's all we're going to display in the
right section so we'll take a div it
will have a class and we'll call style
Dot navbar container right and write
so each component will have a its
separate div okay so this is the
Discover component and that's what we
are doing here and that we have to
let's take a p and it will have our own
click functions and we will call the e
and we'll give this empty call functions
and here we call Discover okay so when
someone will collect our Discover
component will open okay so we're going
to create a function for this okay
just write the CSS and now we have to
and in that we're going to display the
Discover component okay so this is the
first component for our Discover Dev
and let's come here and let's write the
function for opening okay so let's come
and we are receiving that e okay so when
we'll call this function we'll able to
have this e and that E I want to
access the text okay button text and
HD inner text okay so when we'll call
this functions so when someone will
click on that discover or a Health
Center or a navigations we can able to
get that text and once we have the text
we want to match it okay so once we
match it and according to that we're
going to display the component okay
it will make sense just follow along
with me so here we have this text okay
and that's what we're going to Target
and we have to take a if statement and
if I will say if button text is equal to
discover okay so make sure you give the
same spelling which you have provided in
paragraph okay so we are matching with
if it's that then we have to Simply set
discover to true we have to open that
component and we have to set the other
so we'll call it set help sense help
and set profile false because at a time
we want to display open one component
not multiple components so that's why we
have to set other component to false
so this is how we can open to open the
Discover component and now we have to do
the same thing for other components so
I'll go little faster but in text and
this time we'll call it help center
and we're going to Simply copy this and
we're going to change the status so this
and we are looking for this will come
true and the rest should be same and
let's come down let's say else
and here we're going to say simply
so the rest would be false okay
let's copy this function and now we have
so let's come down and we're going to
call the function here simply replace
this and we have to pass this e so in
that way we can easily able to access
so that's the how we can open the
component okay now let's come here let's
take a dynamic block okay Dynamic block
discover is false then we don't want to
hide it okay simply cut this and paste
here so the discovery state is initially
false so this component would not
display but if it turns to true then
this component will display okay that's
the entire logic we are doing here
so that's the Discover component
and let's come up here and let's maybe
give this comment so you guys can
understand that which component we are
working on so this is a discover menu
come down here and let's start working
on other component so I'll call it help
right and we'll call it let's say Health
it will have a paragraph it will have on
click functions the same thing we have
to do pass the same function help
open menu and that we have to pass the E
and we have to type the text help
same thing we have to do here that's
let's come down we have to take this
Dynamic block help and we have to render
and said that will have this help center
component so this is our help center
comment out we'll take a we'll take a
div it will have a class and style dot
navbar write Dash notify okay
and we have to take this icon okay
because we are displaying the icon
so we have this it will have a let's say
class so I'll call it style dot dot
notify okay short name and it will have
a on click function and that we have to
call a different function so it will
have an error function and now we have
notification okay we're going to create
and let's create the function so we'll
take a const and we'll call the same
name open notification and in this we
sorry false then we have to set to let's
say set to notification to true
and we have to set other component to
so set discover set Health Center Falls
we have this set profile false and we
all the component else we have to set
this notification to false okay that's
and now we have to render this
notification component okay so
notification and we have to give the
name of the component slash component
okay so we have this component and
that's coming from here let's come down
and we'll take this div it will have a
class called style dot nav bar right
and in that we're going to render the
so it will have a dynamic so this button
is dynamic so in this we have to set set
couple of props because all the buttons
will have a different text and different
callback function okay so that's the
props we have to send in every button
component so we'll call it BTN text and
the name of this button would be let's
so this is how we are sending the props
so this is the button component we have
let's come down and we have to create
we'll take a div it will have a class
okay box so we are following this
box we'll have another div it will have
and in that we're going to render the
image so it will have a SRC we have the
images inside this dot user we're going
to take the one and we have to assign
the all tag it will say profile where
this is going to be 40 pixels and height
is going to be 40 pixels so this is the
perfect way that height I have found
while I was testing it okay so don't
think that I'm coming with this number
okay I have already tested this
according to the components and that's
what I'm typing here okay and it will
have a on click functions because we
want to open the component and we have
to create this function as well so I
will call it open let's say profile
okay so this is the function we have to
gonna open the profile and we have to
assign the class as well to the images
so simply copy and paste that okay
so that's the div and once now we have
to render the components so if profile
then we have to render the profile
and later when we connect with the back
end we go to send props inside this
component so we can easily able to
access so we can easily able to remove
this Dynamic static data with a dynamic
data okay right now we are not sending
any props but when we connect with the
backend we're going to change that okay
so that's our profile component now
let's come down and here we're going to
take this menu button okay and this menu
button will only display on a mobile
so that's why we are keeping this out
from this let's take it David will have
let's say navigation container right
menu right menu right and in that we'll
menu icon it will have a non-click
functions and it will have a function
called open site bar call this function
so this is the function we're going to
create and this function will open the
so that's the depth for the menu
so everything is looking good so far for
the snap bar and let's come down here
and here we're going to render the
and this sidebar only would be
displayable in the mobile device
and that's why we are keeping this out
so let's come here let's take a dynamic
if it's true then we have to render the
sidebar component we'll take a div
in that we will have a class style dot
and in that we're going to render the
and we have to set the couple of props
so in that in this we're going to pass
the state okay so we'll simply take the
bracket and that we're going to set this
props okay so we can easily able to have
and change the state of this sidebar and
close it okay so initially it will be
off when someone will click this
a list menu icon the sidebar will open
but in the sidebar component will have a
one cross button on which someone will
click it has to be close Okay so that's
the prop we have to send so we can
receive the props and we can make that
happen Okay so that's the whole logic
so that's the props we are sending in
the sidebar and with this we are done I
think we are done with that and now we
have to create a couple of functions as
well okay so let's come here so let's
come here and what is the function we
have to create we have to create this
list open notification function sorry
let's come here and let's create that
function so we'll take our open profile
it will be an error functions and we
is false then we have to set it set to
True okay and we have to make other
component files set false discover false
okay this is the profile else we have to
set the set profile to false so this is
and we have to create this open sidebar
so we'll call it const open sidebar
it will have an error function we'll say
sidebar menu is false we have to turn it
so this is where we can easily able to
call and open it okay so with this we
are done with this entire navbar GSX and
let's close this one as well close one
and this is the right left section okay
so here we have it okay so make sure you
should always organize your code and
so anybody can understand that what
company they are working on what are the
and we have given the revlim and you
have noticed one thing throughout this
entire jsx part I give relevant name to
each of the components so that's the
approach you have to take and that's
become very easy to identify okay
so everybody has their own writing style
and in the browser and let's try to
so you can see nothing is happening
so can you guess why this problem is
let's come back to the codator because
we have missed something okay everything
is looking good on this side let's open
this one close this component file and
now we have to go this into this page
and click on this app.js here
we have to import so our navbar and
footer is going to be in every single
page in our entire application okay so
instead of importing those component
individually in every single page we're
going to do Global import and that's
Global import we're going to do inside
this app.jss okay so once we import this
component and wrap the entire
application with this nav bar and footer
that component would be available in
so that's the approach I'm taking here
so let's do this comment internal
I'll call it import and we have to
let's say number that's coming from the
that bar NAB bar and let's come here and
we have to take a div inside that we're
going to take this snapbar component
close it and we have to copy and simply
so in this way we can easily able to
access number in every single page or in
so we have this one let's come here okay
we are getting an error so it says that
type element expected a string but it's
I'll not only teach you that how you can
write and build the smart contract and
build this nft Marketplace but how you
can debug the error in the project so we
having some problem in the nav bar okay
so let's come reload the browser and
let's try to see what's the problem uh
because sometime what happened that you
get error and the area is committed
previously and because of you haven't
reload the browser you have the problem
so make sure you always read the browser
and if you get the error more than two
times then you can come back to your
code and try to find out what's the
problem as per the suggestion you have
so let's close this one and let's come
everything's okay let's see in the
navbar health center we have this
notification we have this profile okay
we have the sidebar everything is
looking good no problem in these
and these components are also looking
good let's close this one this one
um what's the problem happening so here
we have in this okay the problem is here
so we are actually not exporting the
component from our component folder okay
so here we have to export that and now
so I hope that you guys are getting
familiar with this folder and file
structure and Import and Export okay so
here we are exporting the component
let's save it close this one and come
back to our API app.js file and this
time we have to import that from the
component index file okay so let's
remove this say import and we'll say
and that's coming from the component
and make sure you should give in this
so here if we click on this and here you
can see on the browser everything's
working fine we have this discover help
center import notification button menu
icons and home so all the component we
can easily able to render on our
application so that's working fine and I
hope you guys are happy to see that how
it's working and you can see we can
easily able to open and close okay
working fine now this is the nav bar
and that's coming from the component API
and if you want to navigate to different
pages simply press Ctrl and click on
that folder name as we have done just
now and you can able to open the
component okay here we are in this
so let's close this one close this one
and we are done with the snapbar.gss
so let's close all this and now we can
start working on the navbar component
so we are done with the navbar j6 part
now let's start working on the Discover
so let's click on this let's click on
Discover and now we can start working on
let's import couple of things so it will
be internal import we have to import the
CSS file import style from dot same
directory and we need to import couple
of things so we need to have a link and
that's coming from next link okay
so that's the internal external import
and let's come here and here we have to
take a demo data so here what I'm going
to do is I'm going to take an array and
in that I will have the name of the page
so it will make sense okay so let's
give me the comment so I'll call
so I'll take a variable and I call
Discover and it will be an error and
inside this error a sorry array I'll
of every single menu okay so I'll take
and I will take the link and it will
have the same name but with lowercase so
make sure this is the convention I am
following and you must follow the same
convention because we're going to
construct the URL of the pages on the
name of this name we are providing okay
so let's create the all the menus okay
so simply copy this paste the comma and
we have to change the name to let's say
search page we'll have the search copy
and paste and we'll have this one author
profile page and we have this author
paste here and this will become the nft
detail page and this will call nft
this become the account setting and this
comma let's come down and this will
become let's say connect wallet so we'll
have a separate page for connecting
wallet where we provide multiple options
used to the user to connect their wallet
we can call it block and we'll have a
so this is our the entire discover menu
so these are the menu we're going to
display in our display discover
component okay so now simply copy that
instantly written we'll take a div and
inside that we're going to Simply Loop
over the entire discover menu so we'll
okay element I It's Gonna Be an Arrow
function we have to instantly return
this and in this we're going to let the
structure of our navigation okay so I'll
and it will have a class X or a key I
plus 1 because every single menu will
if you don't provide this you will get
an error from react okay and we have to
add a class as well so I'll take a class
and we want to take this link and this
link is coming from next link you can
anchor tag but here I'm taking this link
tag which is available on that
and I'll take this href and here I will
provide the path and the path is
available we have in inside this element
so we have this we'll take this Dynamic
block and pass this LM dot link
and that way we can easily able to
access the link in the array object and
is not going to be the self-closing leg
we have to take this normal closing link
and let's provide this one close this
one and in this we're going to pass the
name of the link page okay so we'll say
lm.name okay so if we save that we can
easily able to render the entire
discover component on our application
so it's working fine now let's come back
to the application you can see here we
have the logo import search discover
help center and help center is rendering
twice okay let's see why it's happening
we have notification button image and
menu and home components so what we can
do let's click on this help Okay so
let's click on this discover and you can
see here we can easily able to open the
Discover component and we can easily
able to see all the pages we have
created navigation so collection search
author details accounts connect wallet
and bigger Block open if you click on
this you can open close so this function
so all the pages are working fine okay
let's come back to code editor
so this is our Discover component
working fine so that's the only thing we
want to do here I'm not going to style
right now we're going to let the
foundation and we're going to style the
entire component in one go okay we are
just building the foundation and
so let's close this one now we can start
Center and same thing we have to do we
have to import the link from next links
and we have to do the internal import
for our CSS file so I'll go a little
faster here because we are going to do
so it would be style and that's coming
from dot slash help center modules
okay we'll take this const help center
and we'll have this Dynamic block and
that we're going to let the foundation
and we have to provide the link about
and this will call name is going to be
us will have another which we want will
okay now we'll come down we'll have this
and we'll have this subscription
and this one is optional okay if you
want to create and provide certain extra
features to the creators nft creators on
your application you can do but I'm
going to take this approach and I will
provide a subscription option as well
okay so this is the component this is
the menu we're going to render okay
we have to do the same thing close this
one and we're going to render that as
well so simply remove this one take a
div it will have a class called side
dot box and inside that we're going to
render the our menu so element I is
gonna be instant return will have a div
it will have a class and we call it
and we'll have a href we have to provide
the path which is inside the help center
and in that we're going to take the
element dot link and we have to render
close this one if we come back to our
application you can see right now we are
opening the Discover but if if we renew
and you can see the states are too false
so that's why we can able to we can't
see the components but if we click on
this discover we can open it if we click
on the help center we can able to see
all the menus so about contact us sign
up sign in and subscription so our
Dynamic component is also working you
can easily able to switch open and close
let's come back to the code now come
here close this one and now let's start
working on the notification component
okay we have to import couple of things
so first one is going to be the image
coming from next image now we have to do
and we have to import the CSS file which
and we have to import the images itself
and that's coming from dot dot slash dot
dots in the image folder we have okay so
this is the internal and this is
externals and now we can start working
on the actual jss component of our
navigation bar okay notification sorry
we'll take a div and we'll have a class
and that we will have another P tag and
it will say notification the message and
it will have a div and that will have a
and it will say notification Dash box
and that we're going to take another div
it will have a class dot let's say
notification box image and that will
have this image component will provide
the source which is inside the images
folder file and we want to take the user
so I have given the name user one user
2. so when we want to change the data
all we have to do is to change the
number and with that changing that
number we can easily able to display
you will see how we are doing that
and this approach is also really good
because we're going to give the same
name to every single user who will
create the date create the profile and
nfts and we're going to store the data
their profile details in their backend
in the same format so it become very
easy to render the data okay but that's
the different topic for the backend
developments let's work on the GSX
and template we'll take the alt and
we'll call it profile image we'll have
to try the bid width is going to be 50
and height is going to be the 50 and
so that's the notification we have
and in will have this class now let's
come down we have to take a div and
we'll have a class and style Dot
notification box info so in this we go
to show the information about the user
so first we'll take H4 and it will call
it the name of the user I'll call which
is uh Bhai and he is my younger brother
and I have to display the address of
that of the user so I'll call it measure
I'll try this short message okay and
we're going to display the instead of
providing those address we can provide
the short message short notifications
okay now let's come down we have to take
time okay and this time we'll keep
update on the base of the notification
period so when they have got the
notifications so right now we are doing
this hard code but when we Face the data
from our API on the base of the entire
functionality this entire data will
change dynamically for different user
so this is the component we have now
we'll take another span and this span
and call it notification Box new and
we're not going to add anything inside
this span because this span is only for
styling purpose we want to show the
display that that blue Mark okay Blue
Tech that this is a news new sorry new
new notification okay so this is one is
so that's the notification component we
right now we are displaying one
component but when we have the data
so that's what we have notification now
come here so this is the Discover
company if you click on this we can open
that discover component if you click on
this Bell icon you can able to see all
the data the image the name the message
the time so this notification component
was also working open close open close
so everything's working fine
let's close this one let's come back and
let's start working on the profile
so we're going to import couple of
things so first one is going to be the
image from next year's now we have to
and us for user alt and that's coming
from react icon slash font awesome fa
short form for fa I know we have to
import the FAE let's say rage image and
we have to say fa user edit so these are
the icons we want to import from for
Dawson and that's coming from react now
and MD Health Center and that's coming
from react icons slash MD we have to
import one more and this is coming from
off and that's coming from react icon
slash TD TB sorry and one more we have
to import which is called T download
TB download okay so these are the icons
we are using in this user profile
now let's do the internal import so
and that's coming from the same
directory slash profile modules so I
believe that you guys are getting
familiar okay so I'm going a little
faster here so we have to import the
images that's coming from dot dot dot
dot slash dot dot dot dot and images so
we have the images here now so these are
the external import but I have to do one
okay so these are the external report
now let's come and start writing on the
so we'll take this instead return we
will have this div it will have a class
style dot let's say profile with small p
we'll have another div it will have a
style dot profile bar account and that
will have a image where you have to
image user one all tag let's call it
a profile and we have to provide the
width is going to be 50 and height is
going to be 50 and it will also have a
style also so let's call it profile
we have to apply this style now let's
come down we have to take a another div
profile Dash account info and that we
have to take this P it will call the
and here we're going to display the
address okay so right now I'm just doing
this hard code okay but we're going to
change this data and not dynamically
the user account address and username
now let's come out of that div
we'll have another div it will have this
sorry Dash menu okay and that will have
another div it will have a class called
no one and it will have a class let's
now we have to display the icon so for
user Alt and we have to take this
message so it will have a link and that
we're going to provide this href we have
to provide the path so let's say path
so we want to redirect to the my profile
page okay and I'll call it my profile
simply come here and simply copy this
component okay this item component
and we're going to have four more okay
so simply replicate this one more time
and we have to change the icon so first
change this name to my item change this
icon so we're going to call this fa
user image okay simply copy and
and we have to change the icon so it's
fa user edit and here we have to change
and that's the three component now let's
come down let's come out that of div and
let's come out that come out of that div
because we want to add a border okay
between the first two menu a first three
menu and the last menu okay so that's
what we are doing here we'll take
another div and let's say Style
profile menu 2 and in that we'll have
another name it will have a class called
item the so make sure you give the same
name the name you have provided above
because it going to apply the same
okay in that we're going to take this
icon so help center and we have to
display the paragraph message inside
that paragraph We will take this link
will provide the href attribute
so the path is going to be let's say
but if you want to redirection so
the page name is we'll take this Dynamic
block and we want to redact to the help
and in that we're going to say help
DD download and here we will be
so in this way we can we'll provide the
user to logout from the metamask okay
and we have to change the path as well
and things are looking good here we have
to change the name as well edit profile
and this will become say my items
I think what we have to do for this
profile okay so it's looking good
so here we have this one and let's come
and now we don't have any error that
means we are going on a good path so
let's click on this image and here you
can see we can easily able to render the
entire data about the user so name
address icons profiles so all the data
all the menu again is able to display
here so the functionality and the
project is also working fine we can open
with this we are done with this
okay if we find that we have to do any
modification we can definitely come back
to the code okay and that's the entire
process of building any applications so
check this one more time and working
fine let's close this one come here and
let's start working uh let's come here
the notification we are done with that
close one let's start working on the
and this one is going to be a little
first thing we have to do is to import
couple of things from react so you first
and we have to import the images
and we have to import the let's say link
icons so CG close the cross icon and
that's coming from react slash g r now
we have to import the let's say social
media icon so we'll say TI social let's
okay Facebook icon and that's coming
okay so we need we're going to display
and that's what we are importing
and that's all I can we are finding from
this tdti okay if you want to know about
all these providers you can simply visit
react icons and there you will have the
complete documentation that how you can
utilize this and what are the what they
are providing okay so we are going to
use simply we're going to import the TD
social and this one is going to be
called LinkedIn we need to import the
let's say this one is going to be
now TD social we're going to import
and the file was going to be TD social
um we want to add one more with TD Arrow
short down okay so these are the icon we
are importing and that's coming from TI
all the social media icons and this
arrow down because we want to show that
Arrow up and arrow Downs when they will
so that's the I can import you have to
import one more so TI Arrow shorted
shorted up so we have up and down both
the icons so all the icons we have here
let's come down now we have to do the
so we're going to say import style and
that's coming from the same file we have
and that's coming from the images folder
we have to import the button component
because we want to have button in the
sidebar so we'll have a button that's
coming from the button and button itself
okay this time we are not importing from
the context a component context we are
importing for the button component
itself okay so that's all the Imports we
let's come here and now you will find
that we have to display the same menu so
we have to display the Discover menu we
have to display The Help Center menu
okay so those all things we're going to
so let me give this comment I'll say use
state so we're going to take that couple
and it initiate will be false then we
have one more we'll say open help
here we have to take that discover okay
so this discover will have the menu and
the link so it's going to be an array
same thing what we have done in the
Discover component okay so what we can
do we have this already available to us
so we can take that and we'll call it
name we'll provide the name so we can
and we already have that so let's come
back to discover okay discover component
and simply copy from here okay simply
copy entire with comment and we're going
to paste here okay why we should write
paste here we have all the data now
we can have the Discover menu
do the same thing for the help center
come back and simply copy this and come
and this way we can have the navigation
menus and let me give this command this
will call Help Center okay so we have
we are working fine now let's start
working on the j6 part we'll take a div
it will have a class called style Dot
and that will have a on our icon so
we'll have this cross icon so we'll call
it style dot sidebar Dash close ptn
and it will have a on click function so
take this error function and we're going
so close sidebar so this is the function
and let's come down we're going to take
another div it will have a style Dot
dot let's call it a sidebar Dash box
in that we're going to take this image
and we have to display the logo so we
have to take the SRC image dot logo we
have to provide the altax logo with 100
150 and height is 150 okay little bigger
than normal okay so this is the logo
let's come down we have to display this
message so we'll take a discover the
outstanding articles on all the topics
on story okay and share them I just gave
this random random text you can type
anything as per your nft Marketplace or
you can give your name okay so I've
given this random text so let's start
working on it so we'll come down we'll
take another div and I will take a class
it will say like sidebar Dash social so
in this we're going to display all the
social media icons okay so we're going
to take this anchor initially we don't
want to redirect because we don't have
any social media account for this nft
Marketplace so without redirecting that
and in that we're going to display the
icon component okay so first we're going
to we have Facebook second we're going
let's say social media LinkedIn
and third is going to be our let's say
let's say social insta Twitter okay
we'll take this and that we're going to
display this now the icon we have to
YouTube and lost I can we have to
display is is the let's say what left we
have left this Instagram okay so these
are the five social media icons we are
displaying now let's come down we'll
take a div it will have a class let's
say style dot Side Bar and menu okay and
this we're going to have another divid
will have a so in this day we're going
to take another div and inside that day
we're going to take another day that
will have a class called sidebar uh menu
Dash box okay and that let's say we'll
have this on click functions okay and
we'll have this function called open
menu okay so this is the function we
have to create and this will open the
many components so we'll have this P
we'll call it discover and here we have
to display the arrow down short button
okay I hope everything's making sense if
someone will click on this we have to
discover component okay so let's come
we'll come down we'll take a dynamic
block if we say if open discovered then
we want to render this component we'll
say take a div and let's close this one
let's say sidebar Dash discover
and it will have this discover.map LMI
instantly return we have to take a para
plus 1 and and that we're going to
and href we have to provide the path
and this link the data we have inside
this so we'll go to lm.link and here we
have to give the name of that menu okay
which is not name okay so in this way we
can easily able to render the
now let's do the same for other
component we'll take a div and inside
the div we'll have another div it will
Bar menu box and it will have on click
functions we have to call this function
same thing we have to do we have to take
a P tag and here we have to type the
test help center we have to take the
and arrow up down sorry and here we have
okay now let's come down and we have to
Simply render The Help Center component
okay now we will take this Dev
and I have applied the same name to this
help center component as well because
we're going to style the same we're
going to use the same styling for this
so in this we're going to render this
data so LMI we have to instantly return
in this in this we'll have this
paragraph it will have a click function
and it will have this link we have to
and we have to take this lm.link and we
have to give the link name of this link
so this is our sidebar menu okay
working fine with this Dynamic menu now
we have will take another div and it
will have a style so we'll call it side
let's say a button okay we'll have two
buttons one for connecting wallet and
so we already have this button component
so that's what we're going to import
and in this we're going to pass the
button name okay so this will call let's
and we'll replicate it and we're going
to change this to connect wallet okay so
these are the two props we are sending
in the dynamic button component so let's
and here we have it now we have to
create the functions which we have
so let's come here here we go to receive
the props so as you remember we have
send the prop in our sidebar component
navbar.jsx okay so that's the what we're
menu okay and this props we are
receiving from here here in the
navbar.js and here we are sending that
prompts okay so that's what we are
so in this way we can easily able to
change the state from our sidebar
so here we have that copy and simply
so this is the state we have received
the props and now let's close this one
come here we'll create the function so
let's come down the first function is
going to be this discover menu okay
we'll call it open discover menu Arrow
open discover then we have to set this
okay this is the first discover for
discover menu and now let's come down
let's create the other function so the
first second one we have this open help
so open help menu and same check we have
false okay so this is how we are
changing the state now let's come down
we have to take another one close
Side bar so we'll have this cross button
okay and that we going to Simply copy so
this is the cross icon we have a click
function on that this will close the
and in this we're going to call this
props so the props we are receiving in
our sidebar that's what we're going to
call here so set open sidebar menu and
we'll turn it to false okay so that's
Prof here we're receiving okay that's
so finally we are done with the sidebar
so let's have a final look and things
are looking good this is the react
internal import our functions new States
and here we have the functions
and here we have the j6 so close this
and let's come here and let's try to
and just wait and everything's working
fine we don't have any error so let's
come here let's click on this menu and
as you can see it's working fine we have
this cross button we have the image we
have the description we have the social
media icons if we click on this close we
can easily able to close it okay
if you click on this we can open and
close so our all the function is working
fine close this one click on this
and we have this help center so walking
all the functionality everything is
and you will find that how easy it's
become because generally what we have
done we have built the complete layout
all the functionality so when we get the
data from our API all we have to do is
to replace those places where we are
renting the data to the actual data and
the entire thing will happen so when we
combine the smart contract and the back
end on that type of things will happen
very fast because we have followed the
right structure for this project okay
now what we can do let's come here and
let's close all these files close this
one close this so this is our navbar
and let's come here and let's see
so everything's working fine let's come
here and now we can start styling our
so we'll come here and we're going to
so let's come here I'll make it side by
side so you guys can see what's we are
working on and hope this will give you
an idea so this is on the right hand
side you will have this display where
you can able to see all the changes and
on the right and on the left hand side
you can able to have this code okay so
we'll Target the nav bar and it will
have a width to 100 will have a padding
to padding block is going to be 1.5 Ram
will have this position relative Z index
is going to be on top of everything so
one one give us the highest number now
so let's come down let's target the Nam
container and it will have a width to
margin 0 also display is going to be
grid and grid template column repeat to
1 FR okay now we'll have this allytech
align item is going to be centered and
we have this justify content space
between and GAP is going to be let's say
one ram so why these stylings are not
I have on auto save but it still is not
and so I made a mistake make sure you
give the right spelling so my navbar
container spelling is wrong so let's
simply replace this with two actual one
so nav bar container and now you can see
all the things is working fine okay
we have divided in two parts now let's
come down and let's working on it so
we're going to Target that nav bar
we'll say display is going to be grid
and grid template column 1fr and 2fr
and what if I is going to be for the
icon and 2fr is going to be for the
input okay a line item is going to be
now let's come down we'll Target the nem
box and where this is going to be 60
border is going to be one pixels solid
and we're going to use this our custom
color okay right now we don't have this
custom color in our project we're going
to write that custom color we're going
to use in this project and here I try to
do a little bit changes in the project
so the first change I want to do is I'm
going to create only light mode okay not
the dark mode okay the entire thing
would be same but I'm not going to add
this dark functionality but I'm going to
set the stage for you and the reason why
I'm doing it because you have to know
that how you can work with State okay So
currently I will build the foundations I
will let down that the color of this
project and I will tell you that how you
can change that state into a dark mode
and that's what I'm going to keep it on
so I'll keep that dark mode for the end
okay so when we'll build the entire
template and then we're going to include
that dark mode okay so don't need to
worry about it so we don't have the
color so what we can do first we have to
define the color before we can add it
so let's do one thing here come back
here go to this close this component
file go to close this one as well go to
this style folder and that way in This
Global CSS here we're going to Define
our custom color okay so simply bring
this is the Ford family I'm using it's a
Google font so when you will download
the startup folder you will get the
colors and the fonts which we are using
so here I'm using pop-ins in this
project and I'm using like from 100 to
900 the boldest okay so I'm using
poplinks and we are importing the gold
so that's the first import we have so we
are not using any framework for styling
our entire application we're going to
write the custom CSS okay so that's why
we have to define the custom colors as
so we'll take this route and this is how
you define the colors in your Global CSS
file as using root property okay
so I'll give this notation I'll say icon
color and I'll give this color so 4C
and what I have done I have changed the
color of this complete project as well
okay so I'm using different color so
this is the icon color we have now we'll
and this color will have this 4C 5
double seven three four one okay this is
the icon light color light color we have
now let's come down we have to take this
PG color and the E to e 6e9 we'll Target
and the color would be let's say hash D3
d a E7 okay will have a shadow so the
color is for that now we have to take
another second Shadow so this will call
and we have completely white and now we
have we will have the main color of this
application so main BG color will have
now we have to take this box Shadow and
you can add it normally but here I'm
taking as a variable okay so when we'll
add the dark and light mode we can
easily able to do the entire state of
one ram one ram we'll use this wire and
in this we're going to take this first
color so this is the shadow dark color
and the second is one is going to be
minus one ram minus one ram one ram and
where and the second color is going to
Shadow dark color both are the same okay
let's come to the second box shadow
so we'll call it box Shadow too so this
will have a zero from zero Ram zero and
we'll have this bar minus Dark Shadow
and minus 0.3 RAM and 1 Ram will have
where our custom color dark shadow okay
and you might be wondering that from
where I'm getting this magical numbers
okay so these are not magical number
I built this application and from there
I found that these are the Shadows Works
suitable for the component okay
so these are the back Shadow we have all
the colors and once again I tell you all
these colors are provided to you on the
article so if you're stuck you can get
so this is the root colors this is the
let's come here why it's the big okay
and here in this we're going to do a
couple of configuration as well okay
so couple of changes we're going to do
in our application and the changes we're
going to do in our Global CS file
so let's come here so first thing we
want to do is come to this the star and
webkit tab okay highlight To None okay
color done so when someone try to select
any text or any images so sometime what
happened that we see that blue Mark
around the images or around the text so
we don't want to have that in our
application so let's make it none
okay and these all properties are
available so if you want to know about
it simply type webkit properties you
will find all the properties and you can
okay now we want to add the selection
okay so when someone select any text we
want to specify a particular column
which is the primary color so I'll call
this shade dark color so this is the
and we have to change the background
of the text okay so we'll add this add
this icon color so these are the two
main color we have in this project so
when will someone select the color
select the test it will have a different
background color and different text
so this is the selection now let's come
and this time we're going to Target the
scroll bar so we're going to add the
custom starting to our scroll bar we're
not going to use the default one okay so
we're going to assign the width is going
to be one wrap and border is going to be
let's say one pixel solid and where and
we're going to add the custom color
which is the main BG okay let's come
will simply going to Target that webkit
and it will have a background border
radius to zero okay now background color
is going to have that main BG color okay
and we're going to Target that webkit
so we'll have this scroll bar
and thumb okay so this will have the
let's say border Radius 2 RAM and
background color is going to have this
our let's say let's add this one so this
is what we have in a style okay in the
design component okay I can color
and we go to assign a width 2.5 Ram so
so this is the some Global setting we
are doing for the selection for the side
scroll bar and for the tabs and for the
so let's stop this application for
application to check it's working so
click on this 3000 and this will open
into a new tab just wait let it complete
the process loading loading loading
everything is working fine this is how
so this is the home component you can
see the moment we are selecting we
having the main color at the background
and the text is changing its color
so if we click on this notification we
have this you can see it's working fine
and you can see on the sidebar we have
this scroll bar and it's styling okay
it's working fine so whatever styling we
have applied as a global styling it's
working fine in our scroll bar
and our test selection so let's close
this one let's come back here bring the
and let's come here close this one and
let's start working on our navigation
so now we're going to add the color so
let's make this side by side so you guys
can understand what we are working on
and here we're going to provide the
provide the color name so dash dash icon
so you can see the color is changed now
we'll take this display is going to be
Flex a line item is going to be Center
border Radius 2 RAM will take this
navigation container left box input and
input itself we're going to assign with
100 90 and model radius is going to be
what is no depend on outline is going to
be none and background color is going to
be transparent okay so this is how it
will look looking perfect let's come
down we'll Target the let's say
search icon and we'll say cursor pointer
fonts size going to be 1.4 Ram
okay why the styling is not taking place
on the icon I think we have made a
and let's see where is happening so
let's come here in our navbar.jsx and
let's try to find out the error
and as you can see by providing this
long name it's become very easy to
identify on which the problem is
happening okay so I'm not cutting this
project okay so you guys can understand
that we all make mistakes and we all
debug code before we get ready for this
production level okay so let's try to
find out the problems so let's open this
so where it is where is the icon
and here we have the search icon oh
sorry I forgot to add the I I see simply
and now let's save it copy and simply
come back and replace this one
and save it now you can see we have this
cursor pointer and font size is also got
so this is how we have to debug okay
let's continue let me give this comment
section okay we're going to type the
and display is going to be grid grid
template column is going to be let's say
a 1.5 FR 1fr and going to be 0.3 FR okay
so on the right hand side we're going to
five component so we are declaring this
so this is a hardware look you can see
we have everything is aligned perfectly
now let's come down we will take a gap
to one ramp we'll have a align item
Center we'll take this align serve is
let's target the net bar container right
and we'll have a position relative
we have to do the same for other
Network container right help sorry and
pointer and cursor pointer relative okay
come down we'll Target the network
a box and it will have a let's say an
under window is going to be let's say
so both will have this position absolute
absolute padding is going to be one ram
let's save it come down we'll have a box
Shadow or we're going to use this box
variable and now we have this font size
going to be one ram where this is going
to be 15 RAM and model it is going to be
one ram and background color is going to
be dash dash main BG color okay let's
save it and you can see this is how
everything is aligned so let's come here
this one is also working fine and you
can see okay we have some problem in the
our root color okay but everything is
so as you can see this discover is also
working and this health center is also
I think we have a problem in our box
Shadow and the color we're going to fix
that later let's work on the normal
so here I can notice through problem we
are having we're having the Box Shadow
problem and we're having the main
primary color problem because this is
not the color we are using in this
project okay so we're going to change
that okay so let's start working on the
let's Style Style it okay we're going to
do this changes slide okay and the
reason we can easily able to do this
we have used the color as a root so
whatever changes we'll do in the root
color the automatically that changes
will apply into this entire place okay
entire application let's come here and
so we're going to take this nav bar
and position is going to be relative
cursor pointer let's come down we're
going to Target the Y and it will have a
font size to 2 RAM a little bigger and
we'll Target thus right container right
button and let's say it's going to be
position relative cursor pointer
profile box and it will have a motion
relative and cursor pointer okay now
let's come down we're going to Target
that container right profile and
this will have a border radius to 50
percent and let's come down we're going
to Target this nav bar right menu button
and it will have a display none because
we don't want to display that menu
button on the desktop we won't display
only on mobile phone okay mobile phone
so we'll display none and let's target
icon and we want to increase the font
size okay so let's make it 2.5 Ram
little bigger and cursor is going to be
so let's save it let's come back to the
you can see everything is working fine
click on this button and this one is
also working fine we have this circle
image okay things are looking really
and gradually we are developing this
application and it's taking shape okay
so that's the one we have here now let's
let's start working on the sidebar okay
and we'll have this position is going to
and right now you can't see that let's
have this top is going to be zero width
is going to be 45 RAM and background
color is going to be this our main BG
color and we're going to have this let's
say box Shadow we're going to have the
box Shadow variable and we're going to
have a 100 height sorry vwh and overflow
Y is going to be Auto because we want
the user to scroll on the x-axis okay
so we're going to have a display is
and z in this going to be the the
highest number so it becomes on top of
everything close this one and let's come
here we'll Target the sidebar sidebar
webcat and we don't want that scroll bar
so we'll say displayed on okay
well let's add a media query so we'll
width is going to be let's say
the 320 pixels and the next one is going
to be Max is going to be let's say
768 pixels okay so that's the mix Min
and Max with we want to Define
for this navigation bar now let's later
a little bit media query for it so we'll
in that book container grid template is
going to be a 1fr and one f r okay
equally we're going to divide it now
we'll Target the net bar container left
it will say grid template 1fr okay and
in that will simply will take a great
template column repeat three component
we're going to render but all together
right now we have five okay so we're
going to hide some of them component on
a mobile device and those component
we're going to display on the in the
and you can see this is how it's look on
on a desktop let's do the inspect
click on this mobile device and bring
drag it okay why it's not working it's a
bit drag this one and click on this so
you can see this is how it will look on
a mobile device so for media query we're
going to use the spread Point okay so we
are starting with mobile 320 pixels so
these are the breakpoints which is
already given in the in the Chrome
browser and this is the big point we're
let's bring it a little ahead you can
see everything's working fine
so it's working fine okay let's come
in the media query and we're going to
hide couple of things okay so first
we'll Target the nav bar container that
menu button okay displays lock because
we want to display the button navbar
we're going to Target it uh let's say
will Target the box and image input it
will be let's say display is going to be
the input now we'll Target that right
discover component we want to hide that
as well done and we want to hide the
help center as well so write dos help
display is going to be done okay let's
save it let's come down we're going to
button and we want to hide that as well
so display is going to be done save it
let's come down we're going to Target
that sidebar and we'll make it display
to block okay so let's come here
save it come here in the mobile device
as you can see everything is working
fine we have this icon display we have
the user image we have the notification
Bell and we have the logo okay so media
queries also okay fine and we can open
and we can close open close click on
this we can close this working file okay
everything's working fine close this one
let's come here go to this discover and
let's start styling this discover
component okay we'll Target the Discover
I think it's going to be 0.5 RAM and 1
text transition is going to be all 0.3
we'll have Z index is going to be
biggest number and we'll have the
sidebar on over effect we want to
provide a background color to this our
and we want to change the text color to
let's say shadow dark color and model
radius is going to be 0.3 Ram so let's
compare and let's click on this you can
if you click on this we have this nice
over effect and macro color is also
changing so let's come back so our
router is also working fine
okay let's make our desktop mode click
on this as you can see on over effect we
are getting this nice effect this is the
same thing we have to do for those
help cultural let's come here close this
one let's go to the help cut error CSS
file and let's start working on it
help center and padding is going to be
Health Center over effect will have this
let's say background color to our icon
now we'll have this color too
our box dark color now we're going to
Target this border radius 0.3 Ram okay
so this is our help container close this
and now we can come back to the
applications and have a look
as you can see everything is working
now we can work on the notification okay
so let's make it side by side click here
and go back to notification and let's
start working on notification CSS okay
we'll Target the first notification and
position is going to be let's say
is going to be 2 RAM and 1 Ram
where is going to dash dash box Shadow
we're going to use the font families to
with is going to be let's say 2 25 RAM
and Border radius is going to be one ram
save it let's come here you can see now
it's looking good okay it's looking good
let's come here make it left it's going
to be minus 20 RAM and top is going to
be 3.5 RAM and Z index on top of
the background color is going to be
color Okay so let's save it okay it's
okay now let's come down let's target
P all the p and font size is going to be
font width is going to be six dot rate
margin bottom is going to be 2 RAM
notification box it will have a display
Gap is going to be what wrap and padding
transition all 0.3 second and Easy in
okay so this is how it will look okay
notification box all over effect we want
to change the background color to our
and we want to change the text color as
well so this is going to be our shadow
uh what is the name of that shadow
color Okay save it now let's try the
Border radius 0.3 Ram okay as you can
see on overflow we are getting this nice
effect let's come down and we'll Target
and it will have a border radius
and it's going to be a line attitude
margin top is going to be minus 0.8 Ram
so now it's looking perfect you can see
let's come down I'm going to Target the
H4 and font size is going to phone with
we'll Target this notification info
paragraph font size is going to be 15
line height is going to be 0.3 and
let's say position is going to be
let's come down we'll Target the
our span which is a new okay well that
width is going to be let's say 0.5 Ram
height is going to be the same 0.5 RAM
and background color is going to be this
but it is 50 percent and background
color for timing let's type this one
Aqua okay that's the color we are taking
for as a temporary but we're going to
so as you can see it's working fine
whatever effect we are getting the
so this Navi the notification component
let's come here and let's write the
media query for it so we'll say Max
width is going to be let's say 35 am and
notification is going to be with is
and left is going to be minus 15 Ram
notification box is going to be padding
notification box p and fonza is going to
be 12 pixes so as you can see it's
looking perfect for the mobile devices
so it's working fine let's make on a big
and this is how it will look on a full
it's look quite big but we're going to
make things everything is working fine
this notification is also looking good
now we have to work on the profile okay
so we have thing we are done with this
close this one come back and just start
working on the profile click on this
profile modules CSS okay this is how it
will look on a mobile device okay
I have opened my inspect element and
make sure you open your own as well
okay these are the things it's working
really good we'll Target the profile so
and profile position is going to be
absolute and padding is going to be 2
box Shadow is going to be where
box Shadow okay font size is going to be
word wrap width is going to be 20 Ram
border radius one wrap left is going to
be -70 RAM and top is going to be
let's say 4.5 RAM and set index highest
number and background color is going to
be our simply primary color
s save it now let's click on this you
can see everything is looking fine okay
but we'll fake this with the media query
okay so that means everything's working
fine okay this is our profile section
let's come down we'll tag this profile
display is going to be Flex a line item
start Gap is going to be 2 RAM and
padding is going to be 1.5 Ram so
looking good let's come down we'll have
so border radius is going to be 50
percent 30 percent profile account info
light height is going to be 0.3 Ram
and profile account info p font where
this is going to be 600 profile menu
one item so this will have a display
Flex okay this is how it will look
and padding is going to be 0 Ram 0.5 RAM
and text transition all 0.3 easy in okay
item over effect and we'll say
background is going to be our let's say
and the color of the text we're going to
let's say dark and color okay
and we have to assign the Border radius
point three Ram so as you can see on the
over effect we are getting this and our
router is also working on mobile device
let's come here reload the browser and
you can see this one is working fine
this one is also looking good this one
okay the profile section is looking good
overactive effect is also looking good
and that's looking impressive
so that's how now let's close that let's
and go to this sidebar and now let's
so before we start working on that we
have to open this and we have to make it
visible okay so let's come here and
that's what we can do in the nav bar not
in the sidebar so let's come here in the
nav bar and here we have to make it to
we have initially initialized to false
not let's make it to True okay so this
will open the sidebar corporate and you
can see here it's open so here what we
have doing that we have set the stage
for the sidebar to false initially but
here we are providing this exclamation
mark we are turning to true and this is
ending the template okay sidebar okay
so let's close this one and come here
and let's go to the sidebar and let's
as you can see it's working fine
the software or mobile device
okay so things are taking place okay
let's come here and let's start working
on the CSS of sidebar we'll Target the
and it will have a padding let's say two
Ram it will have a border bottom one
pixel solid fare and we'll add our icon
save it working fine so working fine our
color border now let's come down
close video and the position is going to
be let's say absolute and top is going
translation all 0.2 second easy and out
okay and cursor is going to be pointer
and it will have a box Shadow too where
so this is how our sidebar would look
okay looking fine we can close it we can
down and we have to Target that sidebar
close bit here or over effect we want to
apply some styling so we want to
transform rotate that close icon to buy
45 degree so once you click on that or
over your mouse it will rotate okay you
can see that let's come down and we'll
and will margin top is going to be -2
and we have to Target the sidebar social
where display is going to be flex and
GAP is going to be let's say 1.3 wrap
font size is going to be 1.5 Ram online
item is going to be Center so this is
now let's target the social sidebar a
and padding is going to be point
to RAM and Model 8 is going to be 50
in and display is going to be great
a on over effect we want to add a
so this is going to be our let's say I
can color and we want to change the
color of the icon itself so here we will
dark color okay we have to provide this
let's say box Shadow two one pixel solid
and this is what we have to provide
okay so let's expand this one let's make
a big on a full screen and you can see
on overflow we are getting the styling
so things are looking really great
everything is working fine but why this
the sidebar width is not working it's
taking full width so again we have some
problem in our code we're going to fix
that okay so let's come back to CSS and
keep working on the CSS style okay we're
going to fix that with problem later
padding is going to be too Ram
font width is going to be 500
and Border bottom is going to be one
pixel solid where and we'll have our
eigen color so you can see it's looking
let's drag it the sidebar menu box we'll
say display is going to be flex and just
if I content space between a line item
is going to be Center and cursor pointer
discover corporate and we'll assign a
it will have a padding 2 RAM
display is going to be flex and a line
item is going to be Center justify
contain space between so this is how the
button would look like as you can see
our Tabs are also working fine
okay open close open close we can do it
but the problem we have in the it's it's
taking complete width we have assigned a
width but it's not taking that width
so things are looking good so okay let's
do the inspect element and come back
here in the code let's close this one
and let's come here in that let's say
and here we are in the sidebar and let's
assign the background color okay
so to this entire sidebar we have to
assign a background color so let's say
BG color okay so here we have the
background color okay it's not taking in
the full color it's taking only in
single components so still we have some
problem in the code but we go to find it
so we have the color in our sidebar box
now let's come here go to the sidebar
and in this where is the sidebar here we
let's come here and close this one go to
double CSS and here in the nav bar we
have the sidebar CSS file so simply copy
that okay so here we have assigned
everything we have assigned the top with
background color box Shadow but why it's
not styling applying The Styling okay
so we must have in the problem in the
name of the sidebar okay here is the
problem we have it's a capital S we have
you can see we have the color you can
see the entire color is applied and this
is how we have the fixed width 25 Ram
with so the width is also applied and
the background color is also applied
so things are looking really good
you can open it close it we can have
this effect we can have this style okay
so our sidebar is also working close
and make it to false so our sidebar will
close this one close this one close this
one and so close this one open close
open close everything's working fine
click on full screen we have this
we have their help center we have the
Discover section we have this profile
and we have to style the button
come back to the code make them side by
let's close this one and go to the
let's work on the button components
so in the bottom component we're going
to import internal import so we're going
that's coming from the button
let's receive the prop so in the bottom
component we're going to receive true
props one is the name of the button and
the second is the function which we want
to add on the bottom okay so let's
receive the props so first one is we
have is button name and second one we
click these are the two props we are
receiving in the button component and if
you click on common to the navigation
and here in the sidebar we have taken
two button one create and connect wallet
but we haven't passed that handle click
prop so let's send that props as well
okay so copy that and simply pass the
and in this we're going to pass the
function okay do the same thing for
other button So currently we'll have a
empty function okay empty functions
we're going to add this function later
when we build a smart contract and
so this is the empty function we are
and that's what we are receiving here
okay let's come here go to the let's say
here we are in the nav bar and we have
one more button in the NAB bar as well
so let's come here number file and let's
try to find out where it is so here we
and here we have the component and
here we have the button component button
component so in this we have to pass
so this is the problem we are passing in
the button component okay now close this
one close this one and now let's start
styling the bottom component
so we'll remove this we'll take a
dynamic like we're going to return
instantly we'll have a tip we'll assign
let's say about a box and we'll have a
and it will have a odd click function
and that on click function we're going
to call the handle click okay pass the
handle click function okay and here we
so this is the j6 part for the button
that's the only thing we have to do with
here we can able to receive that okay
that's working fine now let's close this
one close this one and if we come here
you can see here we have that created
so the props are working fine okay
now let's close this one let's come back
let's go to the button style file and
let's start styling the butter component
I'll take the button and it will have a
background color to our let's say icon
color will have a padding one wrap two
border is going to be one pixel solid
where and will have the icon color and
will have also a font size to 1.1 gram
and curler is going to be let's say our
color and we'll have our cursor pointer
we'll take this transition all 0.2
seconds easy in we'll have the box
and we'll have this button and on over
effect we want to change the background
color Okay so the background color is
going to be our let's say main
background color and the color border is
going to be one pixel solid and we want
to change the Border color to Icon color
and we'll have a text color too
icon color as well so this is the
starting for the button component okay
if we come here you can see this is how
it will look working fine I think I
forgot to apply the Border radius okay
so what's this working fine okay
on over effect it's also working fine in
the final product we have this circle
our code and here we have to apply the
2.2 Ram okay so here we have that border
so it's working fine let's make it side
by side and do the inspect element and
this is how it will look on a mobile
device this button is also got Style on
the sidebar okay and that's the benefit
of using the component build one
corporate then you can use that copper
in multiple places with the same
stalling okay so all the stylings are
applying on our button but here we have
the problem so why there is two left
number and right left number is not
equally aligned so up and down they have
so let's have a look what's the problem
we have in it here we have the problem
in the number container right okay so we
have used a line itself I don't know why
I have used it okay so let's Commit This
add let's copy here and right now you
can see everything is equally aligned in
one line okay so it's looking really
our navigation is getting almost
finished so navigation is looking really
good we can easily able to redirect to
the different pages collection pages and
let's click on this correct wallet pages
we have this connect about us so our
router is also working subscriptions so
here we have the notification here we
have the profile so everything's working
fine we all the functionality is working
this is the original one let's come here
so all the logic is working fine we have
completed our navigation bar but there
are problems in this navigation bar
because this is not the primary color we
are using in this project so maybe I
have given the wrong color name so let's
do the couple of settings okay so let's
and close this one and close this one
all the files and let's go to This
Global CSS file okay in which we have
all this color okay so maybe we are
doing something wrong here in this color
so what I will do I will simply select
this entire thing and I'm going to
delete it okay and I'm going to copy
from my website for The Articles and I'm
going to Simply paste it here
maybe I have written the wrong spelling
so this is how it's look okay nothing is
applied no styling Supply because we
have removed all the colors and box
Shadow so this is how it will look
and I'm going to copy the Styles and
and come back to application as you can
see right now it's working fine so the
problem we had in the color okay in the
main color so maybe I have missed typed
which is very normal okay so this is how
we have this navigation we have a nice
and our box chat is also working Box 2
and box Shadow so you can do one thing
you can simply copy the code from there
or you can pause the video and you can
and this color will allow us to change
from dark mode to light mode okay
which we go to cover that that's the
topic for the later video okay so make
sure you do these changes all the colors
pick this exact value if you want to use
so let's come here and we are in the
substrate let's come back to the home
page and let's do the final test let's
click on this working fine now it's over
let's click on this help this is also
working click on this this one is a
little big we have to fix this okay here
this one is also working fine
and here we have to do a couple of
settings in our main body okay in the
body so we're going to set the font
family because we are using pop in so
simply remove and we're going to I go to
copy and paste okay so same thing what
I'm doing I'm using font family popping
sensorif and I'm setting default font
size to 14 pixels and the background
color is the main busy and the icon
color is this icon color okay so that's
what I'm doing so propels font family
background color and we have this color
for text save it come back and here you
can see right now it's looking perfect
you can see everything's looking perfect
so let's have a look all over effect is
cover is also working notification you
can see right now it's fix this problem
also working this part and let's do the
inspect element and check the
responsiveness so right now you can see
this is how it will look on a mobile
click on this notification we have this
we're going to fix this problem okay so
that means everything is working fine so
these are the small touch-ups we have to
do which will keep it for the latter
part okay but everything is working fine
okay so let's make it back so this is
this is how it will look open close and
here we can close this navigation bar
okay we have this navigation bar we can
open this we have the buttons
so everything is working fine all the
so there are a few things left in this
we're going to make it a little more
responsive okay we have to tweak with
play with the values of the notification
box profile box and we have to adjust
so everything is working fine you can
see in all the breakpoints we have added
you can see it's perfectly responsive
click here click here click here
and that's absolutely great close this
so we are done with this all the root
colors working fine let's close this one
or check the final notification profiles
so with this we are done with the
so here I'm back in my visual core
studio and the project I have open so
let's come here go to this folder folder
and then we can start working on the
footer so this is what we going to build
in this okay so we have this discover
help center and subscription so this is
the footer we have in the real project
and that's what we're going to build in
this okay so let's start working on it
so we're going to import couple of
things from react so first one is going
to be the image from next year's now we
have to import the icon so let's come
and go to the let's say nav bar inside
the sidebar inside the sidebar we have
already these icons social media icons
so that's what we need here okay simply
simply select and copy and come back to
footer and paste here okay we're going
to use all this icon in our footer
section so we have the icons close this
one and let's start working on it
so we're going to import couple of more
things so we need to have the re-send
plan fill and this is coming from
different provider which is a RI now
let's do the internal import so import
and we have to import the style sheets
footer and it's in the same directory
that dot and here we have the images now
component so we need the Discover
component and we need the help center
component so these are the menu we're
going to display and the same menu we
are using in the navigation bar so you
can see that how effective it's become
when you use the same component over and
so and this component is coming from the
nav bar in the index file okay
so all these component we have inside
the nav bar is sorry navbar index
so we have this number discover both we
have now let's start come here remove
this one let's return instantly and
let's take a div it will have a class
style dot footer inside that will have
another div it will have a class calls
inside that will have another divid will
have a class style dot footer let's call
and that we will have the social media
icon we'll take this image we'll have
our logo so image which is inside this
dot logo we have to assign the alt and
let's say how the height is going to be
100 and width is going to be 100.
so this is our logo now let's come now
let's take a P tag and copy the text and
come simply paste it so here we have the
and let's come here let's take a div and
social and in that we'll have a and in
this we're going to have our icon so
first we'll take the Facebook
now we'll take this for a second one was
going to be let's say LinkedIn we'll
take another anchor tag and and that
will have this let's say TI or social
now let's take the another one
let's bring this down and we have to
and we have one more let's come down and
now the Instagram is left okay so here
we have all the social media accounts
social media icons okay so let's come
back to the application and right now
you can see that I have already opened
this project on my browser but we can't
see the icons we can't see the Footers
can you guess why I have already
explained this in my navigation video
okay so if you don't know let me show
you why what is the problem we have
everything is working fine you can see
everything is working fine 100
now let's come here go back to this
click here and go back to the let's come
here closer go back to the pages and go
to this app.js so here we have to import
the footer we have not importing that
footer okay and that's why we are not
able to see that on our application so
let's bring this down and we have to
import the footer so we can import it
from the same component so component
index and let's import that footer so we
have the footer and let's copy and
call the footer so in this way this
footer would be available in the entire
and now we can have a look so let's come
up here let's reload the browser
and I have noticed that somehow I have
stopped my internal servers so let's
so let's come back open the terminal and
let's start the application clear the
terminal and let's type npm run Dev
so here we are getting an error so what
it is so it's related to the style okay
okay it's coming from photo modules
and okay let's back to the code bring
this down and let's come here in the
footer section and here you can notice
one thing that we are importing footer
CSS file twice I don't know how it's
come twice so we have to remove this
we are rendering twice everything is
look good simply remove this one
and now we don't have any problem so
save it come to the browser little bit
and just wait and here you can see that
everything's working fine we can easily
able to render our footer we have the
logo we have the text and we have the so
things are looking pretty good okay
let's undo the inspect element and let's
go and go on the mobile it's already
now let's come back to the code and
bring down and let's start working on
the other section of our footer okay
so this is the first section now let's
work on the second section we'll take a
discover menu okay so let's call it
discover inside that will have this H3
inside that will have this discovered
discover discover component and that's
what we have here now we'll just bring
we'll take another div it will have a
class called style footer box Dash help
okay and that will take this H3 and
we'll call it let's say help center
and in that we go to discover Our Help
Center component okay in this way we can
easily able to discover our menu so we
have our help center this is covered
let's come down and let's take another
div it will have a class called style
subscribe box and and that will have
type is going to be email placeholder
main email sorry and it's required with
are we going to add a lot of
configuration on this when we actually
will take the data from the user okay
and we'll create a automatic mail so
user will get an option to subscribe to
our email list and we're going to add
some more logic to this okay we are just
building out the layout so just walk
so let's come down and here we have to
display the icon which we are just
importing okay let's add a class style
and let's call it subscribe box send
so this is what we have now let's come
down let's take another div it will have
info and then we'll take this paragraph
and let's come back to the original
and simply copy the text from there
and simply paste here so this is the
okay so this is the div we have let's
assign a class and let's call it style
only subscribe and put this entire and
let's call it as subscribe here okay
subscribe and simply copy this entire
code and actually copied and cut here
so put this entire code inside this and
subscribe okay and by the time you guys
have already get familiar that what
convention I'm falling for and giving
the name for my CSS okay so the main div
will have the short name then box and
the rest name would be go according to
the component okay so make sure this is
that architecture you follow so with
this we are done with this entire code
so this is what we have and we are done
with that let's come back to the and
the Discover is already looking good
everything's going our menu is
and let's come here as you can see our
over effect is also working which we
have added on our Discover component
we have to just face the width okay
everything is working fine if we do the
things are looking really good
let's do side by side and start working
so close this one go to this photo CSS
and let's start working on it so first
we're going to Target the footer and it
will have a width to 100 percent
padding is going to be let's say padding
block is going to be 1.5 Ram
position is going to be relative let's
come down we'll take a putter box
width is going to be 80 percent
display is going to be grid grid
template column 1.3 FR and it will have
so as you can see it's working fine we
have divided the entire footer in four
different components and four different
so things are looking pretty good you
can see this is how it will look we're
going to fix that with the media query
so let's come down and we'll let's type
and let's add a media carry so we can
start working on it okay so let's say
Max width is going to be 45 em and let's
box for the box and width is going to be
let's come here great template column is
em with okay for it's looking sick it's
now let's set for the Mover okay so this
is for the tablet now let's set for the
mobile phone so simply do one thing
simply copy this and paste here and make
and this is how it will look on our
mobile device so media query is also
looking perfect over effect is working
so pretty good and our router is also
things are looking pretty good let's
come up and let's start styling a line
item Flex start justify content
specificity between cap is going to be 3
let me give this comment social and
let's let's target the footer install
and it will say display is going to be
line item is going to be Center so
font social a and padding will have 0.2
RAM and Border radius 50 percent and
transaction all 0.3 second easy in
displays is going to be grid
now let's add an over effect
so on over effect we want to add the
icon color and the color should be our
primary color for the text okay Shadow
and let's assign a board box Shadow to
let's make it big and let's try to check
so let's come here everything is working
fine you can see it this helps enter and
this discover beings are looking good
over effect working fine let's
and let's check the icon these also
I think we need to provide a little more
so everything's looking good let's come
here and come here make it to five
now we have this it's look perfect
our social icon is also working fine and
it's 100 responsive for all the devices
now we can start on the Subscribe
section okay and if you haven't
subscribed to my channel do so okay that
will motivate me a lot to come up with
display Flex justify content space
align item Center padding 1.5 Ram
background color is going to be our icon
and color for the text is going to be
and the borrow rate is going to be 5 Ram
and margin top is going to be three Rams
David and this is how it will look
let's come down Photoshop box input so
first thing we want to assign a
background color to transparent and
width is going to be 90 percent
and color is going to be our
primary color for the text okay looking
input and the placeholder is going to be
our shadow color so really good now
subscribe box send icon and cursor is
going to be pointer increase the font
size to 2 RAM so a little big perfect
subscribe box info and we want to assign
a padding to one run from all the sites
and two Ram from left and right okay
from top and bottom one ram and from
left and right we have to add two rounds
so this looking good and navigation is
also working fine let's make it big and
this is how it will look okay
few tricks so few changes we have to do
both in the navigation bar and the photo
section to make more responsive which we
do at the end because everything is
looking good right this moment okay
sidebar is also working navigation is
so let's make it on a full screen and
this is how it will look so let's make
it on a full screen and as you can see
so we have divided this entire footer in
four different components four different
width we have assignments looking fine
so this is the logo this is the text
and we are on over effect we are getting
we have this mailboxes texts and the
and this notification is also working
profile menu help menu discover menu so
on over effect is looking really good
okay let's do the inspect element and
check the responsiveness on the mobile
device and it's looking pretty nice
so let's come back to the code editor
make it full screen and now let's
in this video we're going to build the
hero section of our applications so here
what I have done I have already opened
project in my visual code Studio make
sure you do that and so the very first
thing I want to do is let's create the
folder let's come to this component and
insert that we're going to create
another folder and we call it hero
section okay and set that we're going to
create the files so hero section.jsx
inside that we have to create the CSS
so you guys know that this is the
convention We are following the entire
application in small component so we can
use that component in multiple places
and you will find that how effective
these things are going to be in the
upcoming pages when we build because the
home page is going to be the biggest
page and there are multiple components
and the same component we're going to
use in other Pages why I'm dividing this
entire application into a small
component okay so let's come here and
let's type rafc to create a functional
based component now close this one and
and we have to import it okay so let's
import the component so import
hero sections and that's coming from the
hero section same folder and now we have
to export it copy and simply export that
and that's what we have to close this
one and go close this one and go to this
index page now from this moment whatever
component we're going to build that's
all component we're going to import here
because we have imported our navbar
footer in the app.js file because we
want to display in every single page but
right now we're going to we are working
on our index page so we have to add that
so here we are on so first thing you
so let's come here and we have to import
couple of things so let's do internal
first thing we have to do is to import
and I guess that I haven't created that
style file okay so let's come here and
go to this main style folder and in that
we have to create a style file so let's
come here and let's call it not hero
dot module dot CSS okay because this is
so we have our style file let's close
this one and close this this and we have
so dot dot which is inside the style and
this is index module.css now let's
import the component so we have to
import the hero section and this is
index okay from component index we are
exporting all the component so that's
the import we are doing simply remove
this and we have to instantly return
this and now we can import the hero
section component let's give this div
and we'll have a class let's call it
hero page and indeed we're going to
return this hero section component and
this way we can easily able to display
the component on our index page which is
so we have done with the setup and you
can see we can easily able to render the
let's open the terminal and and restart
the application so let's click terminal
and here you can see that our hero
section is displaying and our other
components are also working fine order
so now we can start working on our hero
section let's come back to the code
bring the terminal down and now we can
start work it on the header section so
let's Zoom a bit so let's come back to
the demo and this is what we have to
exactly style okay so we have divided
the zero section into Parts on the left
hand side we're going to display this
text demo and button and on the right
hand side we're going to add this image
and I right for the time being I'm going
to add this image but I'm going to
replace this image from different image
okay because I found a really good one
so I'm going to replace this with that
one okay but not now at the end
so let's come back here and let's import
couple of things from react so the first
one is going to be the image and that's
and let's come down we have to do the
and that we have to import the style
file and that's coming from the same
directory now we have to import the
sorry button and the button we have
count index and now we have to import
the images and that's coming from dot
dot slash dot dot that's images okay so
this is the internal external import we
let's start working on the jsx so simply
remove this instantly return and we have
to take a div and we'll have a class
let's say style Dot hair row hero
and inside that will have another div it
will have a class let's call it style
hero section Dash box inside that will
have another div it will have a class
called style dot hero section
and that will have a H1 and simply copy
the text and paste here then we'll have
so let's as you can see this is how to
p and come here copy the text and simply
paste it so this is our header sorry H1
now let's come down let's add a button
component which we have okay and we have
to pass this props button name
so the button name we're going to call
let's remove this button name is going
and you can see here everything is
working fine we have our heading we have
our paragraph and the button is already
just looking pretty good now let's
let's take another div it will have a
Dot hero section Dash right
spring down in that we're going to take
this image component we have imported
and we have to take the image which is
inside this image's hero and let's
assign all tag let's call it hero
section you can give whatever name you
want and with is going to be let's say
uh 600 biggest and height is going to be
let's come back here and you can see
here we have the image and here we have
so that's looking pretty good it's
already taking the shape and the
selection is also working fine
okay so that's our GSX part for the hero
section now let's close this one and go
to this hero section and click on this
style file and now we can start styling
so let's make this side by side so you
and now let's start working on it so
we're going to Target that hero section
and let's make it with is going to be 80
percent and margin 3 RAM and auto this
let's add a media query so and
Max width is going to be let's say 35 VM
hero section width is going to be 90 on
a mobile device it's already looking
good on a mobile device the only fix we
have to do is for the desktop okay
so that's looking pretty good let's take
and display is going to be grid
grid template column let's say repeat
21fr and GAP is going to be 2 RAM
this is how we look on desktop
media query and Target this Max with
55 em on that we want to change the
hero section box and grid template
column is going to be one FR okay
so these are the two breakpoints I'm
so it's looking pretty good on a mobile
device and let's add a gap to 4 Ram so
let's target the hero section box
left and it will have a padding
padding right is going to be five Ram
okay okay you can see we have some space
so we have the padding now let's check
left H1 and increase the font size to
let's say five RAM on a desktop and line
it is going to be one okay it's a little
and let's come down we have to take this
and we have to say margin bottom is
going to be 2 RAM so it will have some
let's say padding right is going to be
two Rams okay on a mobile device
and we have to take this H1 and we have
to increase the font size to let's say
line it is going to be one and font size
is going to be three Ram so little
smaller than the desktop one okay
okay the button is already there and
right now we are getting this error
because we have function attached on
that button but that button is not doing
anything okay that's why we're getting
okay we are just working on the template
we're going to make that API calls data
reload the browser to come back to the
and here you can see notifications user
profile navigations everything is
looking perfect let's open on the big
screen and you can see it's already
looking stunning we have the beautiful
it's looking good we're going to fix
this box Shadow and when we go to change
the image I'm going to add some
so then we don't have this problem or if
you want to go with this you can go
definitely by doing some changes in the
Box Shadow okay but I'm not going to do
and if we find that we need to do that
we're going to do definitely at the end
of the project because when we build
this project for the deployment on that
time we're going to do all this small
nitty-gritty rectifications in the
so let's have a look everything's
working fine profile code and this one
so let's start working on our services
section so simply come up to the curator
and I have already initialized the
and let's go to the component
and first thing we have to do is to
create a folder inside the component
in that we have to create two files so
we'll call it service.jsx and service
now let's come here in our services and
okay now let's do internal import we
have to import the CSS file import style
and that's coming from the same
now we are done with that setup and
let's come to this component index and
we have to import this file here
let's close this one and call it import
service and that's coming from the
service slash service okay and now we
the index.pages and here we have to
import it and we're going to call the
so I'll go a little fast because we have
so here in this way we can easily able
to access the component once we save and
let's start the application so type npm
and here you can see we are getting come
of couple of notification don't need to
close this one and here you can see
everything is working fine and here we
have the services section so we can
easily able to display the component
here okay rest is working fine let's
and if I scroll down here we have this
Service Company let's bring this one
and let's start working on our service
so first thing we're going to do is
we're going to do couple of internal
external import and first thing is going
come here let's do the image we have
let's remove this and take this instant
return and we have to take a div
it will have a class style dot service
inside that will have another div it
will have a class style Dot service Dash
and that will have another David we'll
have a class called style Dot service
and that will have the image
Source image Dot and in the in that
images we have this service images so
all together we have four Images service
one service two service three service
let's take the alt tag we'll call let's
call it a filter and discover you can
give whatever name you want let's take
away this is going to be 100 and height
is going to be 100 as well save it come
down we have to take a paragraph and
step again so here we have to type the
text so let's call it take a span inside
span we have this step one now let's
come up with that and let's take a S3
tag and we'll call it filter and
it's going to be the title and now we
have to take the filter paragraph and we
have to copy simply come here and copy
and that's what we're going to display
is simply paste it okay so that's the
first icon service section we have okay
simply close this one and copy this
item and replicate this couple of times
and now we have to do the changes so
simply close this one and close this one
and this is come here here we have that
okay now we have to change the image so
and simply we have to change the images
let's close this one and come to the
third one and let's make it to three
simply copy this and we have to paste
okay close this one and come to the
fourth one and here we have to change
so let's simply change this one and
that's look pretty good I think we are
done with this okay if you find we are
making any mistake we definitely come
so that's what I have you can see we are
so first in the second image third image
and this is the fourth image we have
and we are displaying the text as well
okay let's make it side by side so we
so that's the only thing we have to do
let's have a final look it's
so we're going to Target the service
this is going to be let's say 80 percent
margin block is going to be eight Ram so
we have to add the media query and Max
width is going to be let's say 35 am
services with is going to be 90 percent
display grid and now it will take the
inside the media query replicate this
we'll say inbox is going to be let's say
grid template column repeat 2104
and GAP is going to be one ram so this
so it's working fine it's already 100
responsive on a mobile device Let's test
it on other screen it's working fine you
so 100 responsive in all the devices in
let's target the service item
step is going to be let's say
margin top is going to be 3 RAM
margin bottom is going to be 2 RAM
padding is going to be 0.5 RAM and point
1.5 gram border radius is going to be 5
background color is going to be where
color is going to be let's say shadow
color save it and you can see it's look
beautiful you can even optimize this
service section as well instead of copy
and pasting the same code over and over
again in our HTML jsx part you can
simply take a data as a array and just
Loop over it and display that it that
would be also working okay but I will go
in this approach because ultimately it's
a very small component and this
component will not change it will be
there forever okay so that's why I will
take this approach so it's looking fine
we have our thesis everything's looking
media query is also fine let's close
and let's have a final test so
this is how it will look on our desktop
everything's looking great we have the
and we're going to build the slider with
a dynamic data okay so it's not actually
a slider it's a component which will be
change its data on the base of Click
event and we're going to do the changes
of data with our demo data okay so
that's the component we're going to
build you can see this is the beautiful
component we're going to design so here
I'm back into the codator and the
projectory is already open so the very
first thing we have to do is to come
here go to this component and in that we
have to create another folder I'll I
call it Big nft slider okay copy we have
to create the file nft slider.jsx and we
have to create the CSS file as well so
and I believe that these things are not
new to all of you okay guys so let's
close this one and let's type rafc
closest one and zoom a bit and now let's
start importing the files so let's call
and first thing we have to import the
style sheet so which is in the same
directory okay now we have to report
couple of things from react so first
thing is going to be let's say you state
this is coming from react now we have to
image and that's coming from next.js
now we have to import the icon so AI
fill fire and that's coming from react
icons slash AI provider now we have to
import the MD verified batch okay very
quiet and that's coming from react icon
so these are the reactive ports and in
one more we have to Imports and this
okay these are the two import from there
you have to import one more things and
lines and that's coming from react icon
and we have to import one mode which is
what is my big right autofill so these
are the import let's come here we have
to import one more so AI fill
line heart so heart line heart now let's
come down import images coming from
button and that's coming from slash
so here we have the internal import okay
now we can start taking a couple of few
State okay so first thing we'll take use
State and we'll call it ID number U
State and id1 then we'll take this cons
slide.data okay and this is going to be
an array area of object okay so here
we'll have the data about the our slider
of the nft images okay so in this slider
data array will have an object of data
which contains the information about the
nfts okay so first thing is going to be
the title the name of the nft we'll call
it hello you can give whatever name you
want I'm just going within this random
name then we'll give the ID so it will
have one name is going to be let's say
I'll call my name dollar thousand
and let's say call it collection
okay and I will have a gym now let's set
the price to the nft so let's call it
this something big number and now we
have to take that like okay like is
going to be this and we have will have
the image of the user okay the one who
and all the images we have inside this
and now we have to take the image of the
nft so we'll call it nft image
okay image and here we have the nft
image one we want to provide an offer
okay count on timer so let's have that
so we'll take a day and give any number
10 then we'll have a minute let's go to
11 we have seconds so we'll have a
second let's say something 35 okay so
this is the data we actually going to
retrieve from our API okay so these are
the parameters we're going to include in
the in the API actually we need to
include more data we're going to have a
proper description we're going to have a
user involvement so a lot of things
we're going to add a lot of data but
initially for this component this is the
data we need to display in the component
okay so this is the NFP details and what
we can do okay simply copy that entire
let's change the name to swap
I'm just giving this a random name okay
and this will be mh2 and image user one
why we are getting this error let's
paste one more time and let's call this
one to we are getting an error so here
and we have to write one more here
and we have to provide the commas okay
so everything's looking good here
we have to provide these commas right
now we don't have error okay so let's do
one thing simply copy this entire and
gym and change this to rayon user 3 and
this is going to be a user 4 okay Siri
and that's simply copy and paste and
change this to hello home this is user 4
nft4 so this is the data currently I'm
taking four data but you can take as
I just want to build the logic that's
why I'm taking this demo data so let's
close this one and let's come down
and now we can start our working on our
GSX okay so instant reader we'll take
our div it will have a class style dot
and that they will have another debit
dot big nft slider dashbox inside that
will have a another debit will have a
class called style dot big nft slider
box Dash left and in that we'll have
this h2 tag and we'll call it let's say
let's come here here we have this okay
slider data and let's scroll that and
that's the data we want to display here
so let's call the slider data and
let's call this ID number because this
is this this state variable this ID
number we're going to change and on the
base of the ID number we're going to
display the data from our array okay the
demo data we have taken okay so if we
have one in this ID number we'll display
the first element of our array
and a second element of RNA which is a
one index okay so this is how we're
going to display the data okay you will
it will make sense just follow along
with me and inside that we have the
title we are getting this error why it's
happening okay and the name is really
good okay we have given this command
so this is the title of the nft come
down we'll take a div it will have a
box left and we'll call it Creator in
this we'll have the detail about the
creators the one who has created this
so we'll have a div inside that it will
have a class called style big slider box
created profile okay and that will have
an image it will have the source we have
the images so and the source will
provide from this slide data slider data
sorry and we have to display the user
image user profile okay so that's we
have inside this ID number we have to
we'll call it image and this image is
this one and you have to apply the alt
text let's call it profile image
where is going to be 50 height is going
to be 50 okay just looking profit and
let's have a class so we'll say style
big slider box left created profile
image okay I'm giving this huge name
because it will become very easy to
navigate okay so it's always very
important that you have to give a
relevant name as per the component this
looks really big but it will save a lot
it will save you from a lot of problems
when you will do the refactoring then
you will find that this thing will help
so we have the classes let's come back
to the application and as you can see we
can't see that because we haven't
and you know why let's come back
go to this component and here we have to
nft slider we have to export that
now we have to import that into the
pages so come back to the pages index
and here we have to import that
component and now we have to call the
okay and this we can easily able to see
that as you can see we have the name
that mean we can easily able to retrieve
data from our demo demo data okay the
slider slider data okay and we again is
display the image so it's working fine
okay that's working absolutely fine
and now I can continue with that again
so let's come here you can see here we
let's come down we'll take a div it will
dot big nft box created profile image
will have this H4 we'll call it let's
we'll have the data inside the slider
and we'll call it the name of the
and inside that we're going to take this
we'll take a div it will have a class
background slider left creator
and it will have a class Style
let's call it collection icon okay now
we'll take another debit we'll have a
class called style BG created collection
and that will have the paragraph we'll
call it collection H4 and in this we
have to display the dynamic data slider
ID and we want to display the collection
name okay so let's save it come back to
application and here we are getting this
so let's come here I did something wrong
here okay I'm giving this name in the
bracket to remove the brackets and save
it now we don't have the error and if
this is working fine you can see the
name and the collection everything's
let's take a dividend we'll have a class
and so that will have another div it
will have a style Dot box left bidding
it will have a small and in that we will
and here we'll have a P tag and in that
we're going to display the data okay
and here we have to take the span and
we'll give the random price here for the
time being conversion price so that that
price is in the form of ether and this
price in the form of in the form of
vertex say in the form of dollar so
right now we are doing this hard code
we're going to change this data
dynamically okay art code data we're
going to build it to the dynamic one
simply come down and we'll take a P tag
it will have a class called Style
or wedding box auction let's come now
let's take this span and let's call it
okay let's come down and we'll
we'll take a div it will have a class
box left bedding Dash box Dash
we'll take a div it will have a class
paragraph and we'll call the data
Dynamic data we have so we have to
display the time inside that we have the
days okay that's what we are displaying
if we come here you can see here we have
the day and time let's come down
and here we have to take a span and then
simply copy this and replicate it one
more time okay let's change this data to
let's call it to hours and this will
come hours simply copy one more time
okay simply change this to minutes and
this is a m ins now we have to set for
so this is second and second
so these are the data we have getting
so let's save it and here you can see we
have all the data whatever we have a
specify in the dynamic data okay days
hours minute image price everything is
working fine now let's come down take a
div it will have a class called style
and in that we'll have a button
will send the props we'll call it let's
we'll have one more button and let's
have a handle click function gonna be
empty function let's replicate it and
okay these are the button we have
have a debit will have a class
my room bright line and it will have a
come here it will have a on click
currently we don't want to send anywhere
empty function we have to give
let's call it increment function
and we have to write this function okay
let's call it increment simply copy and
copy and simply paste and let's call it
here we have to change this to let's say
left line okay and these function we
so we have the increment function we
slider data and that we have to apply
the ID and we have to give the nft image
we have called it nft image okay so
and we have to assign the alt tag
everything's looking good let's come
down and now we have to take the light
okay so we'll have a div we'll call it
big slider box right box let's call it
fill heart and it will take a Spam and
we'll have the data and we'll call it
like okay not link it's like what we
have passed here it's like not link so
let's come here we have to Simply change
so things are looking good so in this
way we can able to display the likes so
with this we are done with the jsx part
let's have a look one more time okay so
this is the internal external internal
mode this is the demo data we have
this is the demo data we have let's
close this one okay working fine and
here we have to create this function
okay so as you can see this is how
everything is look we can display the
image likes and buttons all the data
icons everything is displaying
so the entire component is working fine
let's come up here and let's zoom in now
we have to create those two functions so
first one is called increment and we'll
take a ink and it's going to be an arrow
functions we use this callback
okay we'll call if ID plus one
is smaller than slider.length okay
then we want to Simply call this
let's come here we have to Simply set
set the ID number to plus one okay
that's what we are doing in the
increment function and we're going to
call this function only when the ID
number change and the slide dot length
change okay so these are the two things
we are doing simply replicate this and
now we have to write for the decrement
function simply change this requirement
and here we have to Simply make it to
zero and this one is going to be a minus
okay so this is nothing but simple
JavaScript we are writing okay so length
so just follow along with me everything
what we are doing here we are just
changing the ID number so on the base of
that ID number we can easily able to
display like the data in our component
on the click event okay so that's what
I'm doing here so that's the function
now we have to run a use effect and in
that we're going to call this function
and it's going to be an empty array so
let's save it everything is working fine
this is a decrement now simply copy that
and we have to scroll all the way down
and here we're going to call the
so okay we are getting an error okay
and so we are getting an error
why it's happening so so let's come here
and things are looking good we have the
list coming out this and let's come here
okay now it's working fine and here we
okay let's remove this one for time B
okay so still we are getting this error
why it's happening ID so change this to
make it three and make it four
nothing's happening still we are getting
the error when we are calling the
let's call the degrees function here
decrease and this one is going to be
increase okay so let's save it we're
done with this okay things are looking
good okay now all the data is displayed
now we're going to style it okay
and then we'll see what's the matter why
we are getting the errors okay let's
start styling the CSS part okay
so close this one and go to this big
number CSS file and now let's start
styling this okay let's make it side by
side so you guys can see and have a look
we will Target the big nft slider box
and it will have a margin 0 Auto
that is going to be let's say 80 percent
padding block is going to be H Ram
displaying grid is going to be
great template column is going to repeat
align item Center so this is how it will
look you can see everything is just came
and we'll come down we'll take this
media query and we'll add that Max but
it's going to be let's say 65 em and
we're going to say box Shadow which is
going to be 90 percent and padding top
is going to be 28 Ram so it will have
some space on the top and grid template
column is going to be 1 f r and GAP is
going to be one on so now it's look
perfect on a mobile device okay
now let's come here and let's start
grid column is going to be one slash
great the row is going to be one slash
minus one come down we have to take the
background color to our main box Shadow
we're going to use our box Shadow color
moderating is going to be one ram
padding to Ram Z index something big
number and height is going to be 90 VH
so now it's look good okay let's come
font size is going to be three Ram line
okay we'll Target the let's say left box
great a column is going to be 6 minus
one and great row is going to be let's
. padding is going to be one ram
background color is going to be fair and
and Border video is going to be 2.5 Ram
box Shadow is going to be our
main color so everything's looking fine
now let's give this command create a
will say display is going to be great
grid template column repeat to 1fr
a line item is going to be Center
let's target the Creator profile
and display is going to be Flex align
item is going to be Center Gap is going
let's come down Target the Creator
whatever it is 50 let's come down
and line it is going to be zero
come down Creator profile info paragraph
and we're going to say margin bottom is
going to be minus 0.7 RAM and top is
going to be one ram so look perfect now
will have a display Flex align item
font size is going to be 4 Ram
okay this trial is not taking place
okay here it should be collection icon
so line 8 is going to be zero
display is going to be Flex align item
is going to be center cap is going to be
and Target that box bidding box
border let's say shadow dark color
let's say margin block is going to be 2
border radius 0.5 Ram okay we are
okay let's see let's see what's the
problem let's go okay remove this one
and right now we don't have an error
so everything's working fine as you can
see everything's taking shape
so let's smoking on our jsx we'll Target
the bidding box small and it will have a
background color to our wear let's say
Shadow color and padding is going to be
model radius 0.5 Ram font width is going
so display is going to be Flex align
item Center and GAP is going to be 3 RAM
top align analytics line Learning Center
padding is going to be one ram and 0 Ram
and 3 RAM and 0 Ram okay save it
they can go now provide broader bottom
one pixel solid and we have this our
shadow color Okay Shadow dark color so
here you can see we have the nice button
let's come here and let's target the
box icon and we'll say font size is
and just change this to timer okay
so make sure you do this change okay box
icon and this one is box timer so now
you can see it's taking place
so make sure you do this change okay
so now it's looking really good
let's target the bidding box
and let's say font size is going to be 2
RAM and one where is going to be 900 and
line it is going to be zero why it's not
taking place it's uh let's say and here
save it and now the size are looking big
the left box button and display is going
to be Flex a line item is going to be
Center justify content Center Gap is
padding is going to be more block to RAM
while the strings are not taking place
okay the name is really good I think we
have given the wrong name let's assign a
font size it's going to be for Ram
left let's come here go to this jsx part
and let's have a look what's the problem
so where is the button we have
okay make sure you change this to it's
and here you can see the Styles okay now
so make sure you change the spelling
we'll Target the Box left side bar
button and display is going to be Flex
a line item is going to be Center Gap is
font size is going to be 2 RAM and
margin top is going to be 3 RAM so this
is how our bottom would look arrows
you're going to fix that not a big deal
okay so these things are looking really
box lifts sidebar button icons so we'll
say cursor pointer and transition all
0.3 second easy in box left slide ptn
icon on over effect we want to change
text color and whatever it is going to
be 50 and padding is going to be one ram
you can see it's already looking better
but there is some problem in our code
because they both are not aligned to
each other they are up and down okay
but we're going to fix as you can see
this over effect is working fine
and this one is really looking good you
can see we have this nice this component
Creator collection so everything's
looking on a like on desktop really good
and now we can start working on this
image we have the problem here
so on a mobile devices look good okay
now let's start working on it
so let's call it right section
so we'll Target the sidebar box right
position is going to be relative
right box image and we'll say border it
is going to be 2 RAM so the study is not
entire style come back to the GSX I
think we have forgot to give this class
name okay so let's come here and now we
have to assign the class to the image
at the class and now we have this border
like and position is going to be
absolute top is going to be 3 RAM right
is going to be 3 RAM display is going to
be flex and align item Center
okay there we have our lights
formed size is going to be 1.2 Ram
background is going to be half hour
text color and we have padding 0.5 RAM
and mod Ram so it's looking pretty good
now we'll have the Border radius to 5
okay that's the like we have there
let's come in the media query and we'll
Target the Box left and first thing we
have to do is to assign a height to 83
assigned margin top is going to be -70
Ram so we'll have a quite big space okay
let's make it 40. okay we're going to
fix it okay it's look perfect
and let's assign one more thing so we're
going to assign padding 1.5 Ram
okay they'll stop some padding for on
box left Creator so Gap is going to be
and great tablet column is going to be
1.3 FR and one FR so this is how it will
so we'll Target the font size only 0.8
left Creator collection info and font
come down we're going to Target
and GAP is going to be 2 RAM and
timer item B and we want to change the
text okay size going to be one ram so
little smaller not too big okay look
perfect yeah I know we have to do a
couple of changes we have to fix a
couple of bucks we do that okay let's
so right now it's looking good we have
a good difference and simply okay
so simply take the padding bottom for
Ram so we'll have some hm let's make it
10. so we'll have some space from the
so let me go on a desktop this is how to
look this section is looking beautiful
and the buttons are working fine and
here the image is also looking good but
we have some problem in the alignment
I will try to find out what's going
wrong okay things are looking good and
the functions are not working they are
getting this error still we're going to
fix that okay so let's come here still
so let's come back to the code and
let's stop the application and let's
restart the application one more time
click on this we are still getting this
okay let's bring the terminal down and
here we have the problem so I was stuck
for half an hour and I was wondering
that what went wrong in my code and why
this function is not working because of
this Cinema stick so instead of passing
passing this ID number I'm passing the
functions and that's why we are not
getting simply comment and this is the
exact code we have to write I number we
have to pass and on that ID number we
have to add one not the function okay
and that's the same thing we have to do
here simply comment this actually remove
this code we don't need this one remove
and now that function will work simply
come down and now review the browser
and just wait and here everything is
used now you can see click on this you
can see we can change the data
dynamically from our slider data okay
everything's changing okay image is also
changing so this looks really good so
our data is working fine we can is able
to render the data the logic we have
so let's come to the style and here we
have to do one more changes and I have
found that's bottom padding bottom it
so we have to Simply remove this and we
have to assign padding block instead of
padding bottom so make sure you do this
change as well okay padding block
and one more thing we have to do is the
reason why we're getting the image up
and the container down because of this
grid row we have to there should be no
space between minus okay let's
remove the space and now we can easily
able to have the perfect container so
and now you can see it's working fine so
make sure these changes you have to do I
wasted half an hour for figuring out
that what went wrong and we have seen
because of this slide one distance space
in the minus sign we have we were not
able to have the styling and now you can
see it's working fine we can is able to
display the image side by side and the
details and it's 100 responsive for all
the device okay you can click we can
change the text we can change the data
this function is working okay we have
one more problem here not a big deal
so our demo data is working fine let's
and here we have the image actually I
don't have the nft image number four I
have only three image and that's why we
have in this problem so what I will do
I'm going to change this to image let's
because I have only three image for the
so right now we don't have any problem
now we can easily able to switch between
the images and the data as well
and to make it more realistic let's
change all the data as well the time the
days the price let's change these things
as well okay so let's have a look
okay collections name Creator everything
is changing let's change this quickly 20
and let's remove the pricing as well
let's change a little bit in the pricing
change the number 11 this one is 21 and
this one is zero five change the pricing
as well and here we have to do the
okay change the price as well
so here we have changed the data and you
can see here we are getting the error
because we have used the zero okay this
is what we have to fix in the minutes so
let's lead to the page still we have the
problem and here we have to remove the
and now it's working so we have to
remove the zero we have to remove Zero
okay now let's read the page
now we don't have any errors and our
component is working fine and now we can
do the test click on this and you can
all the timers all the data is working
fine we can easily able to switch
it's looking perfect on a desktop box
Shadow everything is working fine
and let's move check on our mobile
device responsiveness okay we have
problem on a wall device we're gonna fix
so here we have to fix two things
actually a lot of things we have to move
first thing we have to manage this page
then we have to provide the space
between the creators and we have to
increase the height of the container as
these are the fix we have to do
so let's come back here and make sure
here you have to do the changes instead
of height 83 VH we have to take 120 VH
because I did a testing and I found that
this value suits the element okay so
remove this one and simply uncomment
and save it you can see right now it's
we have the space and all the space is
gone and everything is looking perfect
now we have to fix that container and to
fix that here we have to do the changes
in the Creator section so here instead
of the 1.3 FR we have to say one point F
offer okay 1.8 so simply remove this and
simply uncomment this one save it and
here we have it's looking perfect
okay and here we have to provide a line
save it and we have some space and now
100 responsive for the mobile device
let's take a final test okay it's
okay the data is changing the state is
changing and we can easily able to
so make sure you did all these changes
okay so we are done with that component
now let's close this one make it big and
let's make it bigger let's do a final
test okay so this is the navigation no
breaking changes have done everything is
working fine and beautiful this is the
and button this is the hero section this
is the services section and this is the
biggest slider okay and the completed
one okay you can switch the images all
and on the base of this click event
we're going to make an API call and
fetch the data from there okay so it's
looking perfect and this is the footer
which is actually looking beautiful
so that's looking incredible and
okay that's looking beautiful let's do
let's do the inspect the element one
more time we have the images perfectly
aligned this one is also looking good
slider looking good we have the buttons
everything is functional and working
so in this video we're going to create
this email subscription form okay you
can see that we have divided this
section in two parts one for the
information and second one is for the
image and then we're going to build this
category okay so this is the category
section we have Okay so let's come back
so in this we're going to create that
email subscription form so let's have a
look what we have done so far so inside
the component we have all these section
we have create all this component we
have created hero section nav bar in
that we have all these small component
and close this one in this this is the
services one this is the component
index so in this file we are importing
close this one close this one and this
is the image in which we have all the
images Pages this is the index page we
are importing the component and
rendering on our home page okay so let's
close on this one and let's do one thing
so let's start working on our
email subscription form so let's create
a folder for that so we'll create a
folder and we'll call it let's say
simply copy create a file called
subscribe.jss and create one more file
called subscribe click on that subscribe
dot module dot CSS okay so this is going
to be our subscribes component
let's type style and the file is coming
from the same folder okay so this is our
subscribe component now let's come to
the component index and in this we're
going to import that so let's import the
subscribe component and simply export it
default export copy and simply paste
and make it default export okay so in
this way we can easily able to render
the component okay and now let's go to
this pages and here we have to import it
the subscriber component and now we have
to Simply pass here so we can easily
able to display on our home page
and come back to the browser and here
you can see our component is displaying
on our page so subscribe it's working
fine so let me come back to the code
reader and simply close this one and now
we can start working on our actual
subscription form okay so now let's
import couple of icons so import and we
want to import the ri send let's call it
plain fill and that's coming from react
icon slash RI okay let's import
image and that's coming from next.js
so that's the external import now let's
do the internal Imports so we're going
to import the images and that's we have
dot dot slash dot just inside this image
folder okay so that's the external
internal import now what we can do let's
simply remove this and let's start
so we'll take a div it will have a class
and we'll say let's say subscribe okay
and that div we'll take another div it
and we'll take another div it will have
a style dot subscribe bot left and in
that we're going to render this h2 tag
and here we're going to take a paragraph
come back as you can see it's working
now go to the actual application the
complete one and simply copy the text
copy and come back and paste here okay
so this is our paragraph now let's take
it will have a class called style we'll
say subscribe box left box and that will
take a span and we say H1 sorry 0 1 and
here we have to take a small tag and
that we're going to display the message
and get more okay so that's the one
component and we'll call it discover
and simply change this to and you can
change the message to let's say premium
discount or you can call it something
so that's for the data part now let's
come down and here we're going to take
another div and we'll have a style we'll
call it let's say subscribe box left bar
left input okay and in that we're going
to take that let's say import it will
have a type to let's say email and it
will come out of that and we'll take a
let's save it and it will have a class
now we'll come down and here we're going
to take another div it will have a class
we'll call it right and in that we're
going to display the image okay we'll
take the image tag source is going to be
the image Dot and the image we have is
this update a alt it will say let's say
get update it will have a width height
let's assign 600 and width is going to
800 okay so that's the all the j6 part
we have written for this okay so let's
come back to the application and here
you can see it's working fine we have
the title we have the paragraph We have
the short info we have the input and we
have the image so everything is working
fine no error we have so far so let's
come back to the code and now we can
simply start styling this okay so let's
make it side by side so you guys can see
so let's come down and here this is how
it will look on a mobile device now
let's Zoom a bit and let's start working
we're going to copy this subscribe and
we're going to start with that so
subscribe it is going to be let's say
and subscribe box is going to be let's
hram and zero display is going to be
grid template column one point FR and
a line item Center so this is how it
will make it font size is going to be
device width is going to be let's say 7
subscription box which is going to be 90
percent and grid template column is
going to be 1fr and GAP is going to be 4
and that's the media query okay simply
replicate that and change the here
768 and this will become 1 0 2 4. so
why it's not working and here we have to
2 1 FR okay so that's the second media
and as you can see it's working fine our
media query is working fine on a mobile
now let's come here up and let's make it
300 little bigger and line it is going
let's come down we're going to Target
and it will have a font size to one
and it will have a display Flex a line
item is going to be Center Gap is going
top is going to be 2 RAM so this is how
we'll take the Subscribe box left box
small and font size is going to be one
we'll Target the Box left span and
this becomes the background color is
pretty cool and we're going to assign a
color itself it's gonna be our main
padding is going to be let's say 0.5 RAM
and 1 Ram from left and right and Border
and width is going to be 4 Ram text a
line is going to be Center okay save it
margin top is going to be let's say
three Ram so we'll have some space
padding is going to be 2 RAM and 2 RAM
and with is going to be let's say 80
border radius is going to be 4 Ram so
this is how it will look now let's
assign a background color to go and be
our main icon color and we'll have a
color itself is going to be main this is
nice background color we have now let's
say display is going to be Flex
a line item is going to be Center
let's come down we're going to Target
the box subscription box left input and
input itself so background color is
going to be let's say transparent we
have the Border 0 outline is going to be
none with is going to be let's say 90
percent and that's pretty cool
and let's come down we're going to
Target that left input and input
so placeholder and we want to change the
color so we'll tap this main BG color
and font size is going to be 1.2 Ram so
that's pretty big and beautiful let's
come down and we'll Target that
icon okay we need to increase the size
so font size is going to be two wrap oh
so that's looking pretty cool so we are
done with the CSS part let's scroll all
the way up and let's have a look one
more time so let's come in the media
query in the First Media query and here
we're going to write the media currently
so first we're going to Target that
input okay and we'll say width is going
padding is going to be one ram okay
and let's come down we're going to
Target that subscription box left H2 and
we'll say font size is going to be 2 RAM
okay that's looking good let's come down
the second media query let's target that
box left input and this time we're going
to make this to same 100 width and
and this will become padding is going to
and box left H2 is going to be same
font size to Ram if you want you can
even break this component into a
separate component and use it okay but I
so that's those media query and looking
perfect on mobile device let's make it a
little big it's 100 response so you can
see let's make it on a big screen any on
and this is how we will look on a tablet
so it's looking beautiful so we have
this section we have this image section
descriptions and all everything's
so we have them back to the code and
make it full screen close this one close
come here close that open the terminal
in this video we going to build a
reusable title component because in this
application in this nft Marketplace we
have a lot of title which is repeating
so that's what we're going to build so
let's come here so this is what we have
built in the last video and in this
we're going to focus on this title
section okay we're going to design this
particular one title as a component and
we're going to use it in a multiple
places as a reusable component and
changing the data dynamically okay so
that's what I'm going to focus in this
that how you can build a reusable
component and change the data
dynamically okay so you don't need to
write the same code over and over again
so here we are in the code editor let's
come up here and create a folder we'll
call it title simply copy n we're going
to create a file called title Dot jsx
in that we're going to create another
file called title module.css file okay
so this is our title file we have simply
type rafc closest one and type rafce
react functional based component and we
want to import the CSS file nothing is
new you guys already know what we are
doing okay if you are following the
entire project from the beginning okay
if you're watching straight away from
this video then things becomes little
complicated for you again so make sure
you follow other videos to have a
complete grasp that what we are exactly
building and what we are exactly working
on and what pattern We are following
so the CSS file will come from the same
folder so that's our component and here
we're going to receive the props so the
first prop is going to be the heading
and the second prop is going to be the
okay so let's come here and let's come
to this component index and we're going
so we'll say title coming from the same
folder and simply copy and paste we have
to export this as well default export
okay so that's what we are doing here we
have to import that in a index.js and
now we can easily able to use it in our
page so simply call the component
okay so that's that simply close this
come here and now we can start writing
the jsx simply remove this take a
dynamic instant return and take a div it
will have a class called style and we'll
and in that we're going to take another
div it will have a class called Style
and in that we'll take a this H2 it will
have our Dynamic data heading and we'll
have a paragraph and we'll have our
Dynamic data paragraphs so that's our
reusable Dynamic component okay
so we're done with this now what we can
go to this component section
and here we have to send the props we
are in the index.js and now we have to
send the props so we'll call it so let's
and paste and here we have to pass the
text we want to render okay so let's
come here go to the original
applications and from there we're going
to copy the text simply copy that Browse
now format this properly and now
we're going to take the come here and
pass the data so simply copy this and
so this is how we are sending the props
in our title component so it's looking
good now let's come here go to this
application right now we don't have
so what's the matter why it's not
so here we have the subscriber
okay simply copy that it's working fine
okay my file we have to restart the
application so type npm run Dev
and let's scroll down and here you can
see that our Dynamic content is working
so we have the title and we have the
and now we're going to style that
component so simply come here and go to
this style file title style file and now
we start styling this one so first thing
we're going to do is Target the title
and width is going to be 100
and title box width will have its 80
percent and margin 0 or 2 then come down
box H2 and font size is going to be 3
a little bigger align it is going to be
zero so this is how it will look
now let's come down let's write the
media query so and it will say Min
320 pixels and the of the second one is
going to be let's say Max device with
it's going to be around 4 25 pixels
we're going to Target the title box
which is going to be 90 percent then
again we're going to Target the title
box H2 and we're going to make the font
size to 1.8 Ram so let's save it and
we're going to say line height is going
to be zero so it's looking perfect you
the thing we have in the design is look
like the same okay make it big and will
look good responsive and that's how
it'll look on a bigger let's make it big
okay let's close this one open this
index.jss simply cut this and paste out
in this video we're going to build the
category section okay so I have already
opened the project in my visual core
studio and let's do one thing let's
start working click on this component
and create kind of folder call it
category okay simply copy and create a
page called category.js inside that
we're going to create a CSS file
module.css okay simply come to category
and we have to import the CSS file
internal import and that's coming from
the same directory okay that's the
internal import we have simply close
this one and now let's come to the
and I believe that you guys are getting
familiar with this okay so we're going
to import the component here we'll say
import we'll call the category and
that's coming from the same directory
and here we have to export that
simply save it to close this one
close this one and go to the pages
index.jss and here we have to import
simply copy here and pass it here
so that's going to be our category
and now we can start working exactly on
our category category component okay
so here we have to restart the
application to check everything it's
working fine click on this 3000
and here we are in the browser let's
close all the tab and reload the browser
and scroll down and here you can see we
have that category title component and
here we have the category components so
everything is working fine and we can
render that let's come back to the code
editor and bring the terminal down and
now we can start working on our
jsx okay we're going to import couple of
things first thing is going to be the
image coming from next.js and now we
have to import the icon so first one is
going to be the circle fill and that's
coming from react icon bootstrap okay BS
images and that's coming from dot dot
image file folder sorry and we have to
demo data we'll call it category array
and one two three four five okay so the
reason why I have taken this category
area because the data will get from our
API from the back end it will come in
the form of array and we go to display
that category here in this component as
so that's the data we have now we're
return it and we going to give a class
we'll call it let's say category
inside that will have on our Dynamic
data we'll call it category
array we're going to map over it element
I instant return we'll take a div
we'll call it style dot category box and
that we're going to let's take a
keep let's try the key otherwise react
will give you an array okay we have a
key now let's come down we're going to
take the image and we're going to
provide the source of the image and we
have the image inside the images and we
can pick the let's say category
background and let's assign a class
okay now write the alt it will say
image we have to assign the width is
going to be let's say 350 and height is
going to be let's say 150 and it will
have a object effect to cover okay
simply come down we're going to take the
div it will have a class Style
category box title and that we're going
to take a span and it will have our icon
let's come down and here we're going to
take another level we'll have a class
title info and that we're going to take
this H4 and it will call entertainment
hardcore value NF 195 nft so right now
we are doing this hardcode value we're
going to take the dynamic data from the
area and we're going to render over it
so this is the Hardcore value so that's
for this category okay so we are
importing internal external and we have
this Dynamic date error demo data and
let's open the terminal and come back to
the browser and here you can see
we can able to render the image and all
so everything is working fine and we
don't have any error so now come back to
the CSS file category CSS file and let's
start styling okay so simply copy this
category and let's target that category
it will have a padding for Ram and zero
Ram display is going to be let's say
grid and grid template column repeat
let's say 6 1fr now we'll have the Gap
okay it's looking really good let's come
down we're going to Target the category
box it will have a line height to zero
transition all 0.3 second easy in
well tag the moderatus one ram
padding bottom is going to be one ram so
and let's add a media query so it's
going to be a Min device width is going
device width is going to be let's say
so we're going to Target the category it
great template column 1 FR so you can
see this is our look on a mobile device
simply replicate this and let's add a
one more break point so we're going to
change this to let's say 427 and this
770 pixels second breakpoint and this
will have a two repeat two rfr okay
so that's the second breakpoint for our
now simply copy and let's add the third
breakpoint and this time we're going to
change this to let's say 772 pixels and
1024 pixels 25 pixels okay and let's
so this looks pretty good that's the
three Bitcoin now let's come here
and here we're going to take another div
put this entire code inside it copy and
and That's How we'll look let's assign a
category okay now simply copy that come
back to the Cs file go on top and let's
target that and let's say width is going
to be 80 percent so this n margin 0 Auto
copy that and come back to the media
and do this targeted here okay so where
90 percent okay look perfect it's look
perfect on a mobile device you can see
now let's have a look so this is how it
if we go to this single this is how we
and this is how we look on our desktop
and on a complete desktop it will look
so right now we have five but I want to
what's the problem let's come back to
let's come back to the GSX and here we
have taken five five only so we have to
so the total number of category errors
should be 6 to display six is component
but I had only five okay so right now if
I come here you can see we have six
so now we have fixed that problem
so let's come down let's start styling
that so we'll Target the category box on
over effect we're going to add a box
shadow where and we'll have our box
will come down we will Target the
it will have a border radius one ram
display is going to reflect a line item
is going to be Center and padding is
going to be one ram Gap is going to be
one ram so this looks pretty good
we'll Target the category box title span
let's make it font size to 2 RAM 3 RAM
let's make a little bigger and margin
nice effect as you can see on click of
Click event we have this nice box shadow
just looking already much better
let's come back on a full screen and you
can see it's looking really good on our
last screen on overhead we have getting
it's a nice effect we are getting let's
come back to the code make it full
and now let's come back to this here so
make sure you do the changes in the
category array so earlier we had only
five element but right now we are
we are working on this clicker when we
let's do the inspect element check the
responsiveness so it's 100 responsive
you can see all the breakpoints we have
this one is also working fine so this is
pretty good on the last screen we have
this three and on a desktop mode will
in this video we're going to build the
filter Advanced filter for our
Marketplace because this filter is going
to be available in all the 16 pages okay
now let's click on this component and
let's create a folder called filter
inside the filter we're going to have
this filter.js we'll create a filter dot
so that's the folder and file structure
We are following now we have to come to
now we have to import the CSS file
internal import and we'll say import
style and that's coming from the same
so we have our folder now let's come
back to the component.js and here we're
going to import that filter component so
let's import that very quickly import
filter component and now we have to
okay close this one and go to this
index.js and here we're going to call
the components so first thing we have to
do is to import the component
so that's coming from the component
index and now we're going to call that
and let's come here in the applications
copy that and here we're going to call
the component filter component okay
and simply copy this title component
in the filter section we have a title
then we have a filter then we have a all
so we'll simply copy the title and paste
here and here we're going to change the
as you can see it's working fine our
component is displaying our title is
displaying so let's come back to the
simply come down and here we have the
title simply type copy this fill sure
nft and simply passed here in our props
format that and copy this one and simply
pass it here so that's the props we are
sending in the title component
and in this way we can easily able to
see as you can see we have the feature
nft discovered and we have a filter
let's come back to the component and now
we're going to close this one
and now let's start working on our
so we're going to import couple of
things from first is going to be the
icons and that's coming from react slash
fa found awesome and we will have one
more icon fa angle down will have Fae
angle up f a wallet f a music and Fa
verified so video and Fa image
images and we'll have a few users alt so
these are the icons we are using in this
filter so we are importing that from
font awesome let's come down let's
import other we'll have a icon fill
closed Circle that's coming from Ai and
we'll have a one more which is a MD
verify and that's coming from material
now we have to import that TI tick from
and that's coming from react icon TI
okay I'm using different providers for
icons because I couldn't find all the
icons in a single provider okay so I'm
just importing the icons from different
providers if you want to know more about
it you can simply visit the react icons
and you can check the documentations
so these are the icons we have
let's come here we have to import couple
of from react so we need U state
and we're going to take that use State
state it will call filter and initially
it will be true so we want to display
the filter menu when someone visit the
application for the very first time okay
and we're going to use this Hue State
image is going to be true and we'll take
another one it will say video true
we'll say music true so these are the
states we are taking okay let's come
we'll remove this and we're going to
take this instant way down well have a
debit will have a class called style dot
filter and that will have a div it will
have a class called style filter box and
that will have a div call style dot
filter box left then we'll have a button
it will have a on click function we'll
call it let's say let's call it for the
time being let's call it empty function
okay we're going to create that function
later not now so we'll create a function
and we're going to pass inside the
button so when someone click on this
button we'll go to fetch the all the
nfts okay so this function will fetch
and we're going to Simply replicate this
button a couple of times and we're going
to change the text to Art this will
become music this will become Sports and
this will becomes photography okay so
well take a div it will have a class
inside that will have a another div it
filter box right box and then that will
so it will have a on click function as
we want to Simply open the filter
options okay so right now you might be
thinking that what I'm doing just bear
with me uncode along with me everything
will make a lot of sense when we'll
bring the functionality okay
so let's write the function name and
we're going to have our icon fa filter
and we'll have the span and we'll have
this filter text and out of that we're
icon and this icon would be dynamic so
filter if filter is true then we want to
like down and if filter is false then we
so that's the dynamic filter we have
let's come down here we're going to take
and this is going to be the menu of our
so if filter is true then we want to
display if filter is false then we want
we want to hide it okay so we'll come
and it will have a class called style
Dot filter box items and then we're
going to take another divid will have a
let's say filter box item box and that
will have a div it will have a class
okay it will have our icons wallet and
we have a span here we're going to
display the amount to Ether and the
range 10 ether and then we go to display
the icon because initially this is what
we're going to display so it will have
an icon and in this we're going to take
this close icon because initially we're
going to display all the nfts in between
these price range okay so this is we
this would be the initial active State
okay so that's why we have to display
this icon okay so this is the first
now let's come down we'll take a
another David will have a class called
fill box item box class Style
it will call filter box item box item
trns transmiss transaction okay let's it
will have a on click function
and that our click function we're going
to call this function let's say open
and here we'll have a dynamic icon so
image then we display the image close
then if it's not then we have to display
the stick icon okay so if image is not
selected then we want to display this
cross icon but if image is selected then
we want to display the stick icon okay
so that's the logic I hope nothing is
new for all of you guys so let's keep
working so that's the one we have let's
and open the application and here you
we have all the things we have all the
buttons we have this filter we have this
wallet we have this image and right now
we haven't written the function that's
why we're getting the error read of the
this is the thing and you can see we
don't have the function but on the click
even we are getting this error that
means our function is working so now we
have to create the functions so let's
come back to the code and let's
keep working on the j6 okay now let's
bring down we'll take a div it will have
a class called style dot filter item box
and that will have another div it will
dot filter box item box item and this
will call transaction okay it will have
a on click function and the function we
want to call is this open video and
inside the div we're going to have a
it will have a span text and we have to
icon so close icon then you want to
so that's the thing let's come down
we going to take one more component it
will have a class called style dot fill
item box inside that will have another
div it will call fill box item box item
transaction and we'll have our own click
function and this function would be like
open Music Inside the div we're going to
have a farm music text and we're going
to have our Dynamic icon okay so cross
open music we have now let's take one
more div and we'll have a class called
style fill box item box and in that
we're going to have another debit it
filter box item box item and in that
we're going to take this user icon it
will say verified and we have our
okay so we're going to display all the
so that's our Dynamic components
everything's working fine so let's come
up here and let's check so these are the
function we have to create okay
let's come down let's create the
we target this open filter first so
let's call it function section we'll
take a filter open filter and if filter
then we have to set the filter to true
so if the field initially the state of
the filter is going to be the true so we
want to turn it to false and if it's
false then we want to turn it to True
okay so that's what we are doing General
convention else we want to set to false
so let's come here reload the browser
and you can see if we click we can open
we can close open close to working fine
and do we have to do the same check
if it's image Falls then we want to set
true l so we want to make it false
false okay simply replicate that
and this is the function we have to have
open video same thing we have to do if
video is false then set the true else
so that's open video let's come down
let's create one more which is uh open
then set to True otherwise set it to
false so I hope you guys are getting
that's why I'm going a little faster
false so these are the function for
opening and closing everything is
so let's save it come back to the
browser and reload the browser and you
just have a look on the icons Okay click
again our icon is working fine logic is
okay everything is working fine let's
come back to the filter CSS and now
let's start styling the filter okay
so let's make it side by side so you
guys can see what we are working on
so let's target the filter and padding
is going to be 4 RAM and 0 Ram width is
okay filter box which is going to be 80
that's look pretty good this display is
going to be Flex align item Center
display is going to be Flex Gap is going
to be 2 RAM filter box left button
border is going to be none outline is
going to be none padding is going to be
1 RAM and 1.5 grams I'm going a little
faster because it's a CSS we are not
writing anything logic okay we are
writing the CSS swipe that's why I'm
border one pixel solid where and our
let's assign transition all three second
font size is going to be 1.3 Ram
okay that's how it will look let's come
down let's add the media query
so Min device width going to be let's
say 320 pixels and Max device with is
325 pixels first breakpoint we're going
to Target the filter box and display is
going to be grid Gap is going to be 4
and let's come copy that and filter box
display is going to be let's say grid
and grid template column 4 repeat 3 1 fr
simply come down Gap is going to be 2
simply come here Target the filter box
button and padding is going to 0.2 Ram a
and filter box left button on over
we want to say background border is
going to one pixel solid and icon color
we want to add the padding to one ram
border radius is going to be 2 RAM
color is going to be our main background
Shadow is going to be our box shadow
let's come up here let's copy this
so this become right not left okay
so we'll have the style and we have to
not over sorry box okay so make sure you
now let's come down as we'll say display
and align item Center Gap is one ram
come down filter box left button on over
effect we want to add a border one pixel
solid VAR and I can color we want to add
the color itself to be the icon color
and box Shadow is going to be our box
so let's make a big and let's see this
is how it will look you can see on over
effect we are getting this nice
and that's our fitted open close open
close you can see it's working fine
so it's working fine this out we look on
a mobile we're going to fix this okay
it's not aligned perfectly so let's come
we'll Target the filter box items and
we'll say display is going to be
filtered Flex sorry padding is going to
be 2 RAM border top is going to be one
pixel solid VAR and we have the icon
we have the icon color now let's come
down we're going to we're going to
Target the filter box items box okay now
we'll say padding is going to be one ram
you can see that's how it look we can
now let's come down we'll drag it the
filter box item box item and we'll say
background color is going to be fair
I can color and will have a padding 0.5
RAM and 1 Ram border is going radius is
going to be 2 RAM color is going to be
where our main color and cursor is going
to be pointer so this is how it will
and display is going to be Flex a line
item Center and GAP have one five Ram so
that's looking really good as you can
open close open close everything is
so this is how we look on a mobile
device we're going to make it responsive
so let's come down Target the filter box
item box item transaction trans and
border is going border going to one
pixel solid and it will have our icon
itself is going to be icon color and
padding is going to be 0.5 RAM and 1 Ram
let's add a model edius 2 RAM and cursor
let's add a display to flex a line item
Center and GAP 0.5 Ram so that's how it
filters are working fine nice effects we
nicely we can able to click on that okay
let's come in the media query
we're going to Target the filter box
template column repeat to 1 FR so that's
but still we have a problem so let's
it will have a display Flex a line item
Center justify content Center and GAP is
let's assign a padding as well padding
it's going to be padding and line is
now come down we'll Target the filter
box item box item justify contain space
and let's come down we'll Target the for
item transaction justify contain space
and let's come here you can see it's
but still we have a little bit problem
in the width okay we're gonna fix that
again so this is how we look on the
desktop let's make it full desktop so
and this is how we look on a mobile
to Simply copy and paste this one
and now we have to add a multiple
breakpoints the first breakpoint we have
done now let's add the second breakpoint
this wouldn't be a three seven seven and
this one is going to be let's say four
to five this will be same we have to
same close this one simply copy and
and this time the breakpoint is 4 27
simply this would be same same
let's come here and go to this filter
and here we have this filter box items
okay that's what we have here
okay we have to add the width is going
to be let's say 80 percent so make sure
you add this with filter box item eighty
so right now you can see we have this
now we have to remove this padding
and let's make it zero okay don't remove
it make it zero everything is working
so so padding would be there two Ram
from top and bottom but left and right
is going to be zero okay let's come back
and that's what we have here here we
have that filter box right box
somebody come back to the CSS and
where it is that's what we have simply
and let's see what's happening here
and here we have to do the changes
simply select this and type icon color
okay this working fine this working fine
now let's add a background color is
going to be aware main color you can see
right round we don't have that awkward
color okay so it's working fine
in the media query in the first
breakpoint make sure you do these
changes Gap simply remove this Gap okay
0.5 Ram instead of 2 RAM provide 1.5 Ram
okay so that's the first thing we have
to do and here in the second media query
we have to add the width so width is
so as you can see the sound will look
and now we have to fix this one so let's
come here copy this and come back to the
and width is going to be 90 percent so
and this is how it will look let's make
so what we can do let's come back to the
jss go to the button sorry here in the
price section and remove this price make
it short let's make it 10 ether only
so let's remove this all 10 meter now
and you can see everything's looking
perfect everything is aligned
and still we have some problem in the
we're gonna fix that okay let's come
here we have this within the media query
come back to the second media query and
we have to add the width to 90 percent
and here we have to add the width as
go to the second media query the third
media query and add a width to 90
and scroll down and here in the filter
and now it's look little better you can
see make sure you do all these changes
this is how we look on Tab and this is
how it will look on a desktop
this art will look on a mobile device
100 response you can tap it close open
things are looking really beautiful
make it down and this is what we'll look
we have this feature component we have
the menus and nft arts music Sports
paragraph and the filter options so this
is the title component this is the
this is the filter component open close
provide this so this is going to be the
component we're going to add in every
single page and we're going to add the
display the nft on the base of this
so that's looking really good
so let's come back to the code
and with this we are done with the
entire code okay so let's have a look
one more time let's close this one and
close this one as well come back here
and this is all the folder we have
in this video we're going to build the
nft card section so let's click on this
component and we have to create a folder
create a file jsx file nftcard.jsx and
we have to create the CSS file as well
so nftcard module dot CSS so these are
the two files we have created come back
to the nft card and type rafc e and here
we go to do couple of internal Imports
so let me do this command internal
import and we're going to import our CSS
file which is in the same directory okay
so that's the internal import now let's
click here and go to this component
index sections and here we're going to
import that component so let's call it
import and we have to import the nft
card okay and that's what we have to
okay so this is the pattern We are
following and if you are watching this
video right from here make sure you
follow the complete playlist which I
will link in the I button on the
description so you can know that what
exactly we are building so that's the
export now close this one come back here
close this one and go to this
index page because this is the component
we're going to render in our index page
so here we are on index.home and the
very first thing we have to do is to
import the components so nft card okay
just simply remove this simple nft card
and that's coming from component index
now we'll scroll down and here we're
and now we can come here in the
applications and you can see here we
have that nft card component so that's
successfully rendering on our
and let's close this one and now we can
start working on our nftcard.jsx okay
so let's Zoom a bit and let's import
couple of things so first thing we need
the icons filter heart okay we need one
more which is our outline heart and we
have to import the image and that's
coming from bootstrap then we have to
import the next.js image tag okay so
that's the external import we have let's
do couple of internal Imports so we have
to import the image images that's here
in this folder so that's our internal
import so that's we are done with the
internal external Port now let's start
writing so here we are taking uh array
and we're going to Loop over the array
to render our card okay so we'll take a
demo data we'll say one two three four
five six eight nine so I'm taking nine
because that's many element I'm going to
display in the front end in the home
let's come down we have to take a couple
so we'll call it let's say like
now here we have to import use state
now let's come down and let's remove
this and let's start with and now let's
so it will have a div and it will have a
class style Dot nft card inside that
we're going to take a dynamic block and
in that we're going to call the demo
data and we're going to Loop over it map
LMI and it's going to be instant return
and that we will take a div and it will
let's say it will have a class
and it will have a key okay I plus one
and that will have another David will
have a class style Dot nft card
image and in this we're going to use the
next JS image stack and here we're going
to provide the source of the image which
is inside this image and we'll call this
nft one and it will have a old tax nft
image with is going to be 600 and height
so that's the image now we have to
assign the class style nft box image
image okay so this is the pattern which
I'm following throughout this entire
project and I believe that you guys are
getting familiar okay so that's why I'm
because some of you guys have said that
I have to go a little faster because my
videos are getting very long like it's
40 minutes or one hour or two hours so
I'll try to go a little faster so let's
let's come back to the application
and let's scroll down you can see here
we can easily able to render the images
so all together we are rendering nine
images so all the images we are
displaying okay that's working fine
let's come down we'll take another div
it will have a class called Style
and in that we will have another
dividend to have a class called let's
and and that will have another it will
say style dot nft box left Dash like and
so let's add our own click function on
and it will say like function okay so
this is the function we're going to
create because when someone will click
add the like okay update the like data
and we have to show that like icon okay
so that's the function we have we will
give it now let's come down and we'll
take a dynamic block if the like is true
then we want to display this okay this
and if it's not true then we have to
display this normal one it's okay this
let's say outfit so the first I can we
have to display the only outline the
border and the second if it's true it's
false then we have to display the pull
icon okay and it will also have a class
box left like icon okay so that's the
let's come down and we'll take this ant
with let's add normal space and we'll
give the demo data to 22 okay these all
data is going to be dynamic when we
API we're going to run the data
but Nitro but right now before the
design purpose we are giving this
so this is the data we have let's come
down we'll take another David we'll have
a class called style and we'll Target
the nft Box update write section and
and that we're going to take another div
it will have a class called style nft
box update right and this time we'll
call it info and in this we're going to
display the information about the nft
okay so we'll bring it down we'll take a
small tag and the first we'll say that
remaining time so every nft will have a
time schedule okay so when the rft was
updated is there any offers going on in
that particular nft so those are the
time we will assign to the nft the
moment the nft will create okay
so that's what we have here and we'll
take a P tag and here we'll display the
time time for the offer okay remaining
time and we'll come down and we'll take
let's say another name it will have a
class called style and we'll call it NAB
box update and details and that will
take a div it will have a class called
style and nft card update details Dash
price that will have a tip it will have
a class called style dot entity box
update details price and this will call
a box in that we'll render the H4 and
here we're going to give this name of
the nft so let's call this random text
okay which is there in the design now
let's take a div and let's we have to
call the style and we're going to Target
Brock's box Dash box okay in that we'll
take a divider we'll have a class call
entry box update price price box
and in that we're going to take the
small tag and we'll cite current bid and
download will take a P tag it will have
the price of the nft okay one ether
let's come down let's take another day
um let's call it nft details price box
stock okay and that will take a small
and here we'll say that 61 in stock
so that's the stock of the nft
and we'll take a div it will have a
and let's call it style dot nft update
inside that will take a our icon our
image icon because if this is an image
so in this Marketplace we are trying to
sell three different type of nft audio
video and images okay so according to
that nft we're going to display
different icons okay so right now it's a
hardcore value image so that's why I'm
giving this image sign but this data
becomes Dynamic okay so let's work on
the jsx part so here we are on the
website and you can see everything is
working fine we have that like we have
the name we have the price bidding and
stock and the icon so everything is
all the things are working fine so let's
and okay so here you can see we have to
create this like nft function so simply
copy that and come here and let's create
that function so we'll call it const
like nft and it's going to be an error
like is false then we have to turn it to
True else we have to turn it to false so
that's a very pretty simple function
so let's come back to the application
and now you can click on this and you
can see like unlike unlike unlike so
that's working absolutely incredible
so let's come back here and so
everything is working perfectly so here
we have that in here we have the
functions and this is the demo array and
so let's come back to the CSS and now
let's start working on the CSS file okay
so let's make this side by side so you
guys can see what we are actually
working on so we're going to Target the
nft card display is going to be great
and grid template column repeat 3 1fr
I'll go a little faster okay because
this is a styling and you guys are
already familiar with the type of
styling We are following so I'll go
let's come down let's add a media query
so it's going to be a Min device with is
going to be let's say 320 pixels and the
is going to be let's say three sorry 425
pixels and in that we're going to say
get template column whatever for the
mobile device you can see everything's
now let's come down and we have to
Target the nft card box and background
color is going to be our let's assign a
we have to get the padding one ram
grid template column repeat for one fr
grid template row repeat for 1fr
box Shadow our box Shadow custom color
let's come down we have to Target the
nft Box on over effect we want to Target
transform scale is going to be 1.0.4 and
Border radius is going to be one ram so
that's how it will look let's come down
we'll Target the nft Box update
it will have a great column one slash
same thing for the row one slash one two
okay Z index is going to be something
big number you can give any number
display is going to be Flex a line item
Center Flex start and justify content is
going to be space between line height is
going to be 0 overflow hidden so that's
how it will look on over effect you can
see the Box Shadow and the text are also
aligned perfectly mainly our icon or
like component okay so let's come here
and it's gonna be a left section
background is going to be our icon color
padding is going to be 1.5 RAM and 1 Ram
color is going to be itself main color
and more video is going to be too Ram
and let's provide the E so lighter is
let's come down we'll Target the nft Box
and display is going to be Flex align
Target the nft card box and GAP is going
now Target the nft card box left like
icon and color is going to be red
and we'll have background color to our
Shadow light and padding is going to be
0.5 RAM and 5 Ram text align is going to
bottom bottom left radius is going to be
margin right is going to be minus 2 RAM
okay you can see the Sterling let's come
down we're going to Target entry update
and transform is Q minus 45 degree okay
background color is going to be our
nft box update write info p would be
grid column one slash one and grid row
overflow hidden and Border radius one
ram you can see it's looking perfect we
have the image everything's working fine
let's come down we'll tag the nft Box
will have a motor radius one ram
transition all 0.4 second easy in an
okay grid column one one and grid row
same thing we have to do this line
height is going to be a zero Z index
something big number and a line item is
going to be Flex end display is going to
be grid and grid template column one
point FR and 1fr overflow is going to be
hidden so that's looks incredible okay
now let's come here we're going to
update details and price will say bar
background color our shadow light
margin left -3 RAM and padding is going
0.5 and 0 that's how it will look
right radius is going to be one ram
transform is q y minus 45 degree to make
it straight and let's assign a padding
let's come down nft box update details
H4 font size is going to be 1.3 Ram
nft box update details price box box and
display is going to be Flex justify
content space between a line item Flex
okay does look good let's come down
we're going to Target that nft box
update details price box and bid okay
bidding section and we'll say border one
pixel solid where our eigen color and
padding is going to 0.2 Ram 0.5 Ram
align item center biode radius 0.3 Ram
so nice modern color we are getting
let's come down we're gonna type nft box
update detail price box vid and this
will be a small background color is
color itself is going to be a main color
and more radius point to Ram padding is
now let's come here Target nft card nft
box update details price box bed and we
have dragged the P tag and padding is
padding is going to be let's say
0.5 Ram zero zero zero and that's how it
will look font size is going to be fun
an empty box update details category
it will have a color to this icon color
text aligns and end and margin 1.5 RAM
and font size going to be 1.5 Ram so you
can see our icon is also looking good so
this card is also looking beautiful okay
so let's come here make it on a full
screen this is how it will look on a 322
pixes and if I come here you can see
it's already looking much better on a
if you come here this is how it will
look on a big screen desktop mode we're
gonna fix it okay so this is how it will
and it's also looking good on a mobile
device now let's work on the media query
and we're going to Target nft box update
right and padding is going to be 0.5 RAM
and 2 RAM let's nft box update write
info by the font size is going to be one
ram you can see right now we have a
text in our mobile and now our remaining
time is working fine so it's looking
let's close this one simply copy and
replicate this one and we have to change
this media query to 427 and this become
768 okay in this we're going to define a
width to let's say 90 percent
what else we have to do then here in the
grid template we have to do the changes
so repeat to 1fr so we want to display
two cards in a in this media query range
simply close this one copy and simply
delete this part and here we have to do
the changes 770 and this become
1024 and which is going to be normal and
will have to okay so let's come back
it's looking perfect on a tablet if you
click here here we have you can see here
and that's how it will look on a bigger
all the functions are working fine okay
some problem we have on our click
function not a problem we're going to
fix that okay but I just want to assure
you that it's working we can click and
we can change the state of our like okay
so that's working so it's working fine
let's scroll down so it's lovely working
fine come here and here we have to
assign the width okay the width is going
to be 100 and in the box we have to say
which is going to be 80 percent and
zero and auto so that will hold the
entire div inside the container let's
come back to the application and you can
see it's looking really big okay
okay let's come here let's simply remove
this and that's how it will look on our
desktop now let's remove this one eighty
percent and this will become margin
now you can see it's look perfect okay
so this card is looking absolutely
incredible you can open the filter and
close that's also working fine and we're
going to display the data dynamically
okay so we have this tab on the base of
the click event on the tab we have to
change the data okay so right now you
because we are not passing any data in
that but this card is reusable we can
use anywhere in our application because
so it's look perfect you can see we have
let's come here that's also working fine
let's come back to the code and
let's come here let's close this one and
I don't want to have the box Shadow to
this card so that's what I did I removed
that card box Shadow and now it's
so simply do one thing remove
let's come down on over effect we want
add a transitions because we want to
have that all 0.3 second easy in will
come down and we'll Target the FTE card
box on over effect we want to change the
Box Shadow to this one simply uncomment
this and save it let's come back as you
can see the on reload the browser
on over effect you can see Ryan nice
background Shadow we are getting
that's looking absolutely incredible
and if you do the inspect element
if you go on a mobile device as you can
this this is how the card will look on a
mobile device okay so we have some
problem in the mobile device as well
and scroll all the way in the media
open this one and here we already have
this so we can say width is going to be
80 percent and margin 0 Auto if we save
it and now it's look perfect okay it's
taking 90 percent win let's come to the
second media query and here we already
pass only in the mobile device okay so
that's look pretty good now let's make
it full this is how it will look on our
perfectly aligned and on click even we
on over when we are getting this nice
let's make it big and this is how it
right now we have display two and that's
let's make on a big screen and this is
how we look on a bigger screen
where the filter is taking full and card
and close and you can simply open let's
make on a desktop and that's how it will
nice over effect we are getting the
let's come back to the code let's make
it to normal box Shadow okay now this
one is look let me make it to that one
okay they're working fine let's come
back to the code and here we can provide
let's say from the bottom let's say four
and we'll have some speed increase this
from the bottom and these are the
component is also working fine
okay this is the IDE this is the timing
this one is also working fine
profile menu but on this section
Dynamic data Dynamic slider working fine
again this is the filter component we
nice over effect we are getting
and this is the advanced fish so we can
and this is our nft card component
this is the category component you can
nice over effect we are getting and this
and that's the footer we have this nice
let's do the inspect element and have a
look on the mobile device so
that's how the card would look like
if we overrun it we are getting this
lifestyle also it's 100 responsive for
all the devices you can see that okay
so we are going on a good path
everything is working absolutely
so let's close that and now we can come
back to the code answer play Make It
full screen and now we can start
so let's close this one close this one
in this video we're going to complete
the collection section okay and now what
we can do we'll go to create a folder
and we'll call it collection inside that
we're going to create a file
collection.jsx and in the same file we
want to create the CSS file collection
dot modules dot CSS okay these are the
two file we need now let's simply type
rafc and we have to import the CSS file
in turn so let me give this command
style and that's coming from the same
directory okay so that's the input we
now we have to create one more folder in
the same collection folder and we'll
okay because this collection component
is divided in three different components
okay we will have a tab and we can
switch into the different tabs and each
of the tab will contain different data
okay so I'll create a component by the
name day component okay so let's give it
a file for that so day dot jsx and we
have to create the file in the same
folder module.css okay simply type rafce
and we have to do the internal import
our CSS file and that's coming from the
same directory okay that's the day
and let's close this one and now we can
start working on our collection
this is what we're going to build okay
so if we click on this we can switch to
all the data is changing and this is
what we are about to build in this video
so let's come back to the code and
let's come here go to this component
index.js because we have to import it
from the same collection collection and
now we have to export that from here
we'll close that and we'll go to the
simple Pages index and in that we have
so where we want to use we want to use
here okay let's provide that collection
this way we can able to render the
and here we're going to Simply copy the
titles and paste it above the filter
we're going to paste the same thing in
because collection will also have a
title and we'll say that filter by
collection okay so let's scroll down and
okay we have to start the application so
click on this 3000 and here we are on
the application let's scroll down and
here you can see filter by collections
and our filter is also having the title
so that's the data Dynamic data
and that's our collection company
no changes no breaking changes so make
sure you should always check your code
let's come here bring the terminal down
and let's remove this part let's type
new that's okay that's look perfect
let's close this one now we can start
working on our collection.jsx
so we'll have to import couple of things
so use State we need we need use
we want to import the let's say icon BS
calendar date fill now we have to take
calendar three and that's coming from
react icon bootstrap okay so now these
now we have to do the import so we have
to import the day component and we have
but inside this dick component day
component file okay now we can start
working on our jsx so let's take a use
State and we'll say it popular okay
initiative bit rooms so when someone
will visit to this page the home page we
want to render the popular popular
collection so we are setting the true
and the next use state is going to be uh
following and this will call false
and third one is going to be let's say
news is it will become false so these
are the three use that we have
now let's bring down we'll take a consc
card array we have to take a demo data
and we want to render close to let's say
eight component card array and we have
to change this to following array
and we want to display close to four
and we have a news array and this will
have a let's say six and the reason why
I have taken this different array
numbers because I want to show you the
different when we will switch from one
to the other you will find the
difference that the tab is working okay
so right now we are going with this demo
data but once we have the data from the
API we go to render from there okay
so that's these are the three arrays we
now what we can do now let's start
working on the j6 so we're going to take
the instrument and we'll have a div it
will have a class call style dot
and that will have another div it will
Dash title and that will take H2 and
and that will have a div it will have a
style called collection collections okay
collection collections so first
collection without a second collection
and that will take a div it will say
have a class called collection
BTN and we'll take the button tag
on click functions and in this we have
to attach this open popular and it's not
going to be a sale closing button okay
so remove that and take a normal button
and in that we're going to type the text
so that's the button we say let's say
so we'll Target the our alarm fill icon
and we want to display the text so last
so that's how it will look you can see
working fine now simply we have to
we have to change this to news
let's change this to open follower
okay now we have to change the icon as
well so calendar three and the next icon
we have is date fill so here you can see
the buttons are working fine the text is
also working fine and titles is work
working fine so we are done with this
so let's come down we're going to take a
and the reason we have taken this and
the reason why we are taking this
Dynamic block because this component is
going to be dynamic and this will
compound will display on the base of the
click event on any one of these
so I hope you guys are getting so in
say if popular is true then we want to
display the popular components so inside
that we'll take a div it will have a
class style and we'll say collection box
take the demo data and we have to Loop
so it will say LMI we have to instantly
return and we have to call the component
I plus 1 okay so that's the component we
save it right now you can see it's
displaying file and we can able to have
that click even function but nothing's
working because we don't have the
function okay you know the browser
so make it let's come here we'll say if
following then we want to display this
component so we'll take a div it will
have the class same class we want to
so the class we want to assign is the
collection box inside that we're going
to take the following array and the same
company we're going to render simply
change this following array now simply
replicate this and we have to change
and this become news array and the rest
would be same you can see it's working
this is also working fine this is also
working fine let's come up here
now copy the following array and that's
what we have to pass in following array
now it's perfect now let's start
so the first function we have to create
is this popular open popular and it's
going to be error function if popular is
false then turn it to True else
and set the other component to false
simply copy and replicate that and do
the same thing for other as well so this
become false true copy paste and copy
there and simply say false and this
become true okay so I believe you guys
getting what we are doing here okay
we are opening one component at a time
so let's come here and click on this
click on this nothing is happening okay
nothing is happening why you know the
and click here nothing is happening
so let's come back to the code and
can you find the code what is the
just pause the video and try to look at
the code and check what's happening
so the problem we had is here okay we
checking okay so we have the popular and
we have to check for a following when we
are looking for the following component
so it's going to be a following and this
become news so copy and simply pass the
come here and click on this okay this
one is working but seven okay something
problem we have you can see it's working
but we have some problem let's come back
to the code and here is the problem we
so let's do one thing simply
change this copy this one and change
this to popular and this become
okay I don't know how they switched
maybe I did it who else can do that
so now we are good to go with this now
we can come here and check you can see
this this everything is looking fine
everything's working fine our Taps so
with this we are done with this entire
okay everything's looking good now let's
so we're going to Target The Collection
which is going to be 100 padding is
collection title gonna be with is going
text align Center that's how it will
we'll Target The Collection title H2 and
font size is going to be three Ram
margin bottom is going to be 4 Ram
background color is going to be our main
padding is going to be 0.5 RAM and 1 Ram
border radius is going to be 4 Ram
display Flex justify content space
sorry space around and one ram and the
line temp Center and font size going to
box shadow where and we'll have our box
Shadow custom color so save it this is
and collection buttons and we have our
padding is going to be one ram border
more radius 4 Ram corset pointer
and Border one pixel solid where and we
have the icon color then we have
transition all 0.3 second easy in that's
now we'll Target The Collection button
on over effect we want to change the
background color to transparent and
color we want to make it I can color you
can see on click event we are getting
transparent color and it's looking
so that's working fine now let's come
down we have to Target The Collection
Box itself with is going to be 80
and grid template column repeat 3 1 FR
Gap is going to be 2 RAM okay it's
we have to take this media query and on
Min device which is 320 pixels and Max
we want to Target The Collection title
and this is going to be 90 percent we'll
take the collection box and this is
going to be 90 this one and grid
template column is going to be 1fr and
GAP is going to be 4 Ram so now it's
we'll Target the collections collection
BTN buttons and we'll make it font size
to 0.7 Ram little smaller okay so let's
last from all the button now it's look
perfect you can see so here I'm removing
the last if you want you can keep it or
you can remove it it's totally up to you
if you want to display only on the
desktop then you can take a Spam and
make it hide on a mobile device and make
it visible on the desktop okay but I'm
so that's looking perfect let's take
another media query and this time Min
device with is going to be start from
427 pixels and all the way to
124 pixels so collection title width is
going to be 90 and collection box
where is going to be 90 but great
template column is going to be repeat to
one FR and GAP is going to be 4 Ram
okay so if we come here and now it's
looking perfect perfect but as you can
see the moment we are going above 400
and in between 1000 we are displaying
two in a row so that's looking perfect
and this is how we look actually on the
okay that looks absolutely perfect and
so our component is also working fine
let's do the inspect element follow more
and that's look great let's close this
and now we can start working on the
other component which is the day
component so that's we have inside this
inside this collection and we have to
open this and now let's start working on
so we're going to a couple of things we
icons so MD verify and that's coming
from Material icons material UI MD okay
let's do the internal import so we need
to import the images folder so images
that's the internal external import now
let's start working on the jsx simply
we'll take a div it will have a class
called style dot days component small d
and remove the S and that will have
another divided to have a class called
days component with box will have a div
it will have a class called Style
day component box Dash image and that
will take the image it will have a
we have the Creator background one
and it will have an all class as well so
today day component dashbox image image
and all tag is going to be let's say
profile background with is going to be
500 and height is going to be 300.
that's the images and object fit is
going to be covered so that's the image
we'll Target the div it will have a
class called style day component box
in that we'll take an image and it will
Collection image to all tag it will say
profile and width is going to be 200
and height is going to be 200.
it will have a call class as well so
image one okay all together we have
three images one so all together we'll
have four images One the main image and
three we have the lower images object
fit is going to be let's say covered
so this is the first image let's simply
select this one and replicate this okay
three times now we have to change the
classes for the image so it will be two
that's looking perfect let's come down
we'll take a David we'll have a class
called style day component box title and
that will take this H2 and will give
this amazing collection name of the
and here we will take another dividend
we'll have a class called the component
box title Dash info in that we'll take a
div it will have a class called style
will take the image and we have to
display the profile image so image dot
user user1 and it will have a
profile which is going to be 30 and
an object fit is going to be covered so
that's look good and it will have a
class as well so day component box Dash
it will have a p we'll say creator
and in that we'll take a span and here
we're going to do the name so strap I
and we'll take a small tag and here
we'll have to display the verified icon
okay so that's how it will look
fine let's come down we'll take another
divides we'll have a class called style
and that will take this small and we'll
okay so that's looked pretty good
so with this we are done with the j6
so this is the external internal import
and here we have the images all the
so let's come back to the application
and here you can see we are getting an
so simply remove this okay I don't know
how why it's come here somebody remove
Emerald this one and this one
and here I can say remove this Shred by
now let's come to the application
and here you can see we can display the
collection name profile Creator name and
The Ether so everything's looking fine
you can see this is how it will look on
a desktop all looking much better
this is how it will look on a mobile
device let's make it side by side
okay let's use this and let's come to
the CSS file and let's start working on
so we're going to Target the day
well save with is going to be 100
transition all point three second easy
day component on over effect we want to
add a box Shadow to where box shadow
so you can see let's come down day
image image it will have a border radius
grid tablet column repeat one three one
FR and GAP is going to be 0.5 Ram so
that's how it will look you can see it's
we'll stagger the day component box
border bottom left radius one ram
replicate that and change this to three
and this will become right radius save
let's come down Target the day component
one ram and two Ram so that's how it
at the left line height is going to be
info well display is going to be Flex
justify content space between a line
simply replicate that and this will
and change this to font where this is
inline is going to be 0.5 Ram day
price info price small become the
one bit is going to be 600 border 3
pixel solid bar and icon color we have
simply replicate that and let's assign a
padding 0.5 RAM and borrow radius 0.5
so let's come here go to this and
simply type this price it not profile
so you can see right now we have that
let's write a media query so min
device width is going to be 320 pixels
and the highest is going to be let's say
Max device bid is going to be
take compound box will have a profile
say grid template column repeat three
Flex Direction column Gap 2 RAM
align item Flex start and padding is
going to be one ram so that's how it
now let's take this come out of that
media query normal they component box
title and this will have a padding one
everything's working fine let's come
let's start looking on a more LS Mega
perfect on Click app and we are getting
let's scroll up and here you can see we
have the images day component box image
simply and this is the image
and here we have made the mistake so
remove this profile and now simply type
and if you save it now we have this
borrow it radius you can see it's
collection component so we are done with
so let's make a full screen and let's
have a look you can see this is how it
will look our top list creator
so if you over on it nice overfeed we
nice style and smoothly responsive for
all the mobile device as well let's
scroll down all the way and on over with
so we have the problem in the image you
can see the image and the text is not in
equally aligned so we have to fix that
okay but but the rest is working fine so
and let's come here in the jsx
and here we have this day box title info
that's what we have select and remove it
and save it okay no no bring it back
let's take this another day component
box title info profile and let's say
display is going to be a flex okay save
it and this is what we look it's working
fine and now we have to say align item
and let's assign a gap to to Ram so
let's make it one ram now let's look
perfect you can see equally aligned
if you click on this we can display
dynamited I can see data is changing
nice over effect we are getting
so let's close this one close this one
here we are in the collection so this is
let's come here in collections and we
save it we'll have some space no let's
now we have good more space from the
we can switch to different pages
different components working fine
does look absolutely incredible open
close open close all the buttons are
in this video we're going to build this
follower component so this is the
component we're going to design we will
have this tab and we can easily able to
switch between different component so
the very first thing we have to do is to
create a folder for this particular
component okay so let's click on this
component section and create a new
folder let's call it follower
this is the folder copy and simply
create a j6 file this will call
forward.jsx and in that we have to
create the CSS file for that so follower
module dot CSS so this is the file in
which we're going to design our tabs so
let's create the reacts functional based
components our type rfce let's do the
we need to import our CSS file so import
style and that's coming from the same
okay let's close this one close
let's come down here in the component
index and here we have to import this
file so import we have to follow our
tabs and that's coming from the
component and simply copy that and pass
and now let's come to the pages go to
this index.js and here we need to import
the component and here we go into let's
right above the collections and here
we're going to call the components so
so that's the tab for the follower
if we come through the application and
here you can see we have our new
Collections and here we have the
where we have the followers app so it's
so let's come back and we should give a
title simply copy this one and it's
already there let's remove that one we
don't need to have it because we already
have the stop list Creator so we don't
need to have extra titles for the
creators okay so that's why I removed it
okay so that's okay that's look good now
let's close this one and now we can
start working on our follower tab so
before we start writing code for this
follower tab I noticed that many of you
guys are in hurry for building this
entire application but trust me once we
completely build this entire home page
and that's why I have divided this
entire project into a multiple component
because once we complete the entire home
page you will find that these component
which we are building and giving so much
time for Designing and making reusable
that component we can use into the
collection page author Page search page
in those pages we can simply plug this
component and the entire template would
so once we're done with this entire home
page you will find that when we build
the other page it's become very fast
okay so just be with me have patience I
want you to learn something how to
create a usable component and how you
can build any kind of application and
design it like that okay so just try to
go in a slower Pace because in that way
you will learn otherwise I can put some
background music and I can simply type
all this code or I can provide the
entire code but in that way you will
learn nothing okay so with that said now
so let's come here let's import couple
of things from react so first thing we
need to use State and we need use effect
okay let's come down we need to import
the let's say icon so all right use
follower fill and that's coming from
let's import one more icon user
unfollow fill and one more is going to
so these are the icons we are importing
now let's simply remove this I don't
know why it's game copied twice okay
now we need to take this demo data card
array and let's take close to
okay we're going to Loop over this card
to create the dynamic data okay
so we'll take a another then this will
call falling array and we'll call news
so these are the demo data we have now
let's remove that let's take a div it
will have a class call style and we'll
call it let's say followers
inside that we'll have another div it
will have a class called style follower
we'll take the H2 and it will have a
and that will have a div it will have a
in that we're going to have another
debit we'll have a class called Style
tabs button and that we're going to have
the button so we'll take this button
time and we'll have on click functions
and for the time beings Let's uh call
the function is open poplars so this
function will allow us to open the
follower component okay so I'm just
let's take the icon okay so the icon
RI user follow fill okay and here we're
going to take the text popular so that's
the one button we have simply replicate
this three time okay and now simply
change the text to following and this
will become news and we have to change
the follower name as well let's change
the icon first so this will become let's
and this one becomes RI award line and
let's change the function name to this
and this one's becomes the news Okay
so these are the button we have here
will come down and we'll take a dynamic
block okay so here what we have to do is
we have to take a couple of few States
so first we'll take popular and
initially it will be true because this
is the component we're going to display
when someone visit to this page for the
very first time okay let's take the
another use State and this will become
following and it falls and the third one
is going to be the let's say news and
it's false so these are the three use
States we have now let's come here
if popular is true then we want to
render this component so inside that
we'll take a div it will have a class
in that we're going to take the data
card array and we go to Loop over it
and in this we're going to render the
component tab okay so this is the
component we're going to create follower
tap card component and we're going to
and in that we have to pass the key so
it it should be unique otherwise react
will give you an error and in that we
have to pass this couple of props one is
I and the second one is the element
so these are the problems we are passing
in that follower tab card component okay
so this is our Dynamic component
now let's come here go to this follower
Tab and in that we're going to create a
folder we'll call it follower tab card
and that we have to create this jsx and
we have to give this rfce and in that we
have to create the CSS file as well
nothing new We are following the old is
gold okay now let's do the internal
import so internal import we have to
import the CSS file and that's coming
so that's the important internal import
sorry now let's come here import the
components and that's coming from the
follower tab card and follow tap cards
so right now it's working fine
let's do one thing let's simply copy
we're going to call this one let's say
let's come up here and we're going to
copy this following and we have to
change that one as well and we have to
change the data to following array
and following array okay simply copy
that again and simply copy again and
replicate that and this time we're going
we have to change this data to news
array so that's our three Dynamic
and only one component would be open at
and that would be triggered on the base
so that's the logic we have so that's
we need to do here in this follow tab
okay so let's expand that one and let's
aren't we missing anything no let's
and let's come down here we're going to
take another div and in that we're going
to have a class called style and we'll
in that we're going to have a class
and we'll call it follower tab member
box in that we're going to take this
anchor and in that we'll say show me
and this will become call become an
author okay so this is what we have in
the design okay so that's the jsx part
now let's create the function
so let's come up here and let's create
the function so we'll call it cons to
open popular it's going to be an error
function we'll say if popular is false
then we want to set it to true
true and we have to set other component
to false as well okay so set following
news following simply replicate that
assembly copy and simply paste it and we
have to change the name to let's say
open news and this will come true and
the rest would be false okay so that's
we are done with this open close tabs
and here we are getting some error title
undefined okay just reload the browser
so we have this problem okay let's come
back to the code and let's have a look
okay that's the problem we have to
every rule of the browser right now we
have no more error and if I scroll here
you can able to find that we have the
title we have the three button with the
icons and the card is also displaying
and the anchor buttons are also
displaying perfectly let's click on this
okay that function is not working why
let's click on this not working
let's bring the terminal down and here I
have noticed one thing that I have to
change the check okay so I have to say
following and this may become the news
and now we have to save it and now let's
come now we can easily able to open
close open close it's working fine
so that's competence working fine now
let's come here and let's go to this
this follower tab card and let's start
we need to import couple of things so
first thing is going to be you state
that's coming from react okay you state
now we need to import the let's say
image that's coming from next.js and we
have to import the icons verified icons
okay now we have to import the
TI tick and that's coming from the react
so these are the external import
now let's come down we have to import
the images which is inside that dot dot
so that's pretty much now let's come
here we have to take this U State and in
and it would be initially false
we'll remove this let's come remove this
we'll take a div it will have a class
and that will have another div it will
have a class called style forward tab
in that will have a p and we'll say hash
and we'll add the dynamic data okay
I plus 1 and you might be thinking from
where we are getting this I we are
sending as a prop in the forward TAP
so let's come here let's come here and
type this I need to take an emoji simply
copy this emoji and that's what I want
to display okay so that's the middle and
here I need to receive the props which
I'm sending in the follower tab
so give this Sam we need to receive the
so come here and let's close this one
and let's come up here and here you can
so let's come down and we'll take a div
it will have a class called Style
and tap follow tab card Dash box and
that will have a table will have a class
called style dot follower TAP card Dash
box Dash image and that will take the
image so we'll say image it will have a
Dot background one and we have to assign
the old tag is let's say profile
profile background we have and we need
to assign the width 3 500 and high we
need to assign the class so style dot
we'll take a div it will have a class
and and that will have a image tag and
we have to give the source first we'll
assign the class call style and we'll
say follower tap card box profile image
it will have the old tag let's call it
profile picture and we will have a width
so let's have a object effect to cover
let's come here let's add the source of
the image so it's going to be Images
let's come down we're gonna take that
div it will have a class called style
dot follow a tab card box info and that
will have another tab it will have a
class called style follow a tab card
dashbox info name in that we're going to
have this H4 we'll call it Keda
Manon I don't know this name is there in
the design so I'm putting this and let's
give this space and in that space we're
going to take this span inside the span
we're going to render the verified icon
so that's what we have there looking
let's come down we're going to have a PE
tag and inside that we're going to
render the price so let's give a random
prize let's come out of the dev it will
have another div we'll have a class call
and that will have this Dynamic okay if
following is true then we want to render
it will have a on click function and on
that on clean function we need to call
we have to call to follow me and in this
type the text okay follow and we'll have
a span inside that we're going to give
this Tech Mark okay that means the user
well take the another anchor tag and in
we need to do the same thing okay well
it will have a on click function on this
and when someone click on that we need
to call this follow me function
and inside that we need to type our text
following will give the space so we're
going to render this following message
so that's the jsx part we have written
so let's come here and now we have to
create this function follow me
it's gonna be an error function we'll
ing is following me is true then we have
to set this set falling to True else we
we need to call it set following two
false so that's our follow me function
so it's working absolutely fine let's
have a look let's come back to the
application and let's try you can see
everything is working fine we can easily
able to render the title Button images
and here is the middle and with the one
if we click on this we can easily able
you can't see that but it's happening
so let's come here and come to the
and let's get start styling this okay
so let's make this side by side so you
guys can see what we are working on
so let me do the proper side by side
inspector limit and here you can able to
let's come here Target the follow tab
and width is going to be let's say 100
padding is going to be padding block 6
we'll take the forward tab title
with this going to be 30 percent 30 13
and padding is going to be 0 0 6 RAM and
let's come down we have to take make it
and let's come out of that and we'll
take a Target the follower title H2 and
font size is going to be three Ram
little bigger on a desktop and margin
let's come out of that we'll Target the
follow tab Dash tabs buttons and
background is going to be our main color
padding is going to be 0.5 RAM and 1 Ram
border radius 4 Ram display Flex
justify content space around Gap is
going to be one ram a line item Center
font size 1.2 RAM and box shadow
Shadow color okay this is how it will
we'll Target the follow tabs button
and we can say background where
is going to be our main color
padding is going to be one ram
border one pixel solid where I can color
thus looks pretty good let's come down
we have to get these transitions all 0.3
well Target that follower tabs button
button itself on over effect we want to
add some styling so background color is
going to be transparent and let's say
color is going to be our icon color so
as you can see it's working perfect and
beautiful now let's start with the
follow tab box and width is going to be
80 percent margin 0 Auto display is
going to be great and great template
column is going to be repeat for one fr
let's Gap is going to be 2 RAM this is
and you can see we can easily able to
switch between different components
well Target the follower tab box anchor
a and let's start with the first child
this will become let's say background
call is going to be a transparent
color where it's become icon color
and transition all 0.3 second easy in
so we are targeting our button first
button and let's add the follow button
okay let's come here we'll Target the
box and it will say margin 0 Auto
okay we got in the error and padding is
going to be 7 gram and zero zero zero a
so our button will be in the middle
copy this portions and simply remove
we'll tag the let's say member box Anova
effect we need to have a background
color to where I can color and color is
going to be our main beachy color
let's come down we'll Target the member
box a and background color is going to
margin in line is going to be 1.5 Ram
padding is going to be one ram until Ram
color itself is going to be our VAR main
and boy moderate is going to be 2 RAM
and modern one pixel solid where our
box Shadow is going to be let's say box
font size is going to 1.3 Ram so it's
look pretty good let's come up here and
so it's working fine you can see our
button looks absolutely perfect on a
large device okay we're going to make it
this is how it will look on a smaller
screen but this is how to look on a
larger screen so it's working 100 our on
over effect is also working fine
let's come down let's add a media query
so admin device with is going to be
320 pixels and Max device width is going
at least make it to 4 25 pixels and that
we're going to Target the follower Tab
and padding is going padding block is
let's come down we're going to Target
the follow tab box and width is going to
be let's say 90 percent that's how it
we'll say follow a tab title which is
and let's come down we're gonna Target
the follow tab title H2 and we need to
let's come down follower tab member box
and GAP is going to be zero
follower tab Dash member box a and font
size is going to be 0.8 Ram padding 0.5
so that's looks perfect you can see the
button is looking great let's come down
tabs button and button itself will say
font size is going to be one ram so
okay that's looking great let's come
and this and let's say grid template
column 1fr so that's look absolutely
perfect now everything is perfectly
so does look great let's scroll down and
that's the first video I can simply copy
that and simply paste here and we need
let's come here let's have a look
okay that's what we want to achieve
and here we need to change this to let's
428 and this will become 769
and then we're going to Target the
follower Tab and we'll say grid template
column repeat to FR okay let's align
that properly we'll Target that follow
tab title and we'll make it width to 90
follow tap title H2 is going to be the
font size is going to be 3 RAM
let's come down we'll Target the forward
tap member box a it's going to be font
and padding is going to be 0.5 RAM and 1
so let's close that one simply copy this
we have to say follow tab with is going
font size is going to be 3 RAM
let's come down we need to Simply say
follow tab box with is going to be 90
create template column repeat to one F4
so if I come here open in the last scale
you can see everything is working fine
right now we have in two columns if we
go in a larger screen we have this into
column so things are looking good
so let's come back here and let's have a
you can see this is how it will look on
a small device big device and let's make
okay everything's working fine
let's close that one let's come here go
forward card component and let's start
before we do that let's come here so
this is what we have to Target okay so
let's come here and let's follow a tab
card and display is going to be great
tablet column repeat for FR and
let's say border background color is
transition all 0.2 second easy in
position relative so that's how it will
look okay we are missing something
but before we come down we have a check
so what we are targeting we are
targeting this but we need to Target
this portion box so change this to box
and now we are is looking good okay
let's come down we have to Target that
box on over effect we need to add a
box Shadow so we'll say box shadow
and let's come down We'll add this rank
position absolute Z index 111
background color where I can color
color itself is going to be our main
line height is going to be 0 margin one
font size is going to be Point H Ram
border one pixel solid VAR Dash icon
transition all 0.3 second easy in follow
TAP card rank on over effect we need to
change the background color to main
color and color itself going to be our
follower card box image and column one
slash one so this is how it will look
card box image and Border radius is
will come down we'll take the box
profile and it's going to be grid column
slash -1 and text the line is going to
margin top is going to be -2 Ram
position is going to be relative so it
should be in the middle we'll say box
profile Dash image border it is going to
then index something big number okay
before we're going to create this
position absolute content is going to be
empty width is going to be let's say 5
RAM and height is going to be 5 Ram
background color is going to be our main
color and what it is going to be 50 top
is going to be minus 20 percent and left
let's say 30 percent okay so if we save
it you can see we have a circle there
let's change this number to something 20
again or 40 it's become let's say
5 let's make 38 okay this one is looking
now let's come down we have to Target
grid column slash minus one
and display is going to be Flex align
line height is going to be zero justify
margin top minus one ram padding
in line one ram and padding bottom is
going to be one ram so that's how it
let's come down we're going to take this
follower tab card box info H4 is going
line head is going to be zero
welcome down forward TAP card box info
anchor we need to say color is going to
padding is going to give you 0.7 RAM and
1.5 Ram background border radius is
Shadow dark light color and transition
you can see we have this nice
background Shadow it's working fine
following anchor on over effect we want
to change the background color to
transparent so let's remove this one
simply change this to slash and this one
is to this so you can see right now it's
okay so make sure you do these changes
so working fine we can easily able to
change that and let's come down here
let's add a media query so Min device
with is going to be let's say 320 pixels
follow a tab card box profile
we would say left is going to be 38
info is going to be padding
follow tap card box image image it's
height and let's take a media query
third media query and we'll have a Min
device where this is going to be let's
say 322 pixels and the max width is
going to be less say it will go all the
way to 375 pixels and that will Target
the tab card box profile and we'll
Target the before and it will have a
left to 39.5 percent and these numbers
I tried and tested and I found that
these numbers are suited best okay
so here we have that now let's replicate
so this is what we have let's close this
now we have to change this 377
and this becomes let's say 425 pixels
and in this range we want our left
should be 1 14 41 percent now simply
and change this media query to let's say
427 pixels and this becomes let's say
and this term we'll call it let's say
so we need to add one more time so let's
come here this will become 7 7 70 pixes
and this will become 1024 pixes and this
so this is the media query we have
written for our before element okay so
let's come here and you can see
everything is working fine looks
absolutely perfect on the mobile device
turn it down and turn it off but somehow
the function is not working the function
we have created to tick or untick we're
gonna check that what's the matter okay
and this one is also looking good but
you can see we have this nice over
effect this one is also working fine
this function is not working we're not
so those functions are not working but
our over effect is working and our tab
we can easily able to tab an open
and let's go to close this one go to the
jsx and let's have a look what's the
so if we come here here we have the
following and follow so this looks good
we don't have an issue here
everything is good let's come
let's come to the functions and here is
the problem we have so this is the
following and we need to call that
following not follow me simply change
and now it's working so let's come here
and we can so follow and if we click one
more time we can simply unfollow that so
let's come here and let's have a look so
everything's working fine so these
we can easily able to switch between
and let's have a responsive mode so this
is how it will look on a mobile device
okay we can turn it off turn it on
so things are looking good no issues in
but we need to fix the button okay so
we have button here so this is the
button we have in a follower tab simply
come here and go to the CSS file and
here we need to set that here so here we
have that let's say width is going to be
and margin 0 Auto so this will come in
but I want to have the button in the
center okay so let's come down and let's
say Okay simply copy this one
okay so this is what we have button here
so let's come here and let's see
text align Center so in this way we'll
so make sure you do these changes okay
on a desktop and this is how it will
look the button in the mobile device so
here what we can do simply remove this
width and now it's looking fine
okay so that's looking good let's remove
now things are looking good so
look perfect let's have a look one more
so we have this nice styling all the
component we have designed so far that's
working absolutely fine open close this
and let's come back to the code and
all the things are working fine
let's have a look let's come back to the
and simply change this color okay let's
icon color and if we click on this okay
not this one we need to add the
simply remove this one okay this is the
right one we need to add this our main
color if we click on this again now it's
so make sure you if you want you can
change this it's an optional but I would
go with the brand color okay let's come
and have a look one more time
let's have our last screen so Tabs are
working fine let's have a final test
so in this we're going to build the
audio component okay so you know the
drill inside this you will find all the
component this is the big slider we have
button we have category collections
in that connection we have this
component filter yeah photo hero section
nav bar and that we have all these files
card nft subscribe subscribe title so
all these components we have already
built let's click on this component and
now we're going to create our audio
component again so let's give it a
folder for that and let's call it audio
live okay and we'll create a j6 file so
audio live.jsx and we have to create the
in the same folder model dot CSS
so let's close this one and let's do
this okay so let's type our afce
and we have to type this text audio live
so let's import the CSS file internal
and the CSS file we have so before we
import that let's come here in the com
component index and we have to import
the file and we have to import it from
here so let's audio live and simply copy
and we have to make it default export
close this one and let's close this one
and come here and go to the pages index
so we're going to call the audio
component right here okay right below so
first we have to import it and then
we're going to call it here below the
big nft slider okay so let's call it
audio live so in this way we can easily
be able to have the audio and simply
copy the title and copy and paste here
okay so this is the title for the audio
and we can simply change the message to
and collection you can call it
so let's say let's come back to our
and let's come to the application let's
have a look and here you can see that
here we have the title and we have that
audio live component so everything is
working fine now let's import the CSS
and that's coming from the same
directory now let's remove this one and
let's instantly return we'll have a div
it will have a class called Style
audio live and that will have a another
David will have a class called audio
live Dash box inside that will have
another debit will have a class called
style dot audio box left and that will
say left and we'll simply replicate this
we'll take a div it will have a style
audio box right and in that we'll call
it right okay so this is the component
we have let's come back and here you can
right in the bottom left and right so
let's come here and click on this close
this one and inside that let's create
two more folder one for the Big Audio
card component and one is for the small
audio card component okay so let's
create the folder so let's create the
copy and we have to create the jsx file
and we have to create the CSS file as
well so modules dot CSS so that's what
and close this one close this one close
this folder now let's create one more
folder and this will call Audio we'll
call Audio card small simply copy that
and we have to create the GSX file
audiocard small.jsx and we have to
create the CSS file as well so audiocard
so this is the two folders We have two
components and we'll type simply rfce
so that's what we have simply close all
this tab close this one and everything
okay so let's come back to the audio
live.jsx and now we have to import that
so we need to import the audio card and
that's coming from the same directory
and we need to call the audio card small
and that's also coming from the same
directory okay so these are the two
components we have import and now we're
going to Simply call this component here
so we're going to call this audio card
and we're going to render two cards okay
so let's simply do it tutorial twice and
insert this and in the right section
we're going to call the audio small and
in the right section we're going to call
the audio card small component and all
together we need to have three cards
okay so that's the setup we have to do
in our audio live.jsx okay so we are
done with that now let's enter next on
board this is the card component this is
the actual component let's close this
one and let's go to the component open
this audio card and click on this audio
and in this we're going to start
so let's import couple of things from
react so use State and use effect we
need we need to import the images and we
need to import the icon so if I fill
and that's coming from react icons AI
and we need to import the let's say TB
players okay play and TB player
pause and that's coming from the same
react icon TB okay so these are the
icons we have let's do the internal
so import style and that's coming from
same directory let's import the images
so we have inside this dot attached
folder and that's the internal import we
so let's ask the internal code let's
come back to the GSS and let's start
working on the jsx part of this
audio card okay so we'll simply remove
the hearts we'll do instant return
instant return and we'll have a div it
will have a class called style dot audio
inside this we're going to take this use
State and we'll call it like initially
it would be false okay we'll take
another use State and we'll call it play
set to false okay these are the two is
use State we are taking now let's come
back to the div and we'll take a
let's say another table will have a
audio card Dash box and that will have
another table will have a class called
time okay and that will have we'll have
another it will have a class called
and it will have a on click function so
in this we're going to call this like
nft function which we're going to create
okay and in that we're going to take
this Dynamic block and we'll say if like
is true then we have to render this
component so we're going to render this
and it will have a class called Style
make this icon so or the outline and it
will also have a class called Style
card box like icon and unlike okay
so these are the icons we have Dynamic
icon okay so we can like and um like the
so let's come down and we'll take a span
and we'll call it 24 we'll give this
and let's come out of the div and we'll
have another div it will have a class
called style Dash audio box like
and in that we'll have another div it
will have a class called audio box
ring remaining and that will have the
small time and we'll have our text
remaining time and that will have a H5
we'll call it 3 hours 15 minutes 20
let's come out of the div here okay
leave the three div and come down take a
dip it will have a class called Style
audio box we'll call it music
player and it will have a on click
function so we'll call it let's say for
the timing let's give this empty
function okay empty functions okay so
we'll take this Dynamic block and we'll
say play if it's true then we want to
render this div so it will have a class
and that we have to display the icon TB
else we want to display this icon so it
so simply copy and simply paste this one
and we'll change this to DB player play
okay so this is our Dynamic play button
let's come down we'll tag take a div it
will have a class call style dot audio
box details and that will have another
will have a class called audio card box
details Dash info and that will have
this H4 and will say nft music
we'll take another day we'll have a
audio card box details info price and
that will take this small tag and we'll
paragraph is going to be this price okay
some random number let's come out of the
day maybe we'll take another div it will
have a class style dot audio box
detailed info let's say stock okay we'll
take a small and we'll say 24 in stock
so that's the stock component we have
so I think we are done or let's have a
so let's come down we'll take another
dividend it will have a class called
we'll call it image okay not details and
inside that we're going to have the
image so we we have the images inside
that we're going to pick the image
number 10 and it will have all tags
we'll call it background with is going
to be let's say 500 and height is going
to be 500 so that's the image we have
okay so we are done with this entire GSX
and music player we have so let's come
here and we need to take a div and it
will have a class let's call it audio
box player okay and we go to wrap this
music player inside this so simply cut
and we need to Simply paste here so make
sure you do these changes okay otherwise
it will not work and you will get an
error okay so this is the audio card we
and that's the components working fine
so make sure you do these changes okay
wrap the entire music player into a
let's come down we'll have an image okay
so let's come here we'll take an image
it will say image and we have the image
this music vape and we'll have all text
to music with with is going to be let's
and we don't need to assign a height
okay so simply close all this components
so so we have this three we have this
now let's close this one so the these
are the four components we have like
player details image so make sure you
have the same one okay whatever changes
I have done make sure you do that
pretty much now let's come here now
let's give it the function okay so this
is the function we have to create and
let's open and let's have a look one
more time so let's copy the function and
let's come down here we'll take this
like nft it's going to be an error
if like is false then we have to turn it
to true and if it's true then we have to
that's the like function simply here
layer music okay it's going to be an
error function we'll say let's come down
so we have that function so here we have
to call the function again simply copy
and call the function here okay
let's come here and we have to write the
music player is false then we have to
make it true otherwise we have to keep
false okay so that's the music player
everything's working fine let's come
back to the applications where we are
you can see everything is working fine
we have the title we have all the data
with the images okay so if you click on
this you can see we can easily able to
turn the icon to like and here we have
okay so everything's working fine price
so all the images are displaying
perfectly you can easily to like and
so let's come back to the code and this
internal external let's close this one
and let's come here and click on this
okay audio card and let's start styling
this part okay we're going to do the
styling letter let's write the j6 first
so we're going to do the internal import
so we need to import the CSS file that's
coming from the same directory
and we need to import a couple of things
from react new state and we need to
we need to import the let's say ah let's
come back here go to this audio card and
here we have this icon so simply copy
this icon and come back and paste it
okay so these are the play and pause
let's come down and we need to import
the images so which we have inside this
dot slash dot dot image folder okay so
these are the internal import and these
are the external Imports let's come down
let's come down what we can do we have
to take a use State and we'll call it
let's say play and with initially would
be false and we're going to start
writing the GSA so we'll do instant
return and in that we're going to have
this David will have a class called
audio audio player and we'll have a
dividend will have a class called style
dot audio player dashbox inside that
we're going to have this image and it
will have a source called inside the
images we have the image background
number one and we'll have all tag so
we'll call it music with is going to be
100 and height is going to be 100 and
we'll assign a class called style dot
audio box images okay so that's the
image component we have let's come down
we'll have another divided we'll have a
class called style we'll call it audio
player and info and that we're going to
take this H4 and it will have the title
and and in that we're going to have
another div it will have a class called
style audio player box info box and that
so in that div we're going to take this
like profile component which we don't
have right now we're going to create it
so that's what we have so let's come
down we're going to take another div it
will have a class called style Dot
AudioBox info box price and then we're
going to take this small and we'll have
a price and we're going to take this
paragraph and we're going to actually
put the price let then come down and
we're going to have a let's say another
David will have a class called Style
play button and it will have an on-click
function and the function we're going to
call it play music okay this is the
function we're going to create
so let's come down we'll have this
Dynamic block will say play is true then
we have to render this icon otherwise we
want to render this icon okay
so things are looking good let's have a
look one more time let's for the timing
let's comment out this slide profile
uncomment this letter okay so let's come
down here and you can see that here we
have all the details and here we have
the three small component images nft
prices and you can see we don't have we
don't have created the function music
player that's why we're getting this
so everything's working fine let's read
to the browser and let's come back here
and now we can to create the function
okay so let's come here and we'll call
play music and it's going to be an error
let's say play is false then we have to
set it to otherwise set to 2
false okay so that's the function we
have created let's come here and just
click on it you can see we can play and
pause that's working fine let's come
and that's working fine absolutely so
let's close this one close this one come
and close this one close this one and
let's come back to the audio live
and audio live CSS file okay and here
we're going to write The Styling so
let's for do like this so you guys can
so we're going to Target the audio live
and with this is going to be 100
audio live box let's say that is going
to be 80 percent on a desktop and margin
zero Auto padding is going to be let's
padding block is going to be let's say 2
RAM and H Ram that's how it will look
let's come down display is going to be
great and great template column is going
to be repeat two one F4 grid Gap is
going to be 2 RAM so that's how it will
look let's come down we're going to
Target that audio live box right section
padding is going to be 0.5 RAM and zero
zero zero display is going to be great
Gap is going to be 2 RAM that's how it
will look let's add a media query okay
so Min device with is going to be let's
device with is going to be around let's
say 375 pixels we're going to Target
that audio box and we'll say where is
going to be 90 and grid column template
column is going to be 1fr on the mobile
device so that's how it will look you
so that's looking good let's come down
we'll Target this audio box right
section and we'll see Gap is going to be
true Ram we'll take the audio box left
and we'll say it's going to be one F4
Ram so that's how it will look okay
things are looking good let's come here
and we're going to Target the Box left
and it's going to be display grid grid
template column repeat 2 1 fr
okay so make sure you do all this CSS
styling everything is looking good
let's have a look so this is the Box
and this is the media query let's close
this one and let's come down copy and
paste simply and here we need to change
this to let's say three three seven
seven pixels and this will become 425
pixes and we have to make the changes
I think we need to keep it like this we
don't need to make any changes and this
will become let's assign a pixels and
let's make it this to 427 pixels and
this will become 7 68 pixes
that's also look good everything is
and let's come here go to this audio
and click on the CSS file audio card CSS
file and let's start styling the mega
card component okay we'll Target the
audio card box and we'll say display is
grid template row repeat 6 4 Ram cap is
box Shadow are going to be our custom
box Shadow okay this looks perfect you
can see it's looking really good
we'll start with the audio box like
great column one slash minus one and
grid row is going to be one slash two
display is going to be flex and justify
contains space between a line item zero
Z index is going to be one two three
let's add the like and background color
icon color and you will Target the color
this becomes Shadow dark color you will
Target the display flex and
we'll say align item Center
looking really good we'll have a gap 0.7
Ram well half padding 1.3 Ram
body radius to Ram will have corset
pointer and margin 1 Ram overflow is
hidden so that's the profit and click
function is also working let's come down
we'll Target the Audio car box like
icons and color is going to be red font
somebody could replicate this and this
so now it's working fine you can see
let's come down we have to Target the
audio box time and we'll say background
color is going to be our main
padding is going to be one ram 0.4.5 ram
margin right is going to be minus 0.4
Ram transform SQ 35 degree so and Border
left radius is going to be one ram so
let's come down we'll tag the audio box
transform is Q minus 35 degree text
and let's scroll down and here we have
that audio box likes item and simply try
to select and let's come back here and
okay so make sure you do this changes
it's audio box like item remaining okay
so right now we have the styling let's
come down we'll Target the audio box
like time remaining small and font size
font width is going to be 500 we'll
like time remaining H5 and this will
have font size 1.5 Ram margin top is
welcome down audio card box player grid
column is going to be one slash -1 and
grid row is going to be four slash Five
inline is going to be list three RAM and
GAP is going to be 4 Ram Z index
something High a line item Center
Target the audio box music player
icon and will make the padding 1.3 Ram
display is going to be flex and a line
background color is going to be our main
color let's come down font size is going
to be 2 RAM cursor pointer so you can
see that's look good let's come down
we'll see the audio card box image grid
column is going to be one Slash from
-1 and grid template row is going to be
one slash one and you can see it's look
now the image is perfectly aligned let's
we'll Target the audio box details grid
column one slash minus one great row is
and Z index something big and display is
so let's come here and simply
copy the details okay it has s and here
we are missing the S so let's replace
and now you can see the stylings are
taking place let's come down a line item
is going to be Center justify contain
space between and background color is
padding is going to be 1 RAM and 0. with
is going to be 90 percent and Border top
is going to be let's say radius to RAM
and padding is going to be 2 RAM line
height is going to be 1.1 Ram so that's
let's come down we're going to Target
the audio box details info and H4 we'll
say font size is going to be 1.1 Ram
line height is going to be zero
we'll tag the audio box details info
price this will become border one pixel
solid wire and this will have our icon
color we're going to Target the padding
Point 5 RAM and 1 Ram border radius is
going to be 0.5 RAM and height is going
to be let's say three ramp cursor is
going to be a pointer so that's look
pretty good you can see let's come here
Target the Box detail info price small
and let's hey background gonna be the
icon color will have the color itself to
our main color and we'll have a padding
2.4 RAM and 0.5 Ram we'll have the
Border radius 0.5 Ram so that looks
great let's come here Target the Box
detail info price paragraph and line
height is going to be let's say 1.2
phones width is going to be 700 700 and
let's come down we'll Target the audio
text align is going to be end display is
and let's come here and what we have so
AudioBox complete copy and paste here so
it's right okay no problem in that
let's come down Target the detail stock
small and margin top is going to be 2
RAM so that's how it will look
other media query so we'll have a
Max width is going to be 35 em and we'll
padding in line is going to be 2.5 Ram
let's say AudioBox like time remaining
and H5 we're going to say font size is
going to be one ram so you can see it
let's come down we'll Target the audio
box detail padding one ram so that's
let's come down let's take a second
media query and Min device with is going
to be let's say 44 27 pixels and the max
is going to be all the way up to
uh 768 pixels we'll Target the
audio box likes item remaining H5 and
font size is going to be one ram
so that's the second media query simply
copy and paste and here we have to do
the changes so this will become 7770 and
this will run 1000 24 pixels okay
and we need to remove that and in that
we're going to call this audio box time
and padding is going to be one ram and
and in that we're going to Target the
audio card box like time remaining H5
and this will become font size to one
ram we'll Target the audio box details
info H4 and this will become font size
so this is what we'll look on let's make
so it's looking it's looking absolutely
broken we have a problem on the
and this is how we look on a small
screen this is how we look on a desktop
a couple of things so they have some
issue in this it's overflowing
and we need to fix that so let's come
here so let's come here in the audio
card box and let's say overflow is going
here you can see right now we don't have
so that's working let's come here go to
and in this we have to do the changes in
bar like repeat icon so here we're going
to do the changes we'll say 2.5 fr
and the real other one is going to be
so right now you can see it's like
really good okay this card is looking
so we have this this function is not
this is the one problem we have it's not
so we can click we can turn it off this
one is working so everything's looking
good let's do the inspect element and
have a look on a mobile device and
that's how it will look on a mobile
device it's looking absolutely perfect
and 100 response so you can see that
so it's looking good this is the title
and this is our small component let's
make it side by side and let's start
so let's close this one and close this
card okay audio card small CSS file and
let's start sliding that okay
so we'll Target the audio audio player
and box and we'll see display is going
grid template column repeat 2fr and 5fr
and 1fr align item is going to be Center
Gap is going to be 1.3 RAM and line
height is going to be zero background
color is going to be our icon color
let's say main color Okay Main BG color
and let's say padding is only 0.5 RAM
height is going to be 8 RAM and
transition all 0.3 second easy in so
that's how it will look you can see
and we can easily able to turn and turn
it off okay so let's come down we'll
start with the audio player box on over
effect we want to add the let's say box
Shadow to our custom box Shadow color
so you can see we have this box shadow
let's come down we'll take this audio
player box image and Border it is going
audio player box info box price will
have a let's say borrower is going to do
one pixel solid and it will have our
font size is going to be 0.8 Ram where
it is going to be let's say 40 percent
font width it's going to be 600 and
Model 8 is going to be 0.2 Ram audio
player box info box price and it will
have a small and we'll say let's say
background color is going to be our icon
color itself is going to be our main
color and padding is going to be 1.1 RAM
and 0.3 Ram more it is going to be 0.2
Ram so that's how it will look looking
great let's come down we'll Target the
audio player box info price B and it
will have margin top one ram
play button and font size going to be 2
RAM background color is going to be our
main color and Border it is going to be
50 thus looks pretty good impressive so
let's make it full screen and here you
this is how we look you can see right
it's over effect we have on this
and here we can say cursor is going to
so right now we are here you can click
so we have some this one is working but
we have a problem in the button
so this one is okay fine but this one is
let's close this one come here and go to
this audio cuts bigger one okay card
component and let's have a look at the
here we have the play music function
that's the music function copy and
this is the like nft function which is
working absolutely fine and okay here is
the problem instead of set like we have
to call set player okay so simply change
copy this one and simply paste it okay
save it and now it will work let's come
back here and you can see this one is
working fine this one is working fine if
you click we can easily able to change
and this is what we have and here we
have this images now let's start working
on it okay and that's what we're going
so we come here and let's click on this
so let's create a comeback to the CSS
file and so here we have this Shadow
dark color copy that color and come back
card component and here we're going to
do the changes in the color so instead
of main color we're going to add this
color okay save it and come here okay
this one is really too strong
so it's too strong we need to make it a
come back here so we can go to that
whole CSS file and we can simply
replicate it and we can call it to BG
okay and let's make it opacity to little
download and now we can copy that come
and here you can see we have this we
have to make it a little more light
and now this one is looking perfect
this one is look perfect okay
just looking after great everything's
working fine we can easily able to click
so let's close this one close this one
let's come here go to the component
section and we need to create a
so we'll call it like profile
and we'll call this light profile.jsx we
need to create the CSS file as well
we'll type RAF CE to create the reacts
function based component and in that we
need to import the CSS file so internal
import and import style and that's
coming from the same directory
okay so that's the CSS file we have so
the reason why we are creating this
component because when we display our
nft every nft will have a section where
it will show that how many users have
liked that nft okay and that's the
component we are creating and I'm
creating this component as a global
component because we're going to use
this component in multiple places we're
going to use in our audio clip in our
nft section in our collection sections
so it's a reuse or compound okay
so here what we have to do is we have to
and let's come here we have to import
the images all the images we have here
and that's coming from the images so let
me remove that image folder so here we
and here we're going to take our demo
data because all together we want to
four users who have like the profile
and this data becomes Dynamic when we'll
image array and we'll have one two three
and four so these are the four people so
we'll like that now let's start working
on the GSX let's make it instant return
and we'll have a let's say let's take a
div it will have a class called style
dot like and that will have this image
array map LMI and we're going to return
it will have a class calls Style
dot like box and it will have a key I
inside that we're going to have this
tag and we have to provide the images
so all the images we have inside this
images images and Dot user one okay
if we go like this no it will not work
save it and we have to assign the width
so where is going to be let's say 115
and height is going to be let's say 15
okay that's looking perfect and this
so we have the key we have the images
okay everything's working fine
so that's the image simply remove this
and let's simply call the normal image
so this is our Dynamic component let's
come here let's do the styling so we'll
simply what we can do we'll simply
Target that like and we'll say display
is going to be Flex align item Center
reflect start and like is box is going
to be let's say border is going to be 3
pixel solid where and we're going to
and we're going to take this border
we'll call the image and it will have a
border radius 50 percent so that's the
CSS fact for this so right now we are
going with this hardcode value okay
we're going to receive as a prop and
we're going to look over it okay
so this is our like profile and now what
we can come here we can simply come and
import that like profile in this
and that's coming from slash component
so this is our like profile okay simply
copy and we have to export that Supply
so that's our export let's close this
audio and go to this audio cart
inside that click on this audio card and
here we need to First import that
like profile and that's coming from
dot dot slash like profile like profile
so this is the component we have now
come here and come up here and we need
to Simply import that file so like
from the same place dot dots we'll say
light profile that like profile so
that's the component we have simply copy
that and here we have uncomment that
like profile simply comment out this
uncomment this okay so this is how what
we have here let's come back here and
here you can see that our like profile
component is working fine we can easily
able to see the images okay
the user images and so that's working
so that's 100 responsive and looking
let's come back to the code and
here close this one and close this one
simple audio card and here we need to
call that like tab okay so where should
right here okay so we'll call like
let's come here and here you can see we
audio or nft okay and that's working
also fine let's come back here
and let's come back here go to this
and go to this like profile
let's assign class so let's call it
I have to add this Styles copy that and
you can see right now let's come here
so we don't have that border radius
simply come here go to the Cs file and
here we're going to simply change this
like box image save it and here you can
see we have that border radius
it's round so it's looking absolutely
let's do the inspect element and let's
so it's looking good on a mobile device
you can see this is how it will look you
can come up and these are also working
fine we don't have any problem in that
this is the audio card you can some play
play and off like unlike these are the
and this is the top list let's make a
bigger screen so this art will look
and make on a full screen this is a lot
will look in a big screen this is how it
here we're going to call padding is
going to be one ram and cursor is going
so you can see right now it's looking
okay let's do the inspect element and go
on a mobile device that's how it looks
so things are looking good let's
come back to the code and like make on a
index and let's change this to audio
audio collections so that's looks pretty
so things looks good let's have a look
everything is okay or we have any
so let's come back to the code and
let's simply do one thing go to this
not audio go to this like and here
have we have four so instead of that we
need to display the random image so
we're going to call the image user one
we're going to change the image user 2
image user 3 and image user for okay so
when we receive the data from the API
this the data will come in the form of
so we go to render from there so here we
have the four different images
and we are looping over it and here we
save it come back to the application and
here you can see we have different
images okay different user images
and this looks absolutely perfect
let's close all the steps and let's come
back to the audio card and let's come to
let's go to this audio card CSS
and let's comment out the box Shadow
it's looking good without walking Shadow
and on our way effect we go to add the
Box Shadow so simply copy this and paste
so as you can see it looks now it's look
let's add the transition so all three
second easy in so let's save it now we
have this nice translation effect and
this one is looking really good okay we
okay let's scroll down and let's remove
this okay we need to change the color as
well so we're going to call the icon
color and we're going to change this one
as well we're going to change this to
so let's come here and okay okay we have
some problems so what we can do we can
main color Okay Main BG color so that's
how it will look you can see now it's
looking good and matching with the brand
let's look perfect like unlike
and let's do the changes with this okay
so this one is looking good let's come
where else we have that so we need to
change that player and change this color
so we're going to have the background
and we can add a color to where and
we're going to call the main BG color
okay so that's how to look so we have
now simply close this one go to this
small cart and here we have to do the
changes same thing so we'll remove this
color and we're going to call the icon
and we need to take the color itself so
so that's what we have and that looks
so it's looking absolutely great it's
matching with the design exact design
so this looks good let's scroll down
things are looking really great okay
let's come back to the code let's close
this one and close this tab and go to
this audio live CSS file and in this
we're going to add some margin okay so
margin top is going to be three Rams so
we'll have some space let's make it to
okay so we'll have some space from the
and things are looking good everything's
this is the slider we're going to design
in this video you can see we have this
nice slider with this bounce effect it's
working fine let's come back to the code
so you know the drill let's come back to
the component and let's create a folder
for that so let's call it slider
copy and we have to create the CSS file
j6 file slider.jsx and we have to create
the CSS file for that as well so module
let's come here type rafce and we have
to do the internal report so let's type
internal import and we have to import
CSS file okay style and that's coming
from the same directory same folder so
that's what we have here now let's come
back to the component dot index and here
we need to import that slider component
and that's coming from Slider okay
normal drill close this one and we need
to come back to the pages index.js and
here we're going to call the component
so first thing we have to do is to let's
call it so we need to call the component
right below the forward tab okay
save it and simply copy the title and
paste above it and in this title let's
come back to the application and you can
see here we have the title copy this
from the original and replicate it from
and that's the title save it and copy
the text and simply change this
okay make sure you do these changes
I got some extra space not a big deal
that's what we have here now let's come
back to the original one so this is what
we have built in the last video and
let's come up here so to see that I need
to start the application I forgot to
start so let's open the terminal type
and let's start the application
simply click on this 3000 and here you
can open the application you can see the
so slider is not defined we have to
so this is our slider component so let's
review the browser and right now we have
this error okay we still have some
problem I think we have a double import
okay here it is so we need to remove
okay we are doing two import that's why
we're getting the server remove this one
and right now we'll have no error Maybe
so let's read the browser and
everything's working fine let's scroll
all the way down to have a look so this
is the audio component we had built and
this is the company we have already
let's come down you can see we have this
explore nft video component and here we
have the slider component so it's
so let's close this one and let's close
this one and now we can start working on
let's import couple of things from react
so use State and use effect and we need
so in this we're going to use a library
called motion frame okay that will allow
us to add that bouncing effect in our
slider we can create our own slider but
we're going to use this Library which
allows us to add fancy animations so
let's install that npm package so let's
open up your terminal and let's bring it
up make it side by side and we do we
need to install that motion frame npm
package let's clear the terminal and
type npmi so let's come up and let me
show you what is motion frame exactly so
let's type motion frame click on this
very first link and this is the library
which allows you to add fancy animations
so you can come and I already made a
complete tutorial on this which I will
link in the I button description so you
can watch that how you can utilize this
motion library and how it's work
okay so you can come up here again you
can scroll all the way down you can you
can see you can play with this values
and have some amazing styling you can
read the documentations they have pretty
simple documentation which is very easy
to read and you can easily able to
create a bit of Animation so everything
is explained beautifully you will have a
couple of examples which you can check
from your end so let's come back to the
code reader and this is the command we
have to run npm I form a former motion
okay dot motion frame former motion hit
enter and install the package just wait
this process will take a little bit time
and the installation started and here we
have completed the installation clear
bring down the terminal and now we need
to import that okay so here if we come
here you can able to find that
now we have to Simply import that
package so we'll call it motion
and it's coming from former motion okay
we need to import the icon itself so we
Arrow left Tech and that's coming from
react icon TI we need to import one more
icon and then this is one is going to be
let's say right there these are the two
now let's come here let's do
demo data slider array and we need to
we'll take this new state and we'll call
and initially it will be zero let's come
down we'll take this const and it will
call it drag slider so this data will be
updated because when we'll drag the
slider we need to get that data that
what is the width of the slider okay
that's why we are taking this variable
this hook will give us the data about
the width okay about the slider
so here we have that trigger slider and
let's remove this and let's start
writing the jsx we'll take a div it will
calls it'll have a class style and we'll
and that will have another div it will
Dash box and that will have this etched
H2 it will call explore nft video
down below will take another div it will
have a class called style dot slider box
and that will have a P tag and we'll
call it click on play icon and we'll say
Enjoy nft just write whatever you want
okay so this is the paragraph and we'll
will come down we'll have a another div
it will have a class called Style
we can call it let's say button in that
we're going to have this TI
and it will have our own click functions
and here we need to call the function
scroll okay so when we'll click on this
left icon it will scroll the slider to
the left so that's why we are we need to
so we'll pass the props left okay
here take a div it will have a class
box button button icon and we need to
okay and we need to have a two button so
what we can do simply replicate this one
let's change the button name so it's
but the function name is going to be
so that's the button function let's come
we'll come here here we're going to call
the Motions package we have to install
so now we have to use this package we
have installed for our slider and For
That Bouncy effect so this is how we can
write the syntax so we have to take this
and then we have to call this step okay
it will have a class called Style
and we have to pass this ref and in that
we're going to call this drag slider
and that we'll call this motion dot Dev
it will have the ref and then that we
need to call this track slider this will
give the data that where we are actually
currently okay and it will have a class
dot slider Dash box item okay
so that's the second motion div and it
will have some properties so it will
have dragged because we want to drag on
x-axis and we have to drag constrain
constraint and here we need to specify
the property so right is going to be the
zero and the left side is going to be a
little bit tricky okay so left is going
to be actually with minus width okay
so simply come here why we are getting
this error remove this one and let's
let's take a dynamic data we'll see what
is the problem we have okay we'll take
the slider array and we're going to map
over it element I and we're going to
return instantly and in that we need to
slider and actually we don't have this
component we need to create this
component let's have a key I plus 1 and
we need to send the prop so element and
we need to send the I as well in the
okay we are getting an error what's the
matter everything's look good
okay here we need to provide the bracket
provide the bracket so right now we
don't have the error and everything is
so things are looking good now let's
so I noticed that we have some error so
let's come back to the terminal
and we have a lot of error let's restart
so we'll say run Dev and let's click on
and just wait still we have this error
call stack okay let's come back
and let's come here let's come in this
so okay everything's working fine so we
have the problem in that motion okay
and let's come here and let's create a
so it's gonna be an arrow and in that
we're going to call this set with
we'll call this drag dot current because
the reason why we are getting this error
because we don't have this minus with
value we have assigned okay so we need
to assign them with okay so track
n minus drag slider dot current offset
so whatever value we'll get from here
that will assign to the width okay
and you have seen that we have used the
use ref which will give the reference of
if you don't understand anything just
walk write the code along with me
it will make sense when you will see
that how it's working okay so this is
our use effect now let's we have to call
and and that we need to pass this props
let's say Direction you can call it
and here we have to check so here we're
going to say current is going to be
draggable slider and scroll amount so
how far we want to scroll it so here we
have to take this window dot inner width
it should be greater than 18 1800 1800
then do this otherwise this one okay
that's the simple logic we are building
and then we have to call this check
Direction equal to left then we want to
scroll it to the left hand side scroll
left minus scroll amount and else we
want to do the same thing for this
right inside okay that's our function
and make sure you do this change it's
not right it's left okay so check this
come back to the application reload the
and just a moment and still we are
getting this error okay right now we're
getting some Defender still we are
getting the same error so let's come
okay we have this slider actually we
don't have this slider component
and I'm calling the same component
inside the component that's why we are
getting this error okay my bad okay my
so we need to change this we need to
create that let's come here and let's
let's go to the slider one and we need
to create another folder we'll call it
copy and say slider card.jsx and we have
to create the CSS file in the same
okay because this is going to be our
now let's come here we have to do the
internal import or css file so import
and that's coming from the same
directory so that's the component we
and let's come back to the slider and
here what we can do we need to import
that component so we'll say import
and that's coming from the same folder
okay slider card okay so simply copy and
if we come back to the application you
can see it rid of the browser and I
guess we don't have any error this time
everything is working fine we don't have
any error anymore okay so let's scroll
down and you can see we can easily able
to render the seven component
so everything's working fine
now what we can do here let's come back
to the applications and close this one
and let's start working on the slider
card so we need to import couple of
things from react so you stayed use ref
we need to import the motions
that's coming from formal motions we
need to import the images from next.js
and we need to import the images all the
images which is inside the image folder
we need to import the let's say link
like profile okay and that's coming from
here we have inside this like profile
so these are the external internal input
let's remove this and let's call the jsx
so we'll take this motion Dev okay
motion Dev and it will have a class
style slider card with small and we'll
take another div it will have a class
slider card Dash box inside that will
class called style Dash slider card box
inside that we have to take this image
tag we need to provide the source images
Dot and we have the image background one
all tag is going to be let's say slider
profile we need to provide the width is
going to be let's say 500 and we provide
height is going to be 300 let's assign
let's come down we'll take another day
but we'll have a class called slider
title in that we need to take this
paragraph it will have a class called
slider card box title like inside that
we're going to have this live profile
like profile and we'll come down we'll
take a small tag and here we're going to
say one out of 100 one of hundred okay
so that's the like profile we have
so let's convert that into a div not P
okay let's take a P tag above and let's
and let's give this number to the video
so that's working fine now let's come
down take another div and we'll have a
slider card box price and here we'll
take another div it will have a class
style card box price Dash box and that
will take this small will called current
and we'll take a paragraph it will say
have the price of The Ether okay
it will come out of the div and we'll
have another day we'll have a style
called slider card Dash box price time
and that will have the small tag
and we'll say remaining time and that
will take the speed tag and we have to
assign the time 3 hours 15 minutes 20
seconds so that's the complete jsx part
for this slider card component so things
are looking good let's have a look that
are we missing anything else no actually
we don't be using anything like this so
okay so they move this one external
internal import we have the GSX and if
we come back to the application this is
everything's rendering perfectly
things are looking good okay let's come
back close this one and go to the CSS
file and let's start working on the
come here and go to this index.js and
what we can do we can simply remove this
let's come back to the slider and let's
start working on it okay so we'll Target
the slider where this is going to be 100
slider box is going to be with 80
percent margin 0 Auto padding is going
to be zero minus one ram and H RAM and
zero so this is how it will look
let's come down we'll tag the slider box
H2 phone size is going to be 3 RAM
line height is going to be zero
slider box button will have a display is
going to be Flex justify content space
slider box button button display is
going to be Flex align item Center Gap
is going to be 2 RAM font size is going
slider box button BTN icon so we'll
Target the Border one pixel solid VAR
and it's going to be an icon color
padding is going to be one ram display
is going to be Flex a line item Center
border radius is going to be 50 percent
and transition all 0.3 second easy in
and cursor is going to be a pointers
let's type that button icon on over
effect we need to change the color to of
the background so it will have a let's
say icon color and we'll have a let's
say color is going to be main color
Black Box Shadow is going to be the
custom box Shadow color so you can see
items with is going to be 100 percent
overflow is going to be hidden
slider box item so this will become
grid template column repeat six
padding is going to be 4 RAM and 2 RAM
cursor grab okay that's look good
will have a display display none
web webkit scroll bar okay so we have
this one looking fine let's come down
let's add a media query so and Max width
is going to be let's say 35 VM we'll
Target the slider box H2 font size is
grid template column repeat 6 95 percent
padding is going to be 4 RAM and 0 so
let's come down we'll stack at the slide
box which is going to be 90 percent
Slide the Box button button icon would
be padding 0.5 Ram so you can see that's
look pretty good and responsive
so that's the part now let's come here
and we can Target the card itself
transition all point three second easy
border Radius 2 RAM padding bottom is
slide a card box on over effect we want
to add this box Shadow to our custom box
you can see it's look perfect
let's target the slider card box image
and why it's not taking place
simply come here and go back to the GSX
and let's have a look okay if we don't
so let's assign a class simply copy this
and paste it is going to be image image
so if we save it it will come to the
application you can see we have this
it's working fine so let's come down
we'll Target the slider card box title
this play is going to be a flex align
padding is going to be padding in line
is going to be 2 RAM and justify content
space between a gap is going to be one
ram so that's how it will look
let's say slider box title p
awn size is going to be 1.2 Ram line 8
is going to be 0.5 and font with 800
let's come back here and let's comment
we'll see whether we want to display or
not okay so for timing let's comment out
and let's start working on the CSS
has come here we'll Target the slider
card box title like and we'll say
align item Center Gap is going to be 0.5
let's come here slider card box price
display is going to be Flex justify
padding and line is going to be true Ram
line height 0 margin top 1 Ram text
and that's how we look let's come down
price box border one pixel solid where
border edius 0.2 Ram slider box price
and background color is going to be our
padding point to ramp 0.5 Ram border EDS
0.2 Ram color is gonna be our main color
we have to Target the box price
box B and font size is going to be point
1.3 Ram width is going to be 700 and
margin top is going to be 2 RAM line it
let's come down Target the slider card
time and a line item is going to be flex
display is going to be grid
let's come down and let's target the
we'll say font size is going to be 1.3
RAM and front width is going to be 700
let's add a media query so we'll say Min
device width is going to be 300 pixels
Max device with is going to be let's say
we'll Target the slider card and we'll
say padding is going to be 0.5 Ram
that's how it will look we'll Target the
slider box title and P is going to be
let's say font size is going to be one
with a slider box price box and it will
let's come down we'll Target the slider
box slider box price time P we'll say
font size is going to be one ram that's
responsive okay things are looking
let's come here and let's go on a full
screen and this is how it will look you
can see okay we have some problem
we one div is coming down let's scroll
down you can see our scroll is working
but why we have extra depth we need six
but we have seven but here you can see
we can scroll down we have like this
okay let's come back to our code and
let's have a look what's the matter
let's come to the slider card
and let's come here go to the slider and
let's have a look at the array the
dynamic area so here we have taken 6 7
so we move one and take six only
now let's remove that and here you can
see it's working fine we don't have an
extra and now we can easily able to
100 response so we can see it's working
fine we have this bouncing effect
so that's looking good so let's click on
so that's also looking good let's come
here we have the image so let's change
the background image to 1 from 10 okay
so we can display the exact image as we
have in the demo and as you can see the
image is changed now we have the similar
image and we can slide it down and it's
but something is wrong here okay
so the function is not working properly
on the button okay if you click on the
icon then it's working but it's not
working on the entire button
okay so let's fix that so let's come
and where are we having the function so
we are calling this function only on the
Arrow but instead of calling that
function in the arrow we have to call it
on the div okay so let's do one thing
simply cut and call the function on the
dev do the same thing from this one also
and now it will work you can see now
wherever you can click on the entire
button the function will execute
so it's working fine we can easily able
responsive and looking perfect
this is how we look on a mobile device
on a bigger screen this is how it will
look and on large screen this is how it
let's look perfect let's close all the
and in this video we're going to build
so let's come back to the code and you
know the drill what we have to do simply
create the folder so we'll call it brand
copy and we have to create the j6 file
Dot jsx and we have to create the CSS
so let's close this one and come back to
the brand.jsx and we have to create this
rafc reacts function of its component
and now we have to import the CSS file
so internal import and this will call
style and that's coming from the same
okay that's the brand import let's come
back to this component index file and
here we're going to import that
component so we'll call it import brand
and that's coming from the brand
brand copy this one and simply we have
to export this one so that's the Import
and Export now go to this index.js file
and here we need to import that
and that's what we have to do here we
have to call that components so in this
way we can easily able to display the
component in our home page okay
so simply close this one and save it
let's come back to the application go
back here and here you can see we have
so things are working fine we don't have
any errors let's come down and now we
can start working on the brand.j6 so
we're going to import couple of things
so first thing is going to be the image
will come down we'll import the images
that's coming from the image folder okay
we'll come down we're going to import
and that's coming from that's that
slash component index we have to wrap
this inside this bracket okay
so this is the bundle component we have
working on the j6 okay so we're going to
instantly return we'll have a div it
will have a class called Style
brand and that we're going to have
another divided because have a class
and that will have this div it will have
and we'll replicate that this will call
right okay and this we're going to call
data image and we have to provide the
source we have inside this image folder
logo and we'll call it all tag is going
to be a brand logo where this is going
to be let's say 100 percent 100 and with
height is going to be 100 okay so that's
now let's come down we'll take this H1
and let's come back to the original one
and simply copy this text and paste here
simply come here we're going to take
this paragraph and come here and simply
copy and paste here okay so that's what
now let's come down we'll take a div it
will have a class called style and we'll
see brand box left button and that we're
our Dynamic component and little button
name is going to be let's say the props
and it will have a function called
and for the timing we'll have empty and
this will become the let's say discover
so this is the button component we have
let's come down and here you can see we
have the title button and descriptions
let's come on the right hand side and we
we have to assign the source which is
inside the image folder and Dot on okay
so let's come here go to this image
folder and inside the image folder you
will find that we have this image ER
under PNG but we haven't imported that
we have to first import this file you
NG and now we have to export it okay so
let's do here so in that way we can
easily able to receive here and we can
call it let's assign all tag is will
become the let's say brand logo and we
can call it width is going to be
um let's add a bit to 800 and height is
going to be let's say 600 so that's the
let's come back to the application and
here you can see we have the image and
we have the buttons and titles and Logo
so let's come back here and go to the
CSS file and let's start working on the
so we're going to Target that first
we're going to Target the brand and
margin top is going to be 10 Ram margin
bottom is going to be 7 Ram brand box
with is going to be 80 percent margin 0
Auto and display is going to be great
grid template column repeat let's say
1.5 FR and less 2fr okay we'll have a
gap to 5 RAM and a line item is going to
be centered that's how it will look
let's come down we'll take the brand box
left and etch we'll Target the font size
is going to be 5 RAM and line height is
font where this is going to be bolder
that's how it will look let's come down
we're going to Target the band box left
paragraph and font size is going to be
and margin top is going to be -2 Ram
so that's how it will look pretty good
let's come down we're going to Target
box left BTN and display is going to be
a line item is going to be Center and
GAP is going to be 3 RAM and margin top
is going to be 3 RAM so that's pretty
let's come down take a media query and
Max width is going to be let's say 35 em
we're going to Target the Box brand box
and we'll say give template column 1fr
and we'll Target the brand box left H1
and we'll say font size is going to be
brand box left paragraph will say margin
top is going to be minus 0.5 Ram so
that's how it will look pretty good
so and it's responsive as well make it
on a full screen this is how it will
look we have the logo we have the
heading we have the titles we have the
buttons so things are looking good
so let's come here and and here you can
see we have the difference here because
we are using different form we're
definitely going to change the font of
this application right now we are using
pop in but we're going to use Latin okay
so the font I'm not going to change
right now we do it later okay
so let's come here and we're going to
make it four and now you can see this is
how it will look so this is how it will
look let's come back and let's make it
uh let's make it 1.5 so we have too much
and let's make it five okay so this is
how to look we're going to change the
font because we're going to use
different font right now we are using
font poppings but we're going to use
so just follow along with me whatever
so have we are done with this okay
looking good so this is the right
section this is the left sections
let's close this one close this one
so in this video we're going to build
this video card component okay so this
is the component we're going to design
so and you know the drill what we have
to do simply create a folder we'll call
and we have to create the j6 file we
have to create the CSS file module.css
and we have to import the CSS file so
style and that's coming from the same
so we have the CSS file now let's come
back to the component index and here we
need to import that file so we'll say
dot slash video and we have to export
this one come here and Export this file
close this one and go to this index page
and here we need to import that file
and let's come here here we have to
so we have the video component as well
let's come here let's import couple of
things from react so we need the images
let's come down we have to import the
images all the images which is inside
this images folder now remove this one
and let's make it instant return we'll
have a div it will have a class call
Style video and that will have another
div it will have a class called Style
give this space inside that we're going
to have this H1 we'll call it
span let's come back here copy this icon
and let's come here and call the video
the video okay let's come down
come back here copy those text and paste
and that's what we have now let's come
down we'll take a div it will have a
class call let's say style dot video box
frame and in that we're going to have
and that will have the image okay
and you might be noticed that this is a
video component but why we are using
image because we're going to build the
entire layout okay we are not going to
design the video component itself
because that will take a lot of time
that's a huge component because there we
have to do a lot of things we have to
design the all the functionality play
and pause and we have to upload the
video from the server okay so when we
get the data from the API on that time
we're going to design this component so
right now we are just building the
layout once we have the data we can
easily able to remove this image and we
can add a video frame okay so I'm just
taking this image and building the
layout in this video okay so let's add a
source image and we have the image
inside this so this is the image to drag
simply come here and simply import the
image first so let's call it nft video
video PNG and that's what we have to
so that's where you'll get the image and
let's call the image let's assign the
all tag so we'll call it video image and
we have to assign the width so it is
going to be let's say like 190 20. and
let's say this one is going to be
so this is the setup we are doing okay
this is the exact video frame
when we get the video okay so we are
just building the frame so let's come
down we'll have another div it will have
video box frame left we'll call it right
and this will have a simple let's type
so that's what we have here so let's
come back to the CSS file and let's
open the application on the browser and
you can see here everything is looking
good so we have the title we have the
paragraph and we have the image and we
have the high okay so now let's get
so we'll Target the video we'll save 100
with we'll say a margin top is going to
be fought in Ram and margin bottom is
going to be 5 Ram so we'll have a good
amount of space let's come down we're
going to add a video box and font size
let's come down Target the line height
is going to be let's say 1 and video
box paragraph is going to be font size
and width is going to be 40 percent line
height is going to be 1.2 Ram so little
let's come down we'll Target the video
frame and we'll see display is going to
great template column repeat eight one
FR and we'll say a gap is going to be 1
padding is going to be 5 Ram
margin top is going to be 6 Ram so
that's look good welcome here we'll
Target the video box frame and we'll say
left grid column one slash eight and
slash -1 to the end so here we have the
now let's come down we target the frame
image and Border radius is going to be
so it's going to be copy and simply come
back here we don't have the class let's
assign the class so we'll have that
frame left image save it we are getting
we'll Target the video box frame and
it's going to be a right section we need
to assign the grid so 3 and -1 to the
end and it will have a background color
so I can color we have we have to assign
the model radius to be one ram and grid
row is going to be let's say one and all
the way to end okay save it padding is
going to be 3 RAM and 0 RAM and margin
top is going to be minus 40 minus 5 Ram
box Shadow okay so let's save it this is
how it will look you can see our frame
and let's add a media query so we'll say
Max width is going to be 35 em
we'll say width is going to be 90
and we'll Target the box frame
padding is going to be zero so that's
how it will look let's come down we'll
Target the video box frame right and
we'll say margin top is going to minus 2
box P well Target the width is going to
be 100 on a mobile device so that looks
okay let's come here Target the Box H1
and let's say font size is going to be 2
let's come up here and what we can do
we can make the change here okay let's
so that's for the big divider and now
let's start box with and where is going
to be 80 percent and margin 0 and Auto
so this will hold the entire div into
the center okay so it's like perfect
let's make on a full screen and that's
looking absolutely great 100 responsive
so right now we have just designed the
so in this Ms section we're going to
display the video and we're going to
include all the functionality okay once
we have the data from the API
okay so that's looking great we have the
and things are looking pretty good
impressive so so this is the Discovery
section help sections notifications
and no breaking changes have done now
we can slide it this is the card
sections looking absolutely let's click
on the tab working absolutely fine this
is our slider we can easily able to
slide both the sides and on the click
so working fine this is the tab we have
this is the filter component we have
open close and we can like it unlike
so that's the good here is the second
so let's do the inspect element and
let's have a look on a mobile device
so with this finally we have completed
the entire home page of our nft
Marketplace okay so let's have a quick
overview that what we have built so far
and what are the components we have
if you have coded a loan with me in this
entire home page you will find that when
we build the other Pages the entire
development of other Pages becomes very
fast because these are the components
we're going to use over and over again
and we have to write very less code
so let's have a look so let's click on
this this is how it looks this is the
hero section service section and this is
the slider this is our audio card
working absolutely fine looking great
this is a small audio card looking great
we have like unlike working fine
this is the slider we have click on this
we can easily able to slide the you can
we can click we can slide both sides
this is the collection section we have
so that's what we have this is the
filter section we have we can simply
and this is the card icons we have
okay that's looking good this is the
card icon looking absolutely perfect
so everything's looking perfect this is
the last video we had completed our
in this video we're going to make a
little bit changes in our home page to
make it fully responsive so what we have
noticed in the last video that our
navigation is not fully responsive okay
so be able to make that 100 responsive
and we go to change the data so we have
data in the cart we have the data in the
category so all those images all the
user images we're going to change in
this video okay so it's going to be the
refactoring okay what we have done so
far in the last 15 video okay let's come
up here and here you can see here we
have the problem in the notification
it's going out of the the recommended
mobile phone okay so it's overflowing so
that's the one we have to fix same case
goes with the profile section you can
see the navigation looks good we don't
have any issues in that and let's make
if we have the problem we have the
problem we need to fix this one
working fine but we need to do a little
bit adjustment so let's bring this way
and let's make it on a mobile device so
let's click on this component and let's
try to fix that let's go into the
notifications and let's start with that
first okay so we'll come in the media
query and here we have to adjust the
media query so let's make it 10 gram
width oh it's very small so it's totally
try and try okay you have to try that
which width is suitable for that element
okay so just test with a random value so
let's make it to okay this one is looks
actually quite good okay so this 21 is
really fine you can see now it's looking
perfect this notification bar on a
if expand and it's absolutely perfect
okay it's not overflowing and now if we
are done with this notification so
that's the change we have to do let's
come here and now we have to fix that
profile one so let's come here and go to
the profile CSS file and here we are in
the profile module of CSS and now we
have to fix that as well so here you can
and we have to write the media query for
this so max width is going to be 35 em
we'll Target the profile and this is the
profile we are targeting and here you
can see we have assigned left to -70 Ram
that's what we're going to Target so in
this we'll say 10 Ram it's too much 12.
no okay and this let's make it five this
looks absolutely perfect you can see
right now it's looking good on a mobile
device both user profile and
notification so it's not overflowing
anymore and this looks absolutely
incredible you can see it's look great
in all the devices okay this navigation
so let's look good now let's check the
and let's come here and now we're going
to do the changes so right now you can
see we have the similar image in the
background we have the similar in the
user so that's the change we're going to
okay these are the image everything's
working fine no issues we have so let's
come here and go to this level it is go
to this forward Tab and inside this
follow tab we have this follow tab card
where we are renting that so here we
have hard coded the value this image one
okay that's we're going to make it
let's come up here and here we are
receiving the props you can see we are
receiving this I and element actually we
have the data okay simply copy that
let's come here and let me show you so
here we are passing the props
so let's here you can see we are passing
the element and we are passing the index
so we actually have the image
and here we have taken this random data
you can see card array we have taken one
two three four and falling array so
we're going to take the image and we're
going to take the user image as well so
we'll import the image folder and that's
coming from the images folder okay so we
have the images now we're going to
Simply replace this and in that we're
going to take this image user one image
let's say three image user for any image
user let's say five image user 6 an
image user seven so all together we have
close to eight component we want to
display that's why I have taken this
eight array eight images now we can come
here in the card component and here we
are receiving this okay so that's all we
are getting the data now let's simply do
the same thing for others and
let's do a little bit adjustments so
we're going to shift the placement
because I don't want to display the same
image so you guys can not able to find
the differences okay so let me do the
and let's remove this press here okay
so all that's what we have done remove
it and let's paste down below
so that's the array we are getting from
the images okay now let's come here and
where we're displaying the images of the
profile so it's right here simply remove
and type alone if you save it and here
you can see here the images got changed
so right now we have a dynamic data and
the same type of data we'll get from our
API okay so we'll get the all the
details of about this followers like the
background image the user profile name
either price and whether the user who's
logged into the application are
following them or not okay so all the
information will come in the API and
that's what we're going to render okay
so it's displaying absolutely perfect
okay it's working fine now let's switch
the tab and you can see tabs is also
okay that's looking cool let's come back
here we have the hard code value for the
background let's change that as well so
for that what we can do let's close all
this array um let's open the first one
inside that we go to take an object one
will have a file background and one we
have a for user okay so we'll call it
let's say background and we'll call the
background image so inside this Creator
background and we're going to take the
and user won't simply copy and remove
this one and replicate it couple of more
times so this will come to this become
four four so the possibilities are
endless you can bring the data in many
ways or you can create a separate Json
file from there you can retrieve the
data which I'm going to do once we build
the entire templates so we're going to
build a internal server what do I mean
by internal solver we're going to create
a Json file which contain all the
information about the nft user
authentications followers like so all
the data we're going to create in our
directory in our data Json file and from
there we're going to fetch the data and
display the entire in the applications
so I'll show you how you can do that in
an internal server in your computer and
then we're going to deploy the same data
into the our database and build build a
API around that will use mongodb's
powerful query operators to make it our
API powerful okay so we will do a lot of
things so I'll just give you a simple
example how you can play with the data
because data so if you are good with
data you can plan that how data you can
retrieve and display in the application
you can you can really improve the
performance of the application so
planning a data for delivering in the
application is one of the high paying
skills so always try to do keep that in
thing in mind because anybody can write
that's the thing you have to keep in
mind okay so let's do that so chain five
five simply replicate it this becomes
this has become seven seven and this
okay we have got this data now simply
and do the same thing for others so
simply what I will replace the same data
and do the same for this news array as
well so let's change the data so right
now here I have all the data and what I
can do I want to do a little bit of
resuppling so let's close this array so
let's come up here and let's try to
so let's remove this couple of area from
okay cut this and paste on top so we'll
have some difference and let's open that
and everything's working fine now let's
come back to follower TAP card and here
we go to do the changes so here we'll
remove this we'll type LM and inside
that will have the background okay
so what's the name I have given let's
copy the spelling I don't want to make
typo okay so this is the background and
let's scroll down and now we have to
display the user so here we are
displaying the background okay and
let's come down where did the user and
here we have that illum in that we're
going to type the user now Simply Save
let's come back to the application and
here you can see that the background is
changed and the user is changed now it's
looking really good okay so we have a
dynamic data and you can easily the
switch between different tabs and it
it's looking really perfect okay it's
so I believe that you guys are enjoying
so this looks really good now let's move
to this one we're going to change the
let's come back to the code and what we
simply cut remove that one because we
okay so let's come up here and simply
close this one close this one and simply
copy this array because the same type of
structured data structure we have to
follow in the video card component so
simply copy this and copy this and let's
come here go to this where we have a
slider inside the slider we have to go
inside the slider and here we are
passing the data okay so let's come up
here and here we have the demo data
slider ready we're going to Simply
remove that and we're going to paste
that data okay so right now we have the
data let's import the images
and that's coming from the image from
dot dot slash dot dot and image folder
so here we have the images now simply
copy that let's scroll down and here we
have to pass instead of slider area we
have to pass this following array okay
so right now we'll pass in that as a
props we are passing the props you can
let's come here and go to the slider
card component and here we have to
receive the prop okay so let's come here
and that we're going to receive the
props El and I so that's the Prof we are
receiving let's come down and here we
have the hard coded value we're going to
remove that with the background okay
come here and remove the background
okay so here we have the background
let's come down and here you can see
that the images are changed it's looking
so things are looking pretty good and
impressive okay we are done with this
we have no issues in the slider we can
click and we can move on now let's move
to this collection section and let's
change the images and the profile images
as well let's come back to the code
and what we can do here simply close
this one and close this one come here
go to this go to this collection and
inside the collection we have this
we are passing the data in the data
component okay so first thing we have to
do is to replace this data with the data
so let's come here and we need the same
data so we have the data inside the
follow tab simply copy the three one
because all together we are displaying
three component there okay so let's copy
what we can do now here and now we have
dot dot slash dot dot slash image folder
so here we have the images now we're
going to Simply replace this one okay so
what we can do is we no longer these
need this one simply remove that
serving is looking good here come back
here go to this day component and here
we are receiving the props so let's come
up here here we need to receive the
we have the data in this copy that and
here we need to pass it simply replace
this bit to LM dot background okay
for the background image now okay so we
are have this error message
okay not undefined so let's come here
and here everything's look good
let's have a look let's come here
okay my bad simply copy this and change
and simply copy this and change this to
following array okay simply remove that
and now it will work Simply Save it and
you can see still we have this problem
okay we have this problem not a big deal
and you will come across this problem
when you will do the refactoring okay so
don't get frustrated it's a part of
building any application or any product
so it's working fine now let's have a
look where we are making this Mystics
let's scroll down and here we have that
that's coming from here so let's come
here and you can know I have noticed one
thing that I'm not sending the props
okay so let's send that props I
let's make it inside the bracket and
here we need to send the element okay
the data itself and this simply copy
this part and do the same thing in this
following array as well so let's face it
here as well so here we have to face
and now we can come here and we can have
here we have the different images at the
here we have the difference let's come
down let's scroll down and here we have
three images I'm changing only one
because when we get the data from the
API if we make an object sub image
category in which we're going to add
this additional image okay if I'm not
adding in right now because it will take
a little bit time okay we will do it in
more robust Rayven we'll get the data
from the API or our internal API
so now what we can do I want to change
the user profile as well so the data we
have for the user is say this simply
element and inside that will have this
if I save you can see we have this
Dynamic user data and you can simply
switch backward and forward and you can
have a look the data is keep changing
and it's absolutely looking great
so that's looking perfect we have no
issues in that now we have to change the
images of this you can see we are
displaying the same image we're going to
make it change that simply close this
one close this one and come here and go
to this nft card click on this and here
and here we are taking this feature
array we need to remove that and we need
to Simply come in the collection we need
the data so let's come here and simply
data okay copy the data come back here
and simply come here and replace this
okay simply copy that one and simply
and move it to this one okay card array
and from here we have to add the let's
so let's come here remove this data we
don't have that in that we have this
background so play copy the background
simply simply I'll select all this and
remove that one because we want to
display only nft we don't want to
display the user okay so we'll remove
that and we'll take a simple image okay
we'll have the nft one NF image Dot nft2
and image nft 3 all together I have
three images in my nft but we'll have
more okay so let's try with this three
so we have this three now what we can do
simply copy and replicate three terms
three times right here we get the three
things are looking good let's have a
so here we have that and now we can do
it simply remove this with the element
the data itself and here you can see we
Dynamic images now it's looking
like a real application you can see now
it's you guys are getting excited
earlier we were putting the same data
that was not getting excited in you many
of you guys have asked me that how to
render different images so that's why I
made this special video and that we are
changing this playing with this data
so everything's looking good images are
changed everything's working fine now
let's change this category okay
so it's quite going to be similar let's
have a look final motor and things are
looking awesome let's come close this
one come to the category sections and we
have to follow the same drill simply
remove this one and then we're going to
take this image dot so we're going to
one this will become 10 this will become
11 this will become two this will become
4 and this will become let's say five so
all together here we have the data
simply come here remove that with the
and here you can see it's taking a
little bit tired because the images are
heavy so when we deploy this images when
we'll deploy our application we're going
to compress this image because we have
to improve the user experience if it
will take too much time no one's going
to stay in your application so that's
the thing you have to keep in mind so
here the image is full is loaded and
everything is looking fine you can see
everything is looking great right now
we can scroll up and do the final test
so this is the hero section we have okay
let's scroll down and things are looking
and let's come back to the code
let's make a full screen let's make this
one and so finally we have done with
this entire refactoring and I made this
extra video on this because many of you
guys have asked me that how you can
display your own images so that's the
only purpose I had to make this video
hope you guys have got the Insight that
how you can do that we're going to do in
a more robust way okay don't need to
worry just follow in a normal pace
where I can find that you will learn the
best if I build the entire thing in one
go you can't you're not able to retain a
lot of things okay so that's why I'm
going a little slower here but from the
next video we're going to build one page
in one video okay so we have done
let's come here and let's come here go
to this pages and inside the pages we
have to create the collection page so
click on that come here and create a
collection page collection dot Js
let's come down and we have to create a
CSS file for this so let's create a CSS
file we'll type collection dot
module.css so we'll have the CSS file
let's come here and here we're going to
Simply import that CSS file so let's
give me the command internal Port import
style and that's coming from dot dot
slash Styles slash collection module CSS
now let's come here we have to import
all the images and that's coming from
image okay so here we have the images
before we do that let's come here and
create a new folder because every page
will have its own component folder okay
and that we're going to keep all the
components which is related to that
specific page this is the architecture
which you have to follow whenever you
build a large application like this
because definitely you're going to work
in a group with other fellow developers
so when they will refer your code they
will know that which component content
information about the which page okay so
this is the architecture I personally
follow and I would suggest you to do
that because it's very easy to read okay
so let's create a folder another folder
and we'll call it this time I'll call it
page okay inside that we're going to
keep all the folders for the connections
so inside that I'm going to create
another folder this will become a banner
because we have to display the banner so
in that we have to create this
banner.jsx type rafce and we have to
create the CSS file for the banner as
well here we have the banner so let's
create a model folder and we'll call it
collection profile and that we have to
create this collection Dot jsx and we
have to create the CSS file as well
okay these are the two folders We have
created one for banner and one for
collection profile inside the collection
and let's come here and we have to
create this index okay because we're
going to import it we're going to follow
the same structure what we have followed
in the component okay so we'll create
collection index.js and in this we're
going to import let's rename that okay
import the let's say we need to import
and that's coming from the same
directory collection profile now we have
and that's coming from the same Banner
profile and now we have to export that
collection profile and banner so here is
everything is working fine now let's
come back to the collection.js page and
here we're going to import that so we'll
say import banner and that's coming from
component page and component index and
in that we're going to call this
collection profile as well so we have
this two component so that's working
fine let's import import the slider
banner and that's coming from the
component component index okay
so you guys have seen that how easy it's
become to use this component in other
so here we have that okay now
filter and that filter is inside the
filter component inside the component we
have filter and that filter we have to
complete the filter so we have the
and the reason why I have import the
filter individually because I don't want
to import the titles or the buttons okay
because the filter component has two
layers we are importing the second layer
not the first layer okay so just follow
the way I'm doing okay so here we have
and let's come here we will take a div
it will have a class called Style
collection and that will have this
and in that we're going to pass this
props because this Banner component is a
reasonable component in other pages so
reusable component in that we're going
to pass a prop so I want to pass the
image so this is the collection
background mode image I will pass so
that's the banner component we are using
okay let's save it and let's click on
this collection page you can see our
redirection is also working fine and
here we have that collection manner okay
that's working fine let's come back to
and let's click on this and here we need
to receive that prop so this is called
Banner image in this we're going to
import the next year's image tag and
that's what we have let's do the
internal Port the CSS file so that's
coming from the same directory Banner
module CSS now we have to remove this it
will be standard and we'll have a div it
will have a class called style and we'll
and that will have a div it will have a
style dot Banner Dash image in that
we're going to display the image
component okay so we'll have the image
and we're going to take this Banner
image in the prompts we have sent and we
need to provide the object fit to cover
we need to assign the old tag to
background and width is going to be
let's say 16 because and height is going
to be let's say 300 okay 1600 width and
height is going to be 300 because I
don't want to I want a little bit okay
if I save it and so that's the import we
have let's come down we'll have another
div and it will have a class called
Banner image image on mobile so we have
a two Dev one because this day we want
to display so this image we want to
display only on the mobile device on a
desktop device we go to hide it and the
other one will be only display on the
desktop device okay so inside that well
again we have to follow the same rule
we'll have a image and we have to
provide the source Banner image it will
have the same properties let's come out
copy the entire one and remove this one
and here we're going to have this height
to 900 okay so that's the two one and
here you can see on the application we
so this is the large one for the mobile
device and this is the small one with
let's come back here and let's go to the
banner thesis file and here we need to
and let's have a look yes we have to do
image mobile and set to display To None
because we want to hide it on a desktop
okay so that's it how it will look on a
desktop and let's come down let's add a
media query and we go to Target Max
width is going to be let's say close to
media query We are following so
that's it and we could Target that image
mobile and that's going to be display is
going to be blocked on the mobile device
save it and the desktop one is going to
be hidden so display none so this is how
it will look big it looks really good
so it's working already fine so that's
the media query we had done with this
come to this collection profile
and before we do that let's we have to
come in the collection page itself and
here we need to import that so
collection profile in this we're not
going to send any props okay we do but
not now when we'll have the data from
the API we're going to set the props and
receive the data so we have that
let's close that one and let's come back
to the collection profile and let's
start working on it okay so we're going
and we do a couple of internal Imports
so we have to import the style file
and we have the style file now we have
to import the let's say icon so
we need uh let's come here and let's go
to this component inside this nav bar we
have that we have the slider and that we
have this social media I can simply copy
come back here and we need all the
social media icon okay so we have the
social media icons now let's come here
and let's do the internal import for the
images so here we have the images we got
the images now let's come here and take
a card array and in that we're going to
have some demo data so let's have this
now we have that four everyday modes
later and now we can start working on
the GSS remove that and let's have a div
it will have a class called style we'll
and that we're going to have another
dividend we say style dot collection
and that will have a let's say another
David will have a class called
collection Dash box Dash left in that
will have the image so we'll have a
images inside that will have this nft
and it will have the old tag is going to
be nft image with is going to be let's
say 800 height is going to be let's say
800 and it will have a class called
style collection box left Dash image
so that's the image we have now let's
come down and we have to take another
div it will have a class called
it will have called social and in that
we're going to have the social media
okay so we'll delete this anchor and
we're going to call this Facebook simply
replicate this four times okay now we
have to change this one to Instagram
this will become LinkedIn and this will
become Twitter okay so these are the
social four social media accounts we
so that's working fine now let's leave
that to Dev and let's come down we'll
take another day we'll have a class
collection box Dash middle okay
and that will take this H1 and we'll
nft collections okay here will come down
we'll Target the P tag and let's come
back to the applications and copy the
text from here okay copy the text come
back here and this is what we have let's
come down we'll have another it will
collection box Dash middle box in that
a dynamic array so we have taken the
array and we're going to use that so map
lm.i and we're going to instantly return
and then we're going to have a div
and it will have the class called style
dot collection box middle box and let's
call it item and it will also have a key
I plus one okay otherwise react will
and it will have the small will display
the price and we'll say I Plus 1. and
here we'll type this random value
okay we'll take a span inside that well
going to use this plus icon and we're
going to use this value and give this
person to increase percent in the nft
price okay so that's working fine we are
done with this remove that those icon we
are not using so we are using only four
things are looking pretty good so far
and everything is working fine let's
come back to the application and here
you can see we have the image we have
the data the name of that collections
the paragraph and the percentage the
dynamic data we are rendering okay
everything is working fine let's come
back make it side by side so you guys
can see when we work on the CSS file
let's have a responsive mode okay this
so let's close this one close this one
come back copy this collection profile
and come back to the CSS and let's start
working to that so we'll Target The
Collection profiles where there's going
margin 5 Ram margin top five Ram sorry
and we have some space let's come down
we'll Target that box with this is going
to be 80 percent margin 0 Auto let's
come down display is going to be great
great template column one FR and three
so just wait we'll dab a gap from three
Rams align item center background color
is going to be our main color
and box Shadow is going to be our let's
and it will have a porter radius to one
ram and padding is going to be one ram
and two Ram from left and right so it's
looking pretty cool you can see it's
already taking Shields let's come down
we'll attack at that collection profile
left sections and image border radius is
going to be one ram and okay let's come
down we'll Target the collection box
let's have a media query so we can see
what's we are actually working on okay
so let's make a maximum width is going
to be 35 em we're going to Target the
collection box and we'll say this is
going to be 90 persons and display grid
tablet column is going to be 1fr padding
is going to be one rep and 0.5 Ram cap
is going to be one ram so this is how it
will look on a mobile device it's
looking pretty cool now so let's come
down here we'll Target The Collection
profile left Social icons and we'll say
display is going to be Flex Gap is going
to be one ram font size 1.3 Ram a line
item Center justify content Center and
margin top is going to be 0.5 Ram so if
we save it this is how it will look
perfectly aligned in the center
Let's uh let's come down we'll Target
that collection box left socials anchor
and background color is going to be our
let's say icon color we have that let's
drag it the border is going to be one
pixel solid where and we'll have the
icon color we'll have the Border radius
50 percent and cursor color itself is
going to be our main color and display
is going to be great padding is going to
be 0.3 time and transaction all 0.3
second easy in so looking absolutely
incredible you can see how beautiful it
let's come down we'll Target that
collection box left Social anchor
and on over effect we want to change the
background to let's say our main color
and the color of the text is going to be
the icon color and it will have the box
Shadow so the custom box Shadow you can
see on over here we are getting this
nice box Shadow and the Border radius
let's come down with Target The
Collection Box middle section and we'll
say display is going to be great a line
items align self Flex start because we
want to start from the we won't we don't
want to start from the middle we want to
start from the top okay so Flex start
let's come down we'll Target The
H1 and font size is going to be three
Ram line height is going to be zero
that looks pretty cool let's come down
Target the Box middle and paragraph line
height is going to be 1.3 and width is
for the desktop and Target that
display is going to be great
great template column repeat for FR and
background color is going to be our main
beachy color okay and Magic top is going
to be 1.5 Ram so we'll have some space
from the top this is how we look you can
let's come down we'll Target the Box
middle box and items we'll say
background color to the main color and
board box Shadow is going to be the Box
Shadow and padding is going to be 3 RAM
back border radius would be two RAM and
line head is going to be zero text align
save it and you can see it's looking
let's come down we'll Target The
Collection Box middle dash button item p
and it's going to be font size 2 RAM
line head is going to be zero
let's make it zero and let's come down
we'll Target that box middle box item
small and display is going to be block
aligner height is only three
okay you can see it's looking pretty
span and we're going to change the color
to the icon color so that's how it will
you can see it's already looking much
desktop we have that I think we are
missing something okay this is the
okay these are the information we have
let's come to the collection page okay
collection profile GSX part and here
so here I forgot to take the title okay
so what we can do is let's remove this
with the P tag okay and let's come on
top we're going to take this small tag
and you can see here we have the P tag
okay here we have the small and we have
the span so save it and let's make on
the full screen and you can see here we
have that floor price then we have the
actual price and the increase of the
price so it's looking pretty good
okay that's like pretty good let's come
down and let's go to the CSS let's come
up here and where is the box Shadow so
this is the Box Shadow we're going to
make it change and we're going to take
the second one save it and this one is
look perfect at exactly like a design we
so this one is like pretty good
you can do the same thing to the main
container but this is the this is what I
like I will go in this way okay
so that's all we have so this is how it
will look on a mobile device so we need
to work on the responsiveness so let's
let's come here in the media query we're
box middle and we'll say padding is
box middle box we're going to say great
template column 1fr 1fr so that's how it
will look Gap is going to be one ram
okay let's come down we're going to
Target the color box middle H1 and it
will have the font size to 1.8 Ram
box build paragraph line it is going to
be 1.3 Ram width is going to be 100
margin top is going to be minus 0.5 Ram
so that's look good well Target the Box
box item and line height is going to be
zero padding is going to be 2 RAM and 1
Ram from left to right this looks
perfect you can see perfectly aligned we
come down Target the Box middle box item
p and font size is going to be one ram
so little smaller and that's look
let's come down We'll add a media query
so Min device with is going to be let's
device width is going to be probably
1024 pixels okay and that we're going to
Target this box where it's going to be
90 percent and this looks pretty cool
okay simply copy the entire one and
replace it okay the same media query we
have to apply in this range as well so
simply copy the entire media query and
paste inside that close this one and
things are looking good this is how it
this is how it will look on a mobile
phone you can see it's perfectly
price everything's looking good
this is the banner section this is the
now let's come back to the code simply
cut this one so come here so we are done
let's come here in the collections
so we are using that one take the filter
and call the filter component okay if we
save the page here you can see we have
we have the filter and this filter is
all we have to do is to send the props
in this and we can use it okay I'll
we'll go it will definitely going to do
so that's the filter we have let's come
here we're going to create one more file
so the reason why I have called nft card
2 because we have already one nft card
in our component folder main component
folder which we are displaying in the
home page but this one is going to be
very specific and this component card 2
is going to be available in every single
every other Pages not on the home page
but on every Pages we're going to have
this component okay so that's why I call
so in thus we have to create this GSX
file and we have to create the CSS file
simply type rafc and we have to do the
internal import the same drill we have
to follow internal import style and
that's coming from the same directory so
here we have that let's come here we
have to import in that collection index
sorry correction in the Cs collection
collection.js page and here we need to
First Take This demo data because we go
to Loop over it okay so we'll have this
collection array and in that we're going
to take this let's say images okay we'll
nft2 nft3 and we'll simply copy and
replicate it three times okay eight
times okay so here we have that and
let's send the data in the correction
profile so we have the data nft data
so nft data collection and in that we
are pasting passing the data okay
so let's come here and here we need to
so that's the props we have here and
here we're going to call the sliders
we'll call the banner component which we
have already will all we have to do is
to call the component so if we save it
and come back to the application you can
see this is the auth profile
this is the tab this is the slider we
have it's already working beautiful
this is a reusable common we're going to
use it and this is The Branding section
so everything is looking fine all we
have to do is to build that card
component so let's close this one and
come here and let's start working on it
let's come to this one and here we need
to simply we export we have exported
that but we have to import it okay so
let's come here and import this here
and here we have to call that component
okay we have to call the component
and simply cut this my bad we don't need
to pass that props inside this
collection profile because then we are
not using we are going to use different
data there we have to pass this array
inside this nft card too okay
so if we remove the page you can see
here we are displaying nft card too so
okay now let's close this one and here
and that's the data we are receiving
what we have to do is we have to receive
a couple of things from react so
BS image that's coming from react icons
fill heart and that's coming from
reactor and we have to get the outline
that's icon we have let's import
let's do the internal import and
let's do the import of the style
and that's coming from the same
directory and we have to import the like
and that's coming from component index
actually we have to pass this nft data
collection every day okay this is the
problem we have to pass so make sure you
do this change and now we can come down
we can take this use State and it will
initial to be false we'll take the
another use State this will call like
increase so we want to increase the like
number whenever someone click on like
and initially value it will have 21 okay
now let's come down we're going to
submit to remove this and let's start
working on the jsx we'll have a div it
will have a class called style Dot nft
card 2 and that will have this Dynamic
block and we'll receive the data on that
we're going to map over it okay so LMI
and it's an instant return in that we're
going to have a div it will have a class
and that will have a assign a key okay
it will have a key and then we're going
to have our Dev it will have a call lft
card to box Dash like and in that we're
going to take another day we'll have a
class called style nft card box like
will and that will have the div it will
have a class called nft box light box
Dash box that and that we're going to
the icon and it will have the class call
we want to render the P tag it will have
a on click functions and we're going to
call this function like nft inside this
we're going to display this like
component so like if you wanted to
initially we want to display the outline
like and when someone click we want to
display This Heart okay full heart so
that's the dynamic component we have
and the initial value we want to assign
so it will have a span and in that we're
going to call this like n plus 1. if
so that's the data we have here
so things are looking pretty good that's
the light component let's come down
we'll have a class called style
and that will have the image it will
source so LM alt and we'll call it nft
where this is going to be 500 height is
going to be called 500 and object fit is
going to be covered so that's the image
we'll have another debit we'll have a
class called style dot nft box Dash info
inside that will have a definitely call
style nft box info left and that will
have a like component okay and we'll
have a p tab let's call it clone and
let's give this Dynamic increasing data
let's come down we'll have a sperm and
we'll call say four one plus okay so
we want to display let's come down and
here we're going to call a class
Dash price and that we're going to have
a div it will have a class called style
box sorry and in that we're going to
have the small tag and it will call
out of that we'll have a P tag it will
have the price so we'll take this random
okay I'll come down of that and we'll it
will have another petite it will have a
class call style nft box price Dash
stock and that we have to display the
stocks okay so we'll have this timer and
it will have the span and in that we go
to display the stock okay so I Plus 1.
and it will call our left okay
so that's the entire jsx part things are
looking good now we have to create the
functions okay so let's come down we
nft functions so it's going to be an
error function if like is false then we
want to set to true and if it's true
then we want to set it false and we also
also increase the liking number to 23
we want to set to false and we want to
Simply decrease this increase number so
so when it would be true it will say 23
and when it will solve it will say this
okay so if you come here and here we are
so let's reload the browser still be
having this error I think I have
imported the style file twice somewhere
in the code so let's come back here and
yeah I made the mistake here simply
remove the CSS file from here okay
I imported twice that's why I was
getting that error so let's reload that
and let's come back to the applications
and let's have a look let's scroll down
and here you can see we have the icon we
have that like if we click on that the
number will increase click unclick click
and here we have the component all the
so things are looking pretty good
okay that's looking awesome now let's
make it side by sides and let's start
let's close this one come back to the
CSS file and let's start working on it
we're going to Target that nft card to
let's come here and copy the text I
guess it is the num yeah NFD card too
let's say width is going to be 80
display is going to be great great
template column repeat for one FR Gap is
going to be 3 RAM that's how it will
let's come out let's add the media query
and Max width is going to be 30 35 em
and we'll say Target the card to and
where is going to be 90 percent get
template column is going to be 1fr so
for the mobile device this looks perfect
let's come out of that we'll Target the
card box and we'll say display grid
cursor pointer transition all 0.3 second
ecn background reporter radius is going
everything's working let's come down
on over effect we want to add the box
shatter to our custom box Shadow color
so save it you can see it's looking
let's come down we'll tag in the Box
like and we'll say padding is going to
grid column one slash minus one grid
row is going to be that's and judging
this something big you can see it will
and display is going to be Flex align
item Center and justify contain space
between okay that's how it will look
let's come down we'll Target the like
box box icon and color is going to be
okay font size is going to be a little
bigger two Ram that's how it will look
so things are looking really good let's
come down we'll Target the nft box box B
and display is going to be Flex a line
item Center and GAP is going to be one
size is going to be 1.2 RAM and
background color is going to be our icon
is going to be our main color okay and
let's say borrow it is going to be two
Ram padding is going to be 0.5 Ram
that's hard well you can see it looks
come down we'll Target the nft Box Dash
image we'll tag the model radius one ram
why it's not taking place okay let's
remove that one and let's type grid
minus one okay and grid row is in the
one slash minus one so it will come on
we target the image image image itself
and this time we'll say border area is
let's copy that class and let's come
back to the and here we need to provide
that class so we'll try the class to the
style and the paste the class okay
nft card 2 Box image image and save it
and you can see here we have the box
border radius so we'll come down we'll
nft box Dash info display is going to be
Flex justify contents space between
padding is going to be one ram
and let's come down we'll Target the
entry box info left and we'll see a like
line head is going to be zero
the left is going to be let's say span
font size is going to be one ram
left and P is going to be let's say font
size is going to be 2 RAM and phone
okay this looks pretty good we'll Target
the box price display is going to be
Flex justify content space between a
line item flex and and line it is going
to be zero padding is going to be one
round so that's looks pretty good
come down we'll Target the the nft box
to Price p sorry and we go to the Border
one pixel solid and where and we'll have
a icon color padding is going to be
let's say 1.5 RAM and one ram and 1 RAM
and one ram okay that's how it will look
forward size is going to be 1.4 Ram
margin top is going to be 0.5 RAM and
model 80 is going to be 0.3 Ram
small is going to be let's say
background color is going to be our icon
where is going to be main color and
padding is going to be 0.3 Ram border
radius going to be 0.3 Ram margin left
is going to be 1 Ram this looks awesome
let's come down we'll Target the empty
box price Dash stock and display is
going to be Flex align item Center and
GAP is going to be 0.5 Ram font size is
this looks awesome let's come back
simply replicate come down and write a
second media query so this will become
this Max width is going to be 2 or 1025
pixels we'll Target the nft card and
we'll say with is going to be 90 percent
and grid tablet column repeat to 1fr
that's the second media query and let's
have a look you can see this looks
let's go to this one and here we are in
the pages and here we need to fix the
order simply cut this one and paste on
top of the nft card too okay paste it
save it and let's come back here
you can see this is the card section
and this is the component looking
Perfect all over it we are getting this
things are looking really cool here
and what we can do let's come back to
the cut nft card to GSX part and here we
need to fix this box so instead of
displaying only two digits let's give
the full price so zero zero ether okay
save it come back here and here you can
nice over effect via having it
okay let's come back to the code and
let's come up here and let's assign a
margin bottom to four Ram so we'll have
some space here let's make it to 14. so
pay a good amount of space this one is
whatever we are getting the style simply
cut this one and let's come back to the
you can see that's the first component
we have and if we come here click on
this menu click on this and we can is
able to redirect to the our collection
page so our router is also working fine
and let's have a final look so this is
okay nice over effect price the buttons
are okay working fine filter this is the
we can click and we can slide this is
and let's make a responsiveness
but we have some problem here here we
have some issues let's come here in the
media query and let's try to have a look
what's the matter what's the problem we
so we have some some mistake so if you
I can notice one thing that this is the
problem we have in the second media
query instead of saying Max Big Max
weight it needs to be mid okay and now
it will work save it and reload the
browser and the problem is gone just
so I don't know why I'm getting this
okay so I'm having this problem only
in the Chrome browser suddenly it
started from one day so if you're having
the same problem make sure you open the
application in the different browser
so let's come here you can see this
looks good and this is how it will look
on a phone you can see perfectly aligned
let me see one more time here you can
so the second break part is also working
fine it's looking absolutely perfect
okay but you can see I'm not getting the
view on the third that particular width
maybe I have some issue in my
browser at the time of recording
but make sure you should it should work
so everything's looking good let's have
a look final time we have the title we
have the paragraph and we have all the
okay so these are the demo data we have
this is the filter we have okay we can
open we can close and here we have the
card so slider we have and this is the
band section and this is the footer
let's come back to the code and things
are looking good almost we are done with
this entire application sorry entire
collection page not with application so
let's close all the tab and come here
and you know that what we have to do
come here go to those pages and we have
to create the page for this we'll call
it author.js and we'll type rafce okay
react functional based component and
here we're going to import couple of
things from react use State and we need
to import use effect let's come down
and actually we don't have any file for
doing the internal Imports so what we
can do we'll do this in Port and we'll
type this style and from but we don't
have that from so let's come here go to
this style folder and let's create the
CSS file for that so we'll call it
author dot module dot CSS okay
this is what we have to import here
so we have got our CSS file now let's do
the import we have to import the
components the banner component that's
coming from the collection Banner okay
which we have already created in our
collection in the previous video okay so
make sure you watch that okay and we are
using that component here in this author
page so we have this Banner component we
have to import the like this to okay
author profile card and author tab we
actually don't have this we're going to
create this folder and these components
so I'm just writing down here so I can
remember that what I have to create okay
so these are the common we have to
create let's comment down this for our
time being and we have to import the nft
card to we have already created in the
collection in the collection page so
we're going to import it from there and
let's come here and we have to import
the let's say brand and title and that's
coming from the component index okay
so these are the component we are
importing here let's uncomment this and
let's uh type tabs okay so these are the
components we're going to create right
this moment author profile card author
Tab and this will call tap card okay and
and that's actually we don't have the
directory we have to create it okay so
let's come here and we have to create
that folder in the main directory okay
so we'll create a folder and we'll call
it author page okay so I'm giving this
relevant name so you guys can easily
able to identify that which page we are
actually working on so we had work on
the collection page so that's why you
can be able to find that there is a
folder called collection page okay so if
you haven't watched that video make sure
you watch that then it will make sense
okay and that we're going to create
couple of folders so in this author page
we need to create a folder so the first
folder we'll create by the name let's
call it uh what should we call we'll
call it author profile card okay this is
the photo we create and inside that we
have to create a CSS jsx file and we
have to type this come here we have to
create the CSS file for that as well
module dot CSS so here we have the CSS
file now come back to the author page
and we have to create one more folder so
click on that and we have to call it
let's call it tabs okay copy that and
create the GSX file so Auto tab dot
modules let's give it a CSS file and
then we have to create the j6 file for
simply type rafc and close all this one
so here we have these two folders two
and that's what we have here imported
so let's come here let's come here and
let's remove that one and now what we
can do let's bring it down and type
import images and that's coming from
let's remove this one and let's start
working on the GSX okay so we're going
to take a let's say let's take a demo
array popular array and and then we're
going to take the images of the user so
let's take the images okay because we're
going to display the image in the
follower component okay so we have so
all together we have five tabs and in
two tabs we are displaying the forward
details okay so this is the images of
the user let's change this one for five
six seven eight okay so these are the
we'll take a use State and we'll call it
okay this is the first tab we have
initially it would be true so when
someone initially visit this page the
collectible tab would be open okay now
we have to take another one this will
call created initially it will false we
have to take another one like false and
we have to take one more this is called
follower false and there is one
following and this is false so these are
the five used trade we have taken five
years straight now let's come down
and we're going to take a div it will
have a class called style and we'll call
it let's say what should we call Banner
and okay inside that will take another
Dev not a Dev we'll go to actually use
the banner component we have created
okay and in this we go to send the props
because it's a reusable component so we
have to send the props so in this we're
going to send the image actually
so the image I want to send is that's
the author we have here let's come back
and let's change this URL type
slash author and let's hit enter and
and here you can see I think we don't
have any image by the name author okay
so that's why you can see this is broken
so what we can do now let's come back
here and here I'm going to replace this
and here you can see we have the images
okay it's looking absolutely good I want
to use different images so let's
find the image we have in the design so
this is the image we have in the design
okay it's looking really good
so we have that let's come here and go
to this author profile card and close
all this and we have to create one more
in which we're going to import all the
component we're going to create in this
so let's call it uh component index and
in this we're going to import the
components we'll import the author
profile card and that's coming from the
same directory and we have to import the
and that's also coming from the same
directory inside the author folder
author tabs and now we have to export
that so we'll type export and in that
we're going to pass this okay we're
going to remove this bracket with this
and with this so here we are exporting
those components simply close that one
and let's come back here and now we can
uncomment this and we can call that so
it's coming from author page component
index okay and that way we can easily
able to access all these component okay
so that's what we have simply copy and
paste here and so that's the component
we have here and here you can see the
component is displaying and now we can
start working on the card component so
let's come back here and let's go to
this author profile card and let's start
so what we can do let's first import
couple of things from react use State
and we have to import the image
we have to import the icons so MD
verified and that's coming from icons MD
and we have to import the cloud would
upload and we have to import the MD
outline let's say report problem okay so
these are the icons which is coming from
MD react icons and we have to import one
more this is going to be icon copy and
that's coming from react icon slash fi
we have to import the icon so it will be
TI social Facebook and that's coming
from TI and that we're going to take the
let's say we have the Facebook we have
Instagram okay so these are the these
are the four icon we are using let's
come down we have to import the bs3 dot
coming from the react icons slash BS
these are the icons we have now let's
come down we have to do the internal
import so we have to import the CSS file
that's coming from the same directory
and now we have to import the images
so this is the internal import now let's
import the button component and that's
coming from the component slash
so let's remove that and we want to
import it from component index okay so
it's coming from component index okay
now let's come down here and in this
we're going to take the U State this
will call share initially it would be
false we'll take another one this will
that's all the import internal external
import now let's remove that and let's
start working on the GSS we'll have a
div it will have a class called style
dot we'll call it author profile card
and in that we're going to have another
div it will have a class called author
profile box we'll have a div it will
have a class called style author profile
Dash image and then we're going to have
the image so we have the source inside
and we're going to use this nft image
one we'll take the class it will have
the author profile card box image image
and it will have the alt tag which is
called nft image and we'll have the
220 and will have the high 220. so this
is the image property now let's come
will have a div it will have a class
called style dot nft box info and we'll
Target the H2 let's come here and go to
the original one simply copy the name
and let's come back and paste it
and inside that we're going to take a
space and we're going to take a span and
in this we're going to use the icon MD
verified so this is the H2 let's come
down we'll take another div it will have
a class called author box info
this will call address and that will
have a input tag and it will have the
type to text it will have the
value to the address simply copy and
it will have the ID will call my ID okay
my input my input and let's come down
we're going to take a icon if I copy and
let's assign a on click function and
we're going to call this function let's
so let's come out of that class and
Dash icon okay so this is the name of
the class we have to assign to this copy
we'll take a div it will take a
paragraph and simply copy and paste here
and we'll have a div it will have a
class called style dot author box info
and it will call social and in that
we're going to display the social media
icon so we'll take anchor and in that
we're going to call the icon so Facebook
copy paste four times and change the
icon to let's say Instagram this will
become LinkedIn this will become YouTube
these are the four I can we have
okay so that's looking pretty good now
we'll take another div it will have a
we actually going to take this button
okay we'll have the we have to send the
props button name so we'll call this
follow and it will have a handle click
function So currently we're going to
okay now let's come down we're going to
say MD Cloud up load and we'll call it
it will have on click function we'll
take the eigen it will have on click
functions and we'll call it open share
it will have the class called let's say
Box share and it will call icon okay
that's the cloud upload and we'll come
down we'll take this Dynamic block and
we'll say let's share share
um if it shared is true then we want to
let's assign a class we'll call author
box Dash share and we'll call it upload
and that we will have this paragraph and
here we're going to take a span in that
we're going to display the icon so the
icon we want to display is the Facebook
here we're going to let's say
we're going to provide the space and
with name simply copy that and replicate
four times now we have to do the changes
and this becomes let's say LinkedIn
and YouTube okay so that's the icon
components we have Dynamic component
come down and we'll have the icon bs3
dots okay it will have the on click
we'll call the function to open report
and we have to create a class called
style author box share icon and and here
we have to take the dynamic block we'll
say report if it's true then we want to
display this Dynamic block so we'll take
this P tag and that we go to assign a
class first and it will have the class
called author box share and let's call
inside that P tag we're going to take a
span and we'll have this outline report
so this is the icon we want to display
and then we want to display this message
review report abuse sorry and we're
going to provide the space okay so let's
save it and if we come back to the
application and here you can see we have
some problem so it says that invalid
and still be having the same problem
okay we have some problem here in the
so let's come back here and let's try to
find out what mistakes we are making
so the function we have to create okay
let's give it the function first okay
copy function okay we'll take this copy
address and it's going to be an arrow
copy text and we'll Target that ID okay
get element by ID my input okay
that's what we want to Target here now
will copy the text and we'll click this
okay and now once we have that we can
dot clipboard and write text and we want
to pass this copy text and value okay so
in this way we can easily able to copy
the text okay so it's this function is
ready okay now let's come down let's
create the other function so we'll call
it open share it's going to be a narrow
share is true then we want to set to
set to true if it's false then we want
to set it true and set the report to
false else we want to set the share true
false and that's it okay so that's the
one and Supply copy and paste and we
have to Simply change this to open
report and we have to set this to set
and we have to change this to share
that's the chain we have to do so let's
come down here and let's have a look one
more time let's come here reload the
browser and still be having the same
okay we are importing something wrong
something's wrong in the import so here
you can see here I have the problem it's
not b s three dots it's not B it's D
okay so change this to D simply copy
that and let's scroll down all the way
and here you can see here we have to
pass the right spelling I was wondering
that what's went wrong in the code and I
found that I made this silly typo and it
took me half an hour to find this one so
it's a part of development okay so when
you come across this kind of situation
don't get frustrated okay so let me
connect this spelling and now
now save it and let's come back
to the application and here you can see
everything is working fine so here we
have all the data we have the image name
and we here we can simply copy and
simply paste here you can see the
function we have written that's also
so things are looking pretty good okay
and this is how we're going to design it
so everything is looking fine now let's
make it side by side so you guys can see
okay that's how it's look now let's
close this one and go to the CSS file
and simply open that come here and go to
this file and simply copy the
class okay the main Class come back to
the CSS and let's start working
so we'll say width is going to be 100
Z index is going to be something high
and margin top is going to be 5 Ram
will Target the box and we'll say with
is going to be 80 percent margin 0 Auto
display is going to be create grid
template column 1fr and 4fr and 1.3 FR
background color where and it is the
padding is going to be 2.5 RAM and 2 Ram
motor radius is going to be 1 Ram
Gap is going to be 3 RAM that's look how
that's how it's look we'll Target the
image image and we'll see motor radius
is going to be one ram let's come down
let's add the media query so we can see
what we are actually working on okay so
we'll take the max width it's going to
be 35 em and we're going to Target the
box and we'll say 90 width and
grid template column is going to be 1fr
and that's how it will look now padding
make it to 0.5 and 0.5 and 1.5 Ram that
looks good we'll have a gap to 1 Ram
now we can start working on the
CSS okay so let's come down we'll Target
and font size is going to be 2.5 RAM and
left line height is going to be zero
margin top is going to be minus 0.5 RAM
and actually I've noticed that it's not
let's come down we'll Target that author
box info address and we'll have the
margin top is going to be -1 Ram we'll
we'll say outline is going to be none
width is going to be 35 percent font
size is going to be one ram and border
is going to be done background color is
so that's working fine let's come down
we'll Target the Box info at risk icon
and we want to make it all 0.3 second
well info address icon on over effect we
box Shadow is going to be our custom box
Shadow and cursor is going to be a
pointer color is going to be a war or
things are looking really good okay you
can see the copy button is also working
fine let's come down we'll simply Target
box info p and we'll say font size is
going to be 1.1 Ram line n is going to
be 1 with is going to be 90 percent
author profile card box info social
well see display is going to be Flex a
font size is going to be 1.5 Ram
it's come down we'll type box info
social a and background color is going
to be Icom and color is going to be our
it is 50 percent display is going to be
padding is going to be 0.5 RAM and
Border one pixel solid where and our
we have the icon color now transition
info social a on over effect we want to
do something so background Shadow is
where box Shadow is going to be custom
box Shadow and background color is going
to be our main color and what is going
to be one pixel solid and it will have
the icon color we have the color itself
is going to be the icon color okay it's
looking perfect you can see on over
let's come down we'll Target the author
card box share and it will have the
Flex is start let's make it start okay
Gap is going to be 2 RAM and position is
going to be relative so that's how it
okay let's come down we'll have the
box and share icon we want to increase
the font size to 2.5 RAM and cursor is
so that's how it will look you can see
on the click event we can easily able to
so we'll Target that author box social
upload and we say position is going to
be a absolute padding is going to be 0.5
Ram with is going to be let's say 15 Ram
box shot is going to be let's say our
custom box Shadow and it will have the
potteries to one ram and it will have
the background color to our main color
and left is going to be 2 RAM
top is going to be 5 RAM and set index
something hype now so that's how it will
so things are looking good now let's
come down we have to Target that Box
upload p and it will have the display
Flex align item Center and line it is
going to be zero Gap is going to be one
ram and cursor is going to be a pointer
transition all 0.3 second easy in
padding is going to be 0.3 RAM and 0.5
simply copy that and come paste here
we'll tag on over effect we want to make
background color to our icon color and
color itself is going to be the main
color okay and whatever it is going to
point to Ram so that's how it will look
nice over a fade we are getting
let's come down we'll Target the upload
span and we'll say font size 1.5 Ram
let's come down we'll Target the up
report and we'll say position is going
so you can see that's is there but you
so we'll say padding is going to be 0.5
Ram width is going to be 10 Ram
box Shadow is going to be our box Shadow
ing is going to be one ram and button
background color is going to be our main
color left is going to be 5 RAM and top
is going to be 4 Ram then index
something big number so that's how it
will look pretty good you can see okay
the function is not working so let's
come here and let's have a look so so
here is the problem we have instead of
Shear we have to remove this to report
and now the function will work save it
you can see we can have this one and
it's working fine let's come back here
we'll tag the Box share report p and
display is going to be Flex align item
Center Gap is going to be 2 RAM
so you can see that's looking really
and here we need to provide the Box shot
okay so let's type box Shadow and we
will have the shadow you can see now
it's looking perfect we're having this
okay we can copy the text we can open
this button is also working fine
nice over effect we are getting here
okay that's looking fine let's come here
and let's start working on the media
query so we're going to Target the
author box image and we'll say width is
okay well simply bring it down we'll
Target the Box info H2 and we'll say
font size is going to be 2 RAM so little
and we'll Target the info address
input which is going to be let's say 85
so we'll have some space you can see the
so it's looking perfect and I don't know
why I'm having this problem and my
Chrome browser when I'm making to the
Mobile screen I'm getting this blank
screen but I'm coming on the desktop
so make sure you have a look on the code
along with the responsiveness okay so
what I'm doing I'm opening this
in my other browser and that's how it
looks okay you can see it it's looking
perfect let's come down we'll Target the
Box info p and font size is going to be
one ram and left line it is going to be
which is going to be 90 percent
social we'll take the padding zero to
let's leave it like this let's come down
we'll Target the Box share and we'll see
minus 1 so that will come on top
and here we have to assign the padding
so it will have one ram and we'll say
Gap is going to be one ram so it will
let's come down we'll Target the Box
icon font size is going to be two Ram
okay still there simply come up on top
and we have to Target the upload and
once the left is going to be 9 Ram so
let's test okay it's moving it's working
fine now we have to change the value to
okay not this one we have to change the
upper one upload 18 okay too much
make it 15. okay now it's looking good
so let's come here and simply check
whether we have any spelling mistake no
so this looks fine copy that class and
still look like that so let's come here
let's make the difference here make it
nine okay now it's looking good 19.
so things are looking really good okay
so everything is perfectly aligned
now let's come down let's take a second
media query Min device with is going to
be 768 pixels and the max device width
1024 pixels and then we're going to
Target the box and we'll say get
template column 1 F4 and 2fr Gap is
going to be one ram so you can see now
it's working on my Chrome okay so this
is how it will look on a mobile device
looking absolutely fine you can see
this one is fine this one would be fine
okay this is the problem we have here
now we have to fix this value and make
okay still again we are facing this
problem as you can see the second
breadboard is also working fine and it's
and the mobile is not displaying but
you can see everything is working fine
and the value I've set 99 is perfect
because earlier it was working and I
tested that and I find that it was
perfectly aligned in the middle okay so
make sure to go with that value
or you can do the testing whichever
finds suitable for you you can go with
so things are looking pretty good so
and close this one so finally we are
done with this component okay let's come
here we have built this author profile
now we have to build the other
components so let's come here and
let's go to this follower tab okay
so this is the component we need forward
not the main folder but do we need the
second folder and that's what we're
going to import here okay so let's come
we're going to import that follower
tap card and that's coming from the
follower tab card okay so here we have
that component now the component we're
going to call it here so before we call
that component we're going to call this
tab component okay that's the component
we have already built and in that we're
going to send all these props so let's
do this for the following as well
so all these props will receive in
and this will allow us to open the tab
and close the tab okay so that's why we
are sending the tab solid sending the
here we have the title now we can come
down we can call use the title component
and in this we're going to Simply pass
the heading so we'll type popular
so what we can do come back to the
original one and simply get from there
so this is what we are building okay
simply copy that and simply paste it
so that's the component we have here
let's come down and we're going to
brand component okay so the component
we're going to use the brand and
let's save it come back to the original
one and here we have the problem
so background is not defined
so it's happening inside the follower
reload that browser and sometime it's
sometime you will have this problem so
make sure you restart the application or
redo the browser I haven't done anything
I just reload my browser and the error
is gone okay so here you can see we have
the author tabs component and this is
the title and this is the brand
component so things are looking pretty
so let's come back to the code and
and here you can see that follower tab
card component here we are receiving the
so this is the problems we're going to
send in the follow tab card okay
come here we're going to take this
popular area and we go to map over it
simply call this follower tab card and
and we have to send this props so
so this is the props we are sending
let's review the browser and here you
it's displaying but somehow it's broken
but at least something is happening okay
so things are looking good not not a big
deal we're gonna fix this issue very
for the time being let's comment out
let's start focusing on the author tab
so this is what we're going to work on
right now so let's close this one and go
author Tab and let's start working on
so we'll import couple of things from
react use State and we'll import the
we have to import the icon so di
allow shorted let's call it down and
that's coming from react icons TI
and we have to import one more this is
so these are the two icons we are coming
and we want to take one more this is
going to be a tick so t i t i c k tick
so these are the icons we have now we
have to do the internal Imports so we
have to import the CSS file that's
coming from the same directory
and we have to receive the props okay
so come back to the author page and here
we have sending the props simply
that's the props we have to change here
okay simply copy this and receive the
so make sure you do the change okay we
want to send this function set
so make sure you do that and now we can
receive that function here sir
and receive it here so here we have all
the props which we are sending
now welcome down and we're going to use
this use State and we'll call it open
initially would be false and we'll take
another use State and this time we'll
call it a active button and this would
be let's say initially would be zero and
we'll take another U State and this will
select 10 selected menu okay and this
so these are the three years that we
now let's come down we have to take this
list so we'll take the list of arrays
we'll take the most appreciated we'll
take another one that's been called most
discussed and the last one is going to
now let's start working on the j6 so
we'll have a div it will have the class
author tabs inside that will take
another day with we call Author tabs
Dash box and so that will have another
div it will have the class call
and we'll call it let's say left inside
that will happen on the div it will have
a class called author tab box left
button and that will have the button
will have the will have a on click
function on this and the function we're
going to create is let's call it open
tab inside that we're going to pass this
e okay event and we're going to call it
Collectibles okay Collectibles okay
simply it will let's assign a class to
this as well so we'll call it author tab
but this class is going to be dynamic
okay because we want to display the
active State and non-active State okay
so that's why I'm taking this Dynamic
block and we'll say active button if
that is equal to 1 then we want to
otherwise none okay so that's the normal
style okay so this will represent the
active State now what we have to do is
um this will become the created
close this one replicate it and this
like this will become 2 and come down
and this will become following this will
on one more time this will become five
and this will become let's say followers
so these are the five buttons we have
now let's come down we have to take a
div it will have a class called Style
author tab box right and in that we're
going to have our debit we'll have the
class called style author tab box right
inside this div it will have a on click
function as well and we'll call the
so this is the function we're going to
create now inside that we're going to
take this paragraph and we'll have this
we have to display the dynamic block
if if open list is true then we won't
up otherwise we won't display this down
okay we have the icon now we'll take a
dynamic block okay not a div because we
want to display the drop top menu so
we'll say open list and if it's true
then we want to render this Dynamic
block okay it will have the class call
or third tab box right and it will call
list inside that will have this list and
we have to map over it I and it's uh
instant return and that we're going to
it will have the class so it will have
the key and it will have on click
function on this so the function we're
menu and we want to pass this
element okay the name NV it will have
the class called author box right
and this will call list items so let me
repeat what we are doing here we have an
array and we are looping over it and we
are printing that array and and on every
element we have this function select
menu and which will update the state
that's what we are doing here now let's
insert that we'll have this paragraph
and it will display the menu and it will
have the span and here in this we're
going to display the icon okay so if
selected menu icon equal to this then we
want to display the stick icon okay so
that's the simple logic I hope you guys
this is the dynamic State and now we
have to create this function so let's do
simply come here and what function we
have to create so let's call it list
okay list now drop down list and it's
going to be an error function if we say
open list is false then we want to set
that's the first function now let's come
down we have to create this one select
open Tab and we have to say that cons
Collectibles okay then we want to set it
true the Collectibles and we want to set
not complicated easy to understand okay
so simply copy that and we have to
number as well one so let's else if
then we want to Simply copy and paste
here and it's a e this becomes false and
and this one has become true okay
button text equal to let's say third one
then we want to save complete paste and
we want to set to false and this will
become true and this will become 3.
third one is going to be else button
text equal to what else we have let's
close this one we have following
simply copy and paste and we have to
change the state to false let's become
now the final one is else if button text
equal to what else we have follower copy
and Pasteur and do the same thing
change this true and this become 5 okay
so that's the open tab function which
allows us to switch between different
different components and it will also
update the active State okay
so let's have a look so this is the
internal this is the functions
close this one close this functions and
let's come here and here we can find
that we're having some issue and maybe
sometime you will have this issue
because you haven't opened your browser
for a long time so in such case all you
have to do is to reload the browser okay
so handle unrunner okay simply reload
and you will find that we have no
problem and now we can scroll down and
we can have a look so here we have all
the buttons we have the most recent and
here we have the drop down so if we
click on this we'll have the list of the
dynamic block and if we click on this we
are updating the state menu okay you can
see on click event we can easily put to
change the state discussed okay and when
we are clicking on the button we are
having this error message because we
haven't defined it okay we are not using
so that's why we are getting this error
let's review the browser um
let's click on one more time you can see
still we are having this problem because
we are not doing anything okay and it
actually says that set collectible is
not defined why it's saying that
so before we test that let's style it
first okay then we'll fix this bug okay
so let's just bring side by side and
come here and simply Target the copy
this one author Tab and paste it let's
box is going to be where this is going
margin 0 Auto display Flex justify
bdn display is going to be Flex
Gap is going to be 2 RAM a line item
that's how it will look author box left
border one pixes solid and it will have
background color will have our main
font size is going to be 1.2 Ram
border radius to the cursor pointer
transition all 0.3 second easy in color
is going to be our icon color
we'll tag the Box left button active
let's say border one pixel solid our
icon color and background color is going
to be our icon color and color is going
well come here Target the button itself
background color is going to be where I
can color and will have the main color
as a text color so you can see looking
let's add this over effect on this you
can see on overflow we are getting this
let's target the box right section and
we'll say position is going to be
modern is going to one pixel solid where
where this is going to be 15.2 RAM and
padding is going to be 0 and 2 RAM align
item Center and GAP is going to be one
cursor pointer and get template column
9fr and 1fr you can see it looks perfect
let's work on this drop down button
so we'll Target that para p and we'll
say font size going to be 1.2 Ram line
right Para less sorry list and we're
going to Target the background color to
padding is going to be one ram where
there's going to be 15 15 RAM and left
padding is going to be absolute Z index
High number and moderate is is going to
margin top is going to be 1.5 RAM and
box Shadow is going to be our box shadow
so that's how it will look looking
let's come down at this right list item
let's make it display is going to be
Flex a line item Center justify content
space between and line height is going
to be zero padding is going to be
padding right is going to be one ram so
you can see now it's looking good right
list item P we're going to Target the
transition all three second easy in
padding is going to be 0 1 RAM and line
it is going to be one ram cursor pointer
we'll drag the box right list item on
over effect we're going to change the
background color to Icon color
is going to be our main color and
borrow it is going to point to Ram so
you can see nice we can easily change
the state and it's looking perfect okay
we have to do a little bit adjustment
because things are looking good
in the author dab box left BTN and here
we have to say padding is going to be
you can see this buttons are looking
okay now we have to fix this one okay
let's come here here in this author box
right para we have to say display is
going to be great and now you can see
and here we're going to make it 17 let
it make it a little bigger and
okay we have to make it a little higher
and let's come here and make it 16 in
and if we come here now you can see
now we don't have this overflow the tabs
now let's start writing the media query
okay so we'll say Max width is going to
Tab and margin 3 RAM and 0 RAM and 2 RAM
3 I'm sorry and zero Ram so but I get
which is 90 percent display is going to
be great great template column 1fr
looking quite good let's come down
Target the left button and we'll say
display is going to be great
great template column repeat 2 1 f r
that's how it will look and GAP is going
to be one ram and box Shadow will have
the box Shadow and Parry is going to be
and borrow 80 is going to be one ram and
padding two one ram and one ram okay so
this looks pretty good you can see this
we'll drag it that box right and
with this is going to be let's say
matching top is going to be 2 RAM
this is going to be 100 okay you can see
in outline clicking taking the full
we'll tag at the right list
left is already before Ram so you can
see now we have some space from the left
hand side and things are looking good on
let's take a second media query and this
and 768 pixels and Max device width is
going to be let's say 1024 pixels
will Target the box where this is going
to be 90 percent and display is going to
template column 1fr and GAP is going to
you can see it's looking absolutely
but we don't have this function that's
why we're getting this error okay
so things are looking good let's review
we have this drop down we can easily
able to change the text let's do the
inspect element and I have this problem
so I can see that let's Zoom a bit and
it's working fine you can see this one
and this is here we have to do a little
bit touch up okay and this components
are looking really great okay so let's
come back to the code and what we can do
copy this hundred percent and simply
and save it and now it will take the
so things are looking good really good
we have this over effect optic state so
and let's make on a full screen and now
we have to work on the tab so simply
close this one and here we are in
author.js page and let's have a look
so here we have this component popular
array let's uncomment this one
and here let's come here and create one
more folder in the author page and this
will come author nft card box okay
let's create the j6 file and we have to
let's grab RFC and this is going to be
the controlling point of the entire tab
so in this we're going to do the
internal import we have to import the
and that's coming from the same
what I want in this we're going to do a
couple more Imports so let's do that
okay this is the component which is
coming from collection page okay
and here we go to import the
and we want to import the follower
tab card okay so this is the component
we're going to import here and that's
coming from the follower tab okay so
so that's coming from this component and
here we have the follow Tab and this is
the component we are importing here okay
so that's the concept we close this one
here we're going to make the things
happen Okay so let's import the use
State imports from react to use State
and we're going to receive the props so
and here before we do that we have to
export this component so let's import
card box and that's coming from the same
copy that and simply export it
so in that way we can easily able to
here we in the author GS we're going to
receive that component okay simply
and now what we can do simply
copy that component and simply remove
this because we don't need this tab card
that's what we're going to call it right
okay right call in the component and in
this we're going to send the props okay
you can see right now here we are
displaying this nft card box it's
things are looking good now we have to
this is what we have here now we have to
let's come here we have to copy that and
do the same thing for others create it
and the final one is following
so we are getting these props
now we have to receive that prop simply
copy that and call all the props here
and the final one is following
so these are the props we are receiving
I'll come down and here what we're going
to do we're going to remove this and
well have a Dev and it will have a class
and we'll call Author nft card box okay
in that we're going to take this Dynamic
block okay we're going to take all the
components which we want to display
okay so we'll say that we'll take this
if it's true then we want to display
we have the component so nft card 2 okay
this is the component we want to display
if Collectibles is true so simply
replicate this couple of times five
times because five components we are
and let's change this to because created
okay at a time only one component would
be visible simply copy this forward tab
component and that's what we're going to
because in the follower component
section we want to display the follower
copy that and simply pass it here so in
this way we can easily have the all the
looking good now what's the problem we
have here so map is not defined actually
we don't have the data so we have to
because each of this component needs
data to render on the front end okay so
we have to send those data okay in so
let's come here and here we're going to
take our demo data it has come down
we'll call it const we'll call it
and it's gonna be an array in that we
have to take this images nft 1 nft
2 nft3 and simply copy and replicate it
three times and remove last one okay
so that's the Collectibles array now
let's do the same thing from others
and we simply change this we'll have the
same array removed couple of array from
here and let's take the third one which
is a like array we'll paste that and
we're going to remove it couple of so
this time we'll have five closest one
and the following is going to be
different okay so in that we're not
going to have this we're going to take
user five so these are the five array we
have and the last one is the user
let's close this one take the following
array so it becomes following array and
we're going to call the users one
replicate it and change the data to 3 4
5 6 7 and the final one is eight so here
we have the details about the followers
okay and that's what we're going to pass
nft card 2 component we have to receive
the props in the name of nft data okay
come back here and here we're going to
simply and in that we're going to pass
nothing is nothing is alien to you okay
you guys are familiar with the structure
so simply copy that and simply paste
paste here and paste here and paste here
so we are sending the props now change
the name so this create this becomes
follower this become following array
come back to the applications and here
that collectibles component is true
that's why we can easily able to have a
look we can easily able to render all
just looking absolutely perfect
but if you're clicking on the component
on the buttons we are getting this error
so still we are having this problem I
still be having this one and it says
that set collectible is not defined
right so we are receiving the prop let's
reload the page one more time and let's
call the function still we have the same
so things are looking good everything's
so let's come back to the code and
let's come here let's make it this it's
a zero make it make sure you should make
it one so if you make it one let's come
and here you can see the tab collectible
tab is active so we can able to have
this background color Okay active color
so looking good but if you are clicking
on other buttons we are getting this
we got to fix this problem okay so
now let console log out the text that
whether the function open tab function
is working or not so let's do the
close all this one if statement and
comment out this for my being to find
so let's do the inspect element and
let's come back to the buttons
and let's bring the terminal up and
console and let's have a look
created so it's working fine
Collectibles like following popular
followers following so these buttons are
working fine but what's the problem
simply check the text that the text we
and the final one is followers so
everything's so fine now simply remove
this okay select all this and remove
still we are having the same problem
still set collectibles is not defined
we are receiving that set collectibles
but when we are sending the props okay
but here is the problem we are not
sending that set collectible okay so
that's the problem we have simply copy
and now selecting good save it and here
now we can come here now it will work
let's bring the terminal you can see we
can easily able to switch and the
problem we have in the followers
it says background is undefined but the
other tab is working fine so let's come
here let's click here you can see the
it's working fine and when we are
clicking on created like is also getting
so let's come here so let's have a look
let's come here okay here is the problem
we have to remove this to make it three
if we click on this we can easily able
to switch to different components and
here we have the problem in the
follower tab card component background
is not defined so we're gonna fix that
here let's click on this and come back
to the component here we are receiving
element and I an element okay so we are
and here we are rendering they are
but here what we are doing here we are
but we want to send the element okay
uh so the first thing we have to do is
to do the changes in the data okay so we
want to display the background and the
user images so this is not the data
we're going to take we're going to take
an object and we have a background here
we'll have the image of the background
and simply remove this one and in this
we're going to have the image of the
simply replicate couple of times because
this is the data we're going to display
let's become five five and this becomes
so simply copy this entire data and
close this one and do the same thing
and here we're going to just
reshuffering it okay bring it up and
then move our last one okay and simply
here we're going to take this Dynamic
okay and simply copy cut this and put
inside this okay close this one okay so
what I did I simply removed that
follower component from here okay and
because I was getting constant error so
let's let me show you how we can fix
this problem so we're going to take a
dynamic data okay time naming block and
we're going to call this follower okay
if follower is true then we want to
render this component okay so we'll have
a div and that inside the dim
inside the div we're going to have this
follower array and we're going to Loop
and this is the data we're going to pass
it inside the forward tab component so
we'll pass the index I and we'll pass
the element and this way we can easily
able to render the data okay and simply
copy that and do the same thing from
here simply copy that and paste your
um simply copy this following and we
have to replace this with following
so this is how we can send the props
because our follower tab component need
not the entire data we need the data
which is getting Loop and that data we
want to send inside this follow tab
component okay so this is the trick
which we can use so coding is all about
problem solving okay so this is the way
I found to solve this for this problem
okay there are many way to fix this
so things are looking good let's close
let's come here and here we are
receiving that and here simply our
and now we can simply click switch
between the components when we click on
the following tabs the data is
displaying but it's not in the perfect
so the data is working okay the dynamic
block is working we can able to switch
but the design is not good we have to
to the code and here we're going to
do one thing so we will assign a class
to this div we'll say class Style
box card box okay simply copy that and
assign the same class to this div as
and now we have to add the CSS styling
so let's come here and go to this empty
card box and here we're going to Target
that we'll say width is going to be 100
percent and we target the box and we'll
let's say where is going to be 80
percent margin 0 Auto display is going
to be great and good template column
okay and we'll assign a gap to let's say
2 RAM save it and here you can see
but the user image is broken we have to
see what's the problem in that but
things are looking good right right
Mouse look much better we can switch and
things are looking perfect okay
okay let's come here we have to assign
the margin from margin from the bottom
side and let's make it to let's say
14 okay we'll have some space from the
things are looking pretty good now let's
come back to the follower Tab and follow
follower tab card and we have to look
that why the user image is not
displaying so let's come here here we
the background image is working fine
but here we have the user image so we
so it's a user but we have passed image
so simply copy that and we'll come here
and where we are passing the data and
here we have to do the change instead of
now do the same thing from the upper one
come back to the application and here
we have the data we have the component
things are looking pretty good
we can easily able to switch to
different components and this data is
entirely Dynamic okay so we can follow
this one is also working fine okay
we have to fix this problem so let's
reload that still we have this problem
so we can fix that not a big deal so
and close all this one let's go to this
this is the where we have that
we have the tab and go to the tab CSS
have the list go to the CSS one and
simply what we can do this is the one in
this we're going to provide something
so it will come on top of that okay now
it's like much better remove this one
so we have to call this follow tab as
we'll simply copy that and simply we're
and let's review the browser and we
don't have the data so let's come here
and here we have the data okay so this
is not the data we need so let's just
card and this is the data we need simply
copy that and come back here and simply
and that's the data we have to sensibly
we're going to follow the same structure
and we'll have the class we'll call it
dot author and here we are calling
Banner okay I don't know why I have
we're going to call this author box
okay so make sure you do the change on
the top as well and we'll have this
will have the data will Loop over it
it's going to be instant return and in
this we're going to call this component
and we'll send the props so we'll send
the I and we'll send the element itself
so that would work perfectly um you can
and let's scroll down and here you can
see the component is displaying but we
have to fix the order okay not a big
go to the authors model the CSS file and
make sure you do the change so make it
author okay copy that and simply copy
come here and simply tag it that box and
we'll say width is going to be 80 margin
0 Auto display is going to be great and
good tablet column repeat for one FR and
GAP is going to be let's say 2 RAM save
here this looks perfect okay things are
looking good okay but we need to provide
some space from the top so let's say
margin top is going to be 4 Ram
let's make it to six okay that looks
so this company is also looking perfect
and you can see that how easy it can
become because we have spent a lot of
time building this component and now we
all the functions are working we can
click unclick follow and follow and this
check here just simply delete this okay
and come back to the home page okay
to check Final times so here we are on
home page things are looking good
let's come here on top okay let's bring
let's click here click on the collection
search collection page okay so you can
see we are on the collection page we can
easily able to navigate to the different
pages let's have a look things are
looking good on this page as well
okay so make sure you should always
check because sometimes when you do the
refactoring and use the same component
you make some certain mistakes so it's
component and other Pages as well so
this looks fine now let's come here
simply remove that oh let's come here
and click on this author profile
and here we have actually we don't have
and we have to do the changes in our
navigation bar okay so let's open that
component and we have to go to the nav
bar in that nav bar we have this
discovery component and then we have
so simply open that area and here we
have to do the changes so instead of
author profile we're going to remove to
only author okay let's bring it back and
okay my bad I have to remove this
and now it's working fine you can see
things are looking good we can easily
able to switch to different pages okay
this is the first card component okay
you can copy the address short
this follower Dynamic block for the
you can see the states it's changing
we have this component we can switch to
okay things are looking good but we have
to make it responsive it's not
responsive for the mobile device it's
looking perfect on the desktop but we
have to make it responsive so let's have
a look and check everything's working
things are looking good we have no
issues in this this is the popular
Creator section that's also looking fine
and this is The Branding sections okay
and this is what we're going to build in
the next video okay this is the search
page which we're going to build in the
next video okay so let's see this is
let's come back to this and let's have a
responsive you can see this is the
problem we have we have to fix it okay
it's not responsive for the mobile
okay that's the problem we have we're
okay it's overflowing so let's close
and here we are in the author modules
and here we have to write the media
query so we'll Target the and and it
we'll Target the author box and we'll
width is going to be 90 and great
template column is going to be repeat
one of our save it and let's review the
that's what we have here let's rule the
and here I have this problem I don't
know why it's not displaying on a mobile
but just make it side by side and here
you can see it's working fine okay
so the media query is working fine
and this is also again we have one in
mobile phone okay so that's looking fine
this is also working fine but we have to
this follow tabs we have to fix
this one so for that what we can do
simply close this one and close this one
we have that inside this author page we
have to go into this card okay
and this we have to write the media
query so we'll Target that and and this
whether it's going to be 90 percent and
on FR save it and you can see the
we have to do the inspector limit and
now it's looking fine you can see
everything is perfectly aligned
on a mobile device you can see 100
you can easily able to have this over
effect we can switch to different tabs
the image is taking a little bit time to
load because these images are heavy and
we go to optimize that as well okay
so you can see this breakpoint and this
is not look good we have to add the
so let's it's going to be between 768 to
thousand something okay from here
so we'll take the second breakpoint and
Max a sort of Min device which is going
to be it will start from 7 68 pixels
it will go Max device with will go to
so in this we're going to Target the box
with is going to be 90 percent and get
template column repeat to 1 FR okay so
we want to do split two copper so as you
simply copy this entire CSS and close
this one and come here and go to this
go to this let's say where is it author
okay here and the author modules and
here we're going to Simply copy that and
and here you can see it's looking fine
so things are looking absolutely great
100 responsive we can easily able to
let's come here let's have a final look
so this is what we have we can easily
able to switch to different tabs
make sure you open up the project which
you are working on and you know the real
what we have to do so first thing we
have to do is to create the page we'll
call it search page.js okay and we have
to create the CSS file for that so let's
create that search page dot modules dot
CSS so here we have the search
CSS file and will come here and we'll
type simply rafc to create the reacts
functional base component and now we
have to import the CSS file and that's
coming from the same directory okay
nothing new We are following the old
okay so here we have the CSS file now
let's come here and let's close all
these files and we have to create one
more file in the main directory okay so
this is the pattern We are following so
we'll call it let's say search
component no let's call it search page
okay inside this folder we're going to
create the search bar folder okay so
let's create one more folder search bar
and simply copy that and we have to
create the jss file search bar.jsx and
we have to create the CSS file for this
okay so this is the component we have
here we go to create let's click on here
let's on the main main search bar folder
we have to create the index okay so
we'll say search page index okay and
this we're going to import the component
simply do one thing close all this open
let's bring this and type this internal
import the style file okay and that's
coming from the same directory let's
come here and go to the search bar index
in which we have to import the component
okay so we have to import the search bar
and now we have to export that search
bar and that way we can easily able to
receive in the search page and here
we're going to receive all those
component okay so everything's working
so here we are on the search page and
here we go to do a couple of imports
so first thing we have to import the
slider and that's coming from the
main component and slash component index
so you'll simply remove this one and
that's coming from the component index
so here we have the slider and we want
bar and that's coming from the
search page slash search bar index okay
so that's the component we are getting
so here we have that component
let's come down we have to import let's
and that's coming from the component
so this is the filter component we are
using here so that's also working fine
let's simply come down we have to
come here and go to this collection page
and in that collection page we have this
nft card 2 okay so this is the component
we're going to use here as well okay so
let's import that as well so nft card 2
and that's coming remove that simply and
simply bring it from author slash page
dot collection slash collection index so
we have this and simply wrap this inside
a packet so will not get an error and we
need a banner as well so this is the
Imports we have here now we can start
working on the jss so simply remove that
and we'll take a dynamic block we'll
have a div it will have a say style
we'll call it something like search page
and inside that will have a another div
and inside that will have this sidebar
and here we're going to import all the
components so we'll have the banner will
have the let's say slider will have the
brand and we need one more component
filter so we're going to import the
filter here and we have this nft card
too so this is the card which we have to
so simply start the application and
let's have a look how things are looking
so let's click on this and open in the
inside does Discovery okay and here we
have to do the changes in the menu so
here we have that search we'll type
so this is the change we have to do now
simply click on this and open the
let's close all the other tabs and just
wait and here you can see everything is
working fine click on this search
and here we are on the page but we are
we have invalid expect a string okay so
let's bring this down and let's see
what's happened here okay we are getting
this error once again so really the
browser and let's come here and
simply comment this all and reload the
still we are getting that reload
so things are looking fine now let's
it's working fine the image is broken we
have to send the image in that as a prop
which we have inside this image folder
okay and from there we're going to pass
that in here so Banner image image
and we'll pass the image 2 number okay
so let's reload the browser and
here we have the image okay it's working
image is working fine now let's
so we have problem in the filter okay we
so let's come here and this is the
problem we have we have to wrap this
because we are exporting for the
component index we are not individually
importing it okay so we have to wrap
that and now if we come and we do the
browser and you can see the filter we
have here everything is working fine
now simply comment uncomment this and
review the browser and here you can see
we have the slider it's also working
remove this and let's come here this is
the brand section so everything's
everything's working fine now we have to
bring this slider up and you can see
here we have the slider but the slider
is not displaying okay because we have
let's simply copy that component card
and we have to pass it right below the
filter and in that we have to send the
props the data so we'll take a const and
we'll call it let's say collection array
and in that we're going to pass the
images okay so we'll pass the nft one
nft3 and we're going to Simply replicate
this three times and remove the last one
okay all together we want to have it
okay so things are looking good okay
simply remove the last one so things are
looking and that's the data we're going
to pass inside this so we'll type this
nft data and in that we're going to send
this prop so things are looking good now
let's come here and it says that map is
that's the problem we have so let's come
here reload the browser and you can see
everything is working fine sometime you
will have this problem so if you get
this problem make sure you restart the
application or reload the browser okay
that will solve the problem so here you
can see we have the data all the data is
displaying perfectly and everything is
and this is the company we want to build
okay so let's come down and now we can
start working on the slider okay so
let's close all these tabs and let's
come here and go to the where we have
inside the slider here we have the
slider now we can start so simply take a
class and we'll call it style dot
sidebar and that we're going to have
another div it will have a style we'll
call slide bar Dash box inside that
we're going to have a let's type a
sidebar to see things are working okay
it's working now what we can do simply
come here we have to import couple of
things from react so we do we need to
import the search icon and we need to
import the let's say Arrow icon okay
and this will call Arrow right okay so
these are the two things we need to
simply remove the demo text and we in
this we're going to take this icon first
icon search icon and we'll have a class
so we'll take the class we'll call it
it will call icon okay we have to close
this one properly so we got in an error
and in here we're going to take the
and we have to assign the placeholder so
the placeholder I would call it type
so this is the text we want to pass and
here we're going to take the second icon
which is the arrow okay and it will have
let's say search box icon okay it's the
same class we're going to assign so
that's the only GSX part we need and you
can see it's displaying perfectly
now what we can do we can come back to
the csys file and now let's get styling
so we have to copy this and let's come
back here Target that and we'll see
where this is going to be 100 and
so let me make this side by side so you
guys can see what we are working on
and we'll tag the box and we'll say
width is going to be 40 percent and
background color is going to be our main
is going to be our main color
and display is going to be Flex
border radius five percent five RAM and
align item Center margin top is going to
margin bottom is going to be 3 RAM
box Shadow is going to be our custom box
Shadow color so that's looking perfect
you can see it's looking beautiful
let's come down we'll Target the Box
icon and we'll say font size is going to
padding is going to be 0.5 RAM and 0.8
cursor pointer and will have this color
is going to be our icon color so things
are looking pretty good we'll come down
we're going to Target that box input and
we'll say width is going to be 85
percent and border is going to be 0
and it will have the padding to 2 RAM
and background color is going to be our
main color so that's how it will look
let's come down we're going to Target
input and placeholder the color is going
to be our icon color and font size is
going to be let's say 1.2 Ram
okay it's working fine now let's here I
write the media query so will it gonna
be a Max width 35 em and we'll tackle
the box with this is going to be 90 on a
mobile device so that looks perfect and
we'll say margin top is going to be 2
and margin bottom is going to be one ram
so this looks perfect you can see it's
looking perfect both on the mobile
and things are looking really good so
it's perfect so it's working fine
let's come here and go up here and here
we need to do the changes let's type
let's make it 14 okay and let's make it
eight so this looks perfect okay we have
so that's looking perfect let's scroll
down and let's have a look this is also
so the slider is also looking great this
okay so everything is working fine let's
check the responsiveness so that's how
things are looking good make a break
mobile throwing I'm having this problem
so okay let's come here and let's
do the inspect element so still I'm
having this problem in Chrome browser
but if I copy this and if I open the
my other browser simply paste here
n just wait and and here you can see
it's looking perfect on mobile device so
it's looking absolutely perfect
you can simply check this is the search
bar these are the tabs buttons and this
is the open tabs this is the cards
all you can able to see here you can
expand and you can check the media query
you can check the media query so looking
fine on this this okay this one is also
we need to add the second break point I
guess okay but this looks perfect okay
this looks perfect so let's come back
so here I have already opened the
project in my coordinator and you know
the drill what we have to do so let's
come here and first thing we have to do
is to create the page and we'll call it
and here we're going to type rafce
okay simply remove that and type details
copy and simply replace this okay so
this is the nft page now so let's create
one folder in the root directory and
we'll call it nft Details page okay in
this we're going to keep all the
components for this particular nft page
okay detail page so in that we're going
to create folder and the first folder
would be called nft description okay and
that we're going to create the j6 file
and we have to create the CSS file for
and in that we're going to type this
closest one and let's come here and
create one more folder and this will
and that we're going to create two files
so image.jsx and we have to create the
here we're going to type the rafce so
that's the file okay so these are the
two components we're going to import in
and let's come here let's create one
more folder and this folder will call
so let's create the CSS file for this
and j6 file for that so jsx and let's
give it the CSS file module.css let's
come here type rafce and close this one
it's okay so these are the three
components we're going to import in this
nft Details page okay now in the main
folder we have to create this nft
we have to create the CSS file okay so
let's click on that and we have to
create the csos file for this page okay
nft details and Page dot module.css so
these are the folder and file structure
for this nft Details page okay so
everything is working fine type RAF CE
and things are looking good so let's
have a look okay so let's close this one
and close this one and let's come to the
just bring it here and now we can start
working on the nft details page okay
so here we are and we're going to import
the CSS file and do some internal Port
and actually I remember that we haven't
created the CSS file for this nft
Details page okay so let's create that
okay so let's let's come here but before
we do that let's import all the
component in a single file so let's call
it nft details and this will call
index.js and this we're going to import
the component and here we have to import
the files so import and we have to
import this nft in descriptions and
that's coming from the same folder so
descriptions now we have to import the
details image and that's coming from the
now we have to import the tab
and that's also coming from the same
directory okay tabs tab okay and now we
have to export that all component so we
have to export the descriptions image
and we have to export the tab as well so
these are the Import and Export we are
okay nothing new let's close this one
and come here and and we'll come here in
this nft Details page and and we have to
import this so we have to import the
button and that's coming from the
component slash button okay not from
button we're going to import from
component index and we need to have this
category we want to have this brand okay
so these are the three components we are
importing from component index
now let's come here import the
we have to import The nft Details page
okay and that's the component we're
going to pass in here okay simply call
the component and we have to call the
component category we have to call the
brand okay these are three component we
are displaying on the nft details page
things are looking fine now you can come
so let's close all this open Tab and we
have to start the application type npm
run div and click on this 3000 and here
we are on the browser so here you can
see it's working fine now let's click on
this nft details and you can see we are
successfully redirected to The nft
Details page so that means that our
so here you can see here we have the
category here we have the brand so
things are looking pretty good let's
bring this down and now we should start
working on this nft Details page okay so
we have to import couple of things so
we'll type internal import and in this
we're going to type nft to see things
are looking fine you can see here the
nft is displaying that means our
component rendering perfectly
come back so let's remove that one and
we're going to import couple of things
so first thing we want to import that
and that's coming from the Slash
from the same directory and now we have
to display import the image and we have
to import the tab so these are three
component we can import and now we have
to import the CSS file and that's coming
from the same directory okay so these
are the internal report now I will
improve this and we'll take a div and
we'll have a class called let's say
nft Details page in that we're going to
have another div it will have a class
nft details based Dash box well in that
this component okay simply copy that nft
simply this one image one and
we'll simply call the second component
so we'll have this two component here in
this nft Details page and now we can
start working on the details and let's
come across this one and and let's come
here first we'll start with the image
so here we are and let's type image and
here you can see it's working fine now
let's come to the descriptions and let's
and here we have description that means
our both the components are working fine
so let's come here let's close all the
steps and let's start working on the
image first okay so we'll come here
we're going to import couple of things
from react to use State and it's going
to be a use effect we'll do the import
the image and that's coming for next yes
and that's coming from react icons slash
BS okay now we have to import the AI
fill heart and we have to import the AI
and that's coming from react as well
react slash AI okay so these are the
icon we have now let's come down and
and this would be let's say up and this
one is going to be a down one okay so
these are the two icons we are getting
simply get back and and that's coming
from react icon slash TI okay
so we have this icon now let's come here
now let's do the internal Imports so
we'll type this command internal Imports
so first thing we have to do is to
import the CSS file so Styles that's
coming from the same directory
okay dot slash and CS file now we have
to import the images so we have that
images inside this image folder okay
now we have to come down so these are
the external internal import we have
okay nothing is new We are following the
same pattern and in this video I'm going
so let's come here and we're going to
take a u State okay and this will call
initial would be true if and then we'll
take another usage this will call
details and this will be true
we'll take another use date and this
will call like and initially it would be
false so these are the use trade we have
now let's come down we're going to
remove this and we can start working on
so we'll have a div and we'll have the
class call style and we'll call it this
detail image okay we'll have another
class as well have nft details image
Dash box and that we're going to have
another div it will have that box
Dash nft okay in that we're going to
have another dividend will have the
class called style nft detail image Dash
box Dash nft like okay like and in that
we're going to have this icon and we'll
call it nft box nft like Dash icon okay
and this will have an icon okay icon
so this is the icon we have now let's
come down we'll have a paragraph and it
will have Enclave functions and we'll
call it like nft okay and in that we're
going to Target that if like is true
then we want to render this compound
okay this icon so AI outline heart
and you will have the class called nft
and if it's false then we want to
display this icon fill icon okay so this
is the like and unlike button icons we
so we're done with that now let's come
down we'll have a span and we'll say 23
okay here we're going to display the
actual data of that nft likes okay so
right now we are going with this hard
so let's come down we'll have another if
nft image and in that we're going to
have this image tag and it will have the
source we'll call it image Dash nft1 it
will have the class called Style
nft box image image okay so that's what
I'm calling let's provide an all tags
nft image with is going to be let's say
700 and height is going to be let's say
800 and object fit is going to be the
cover one okay so this is the objects
and uh this as you can see it's looking
we'll have a class called nft
it will have a on click functions and in
that we're going to call this functions
let's call open description okay
so this is the function we're going to
call it and in that we're going to have
this P tag and it will call this
it will have this Dynamic state so we'll
say if description is true then we want
to display this icon otherwise we want
to display this icon okay so Arrow up
let's come down we're going to take this
description Dynamic block and we want to
render this component okay so we'll have
a div and we'll have a class called
dot nft box descriptions Dash box okay
and that we're going to have this p and
let's come here and simply grab this
text and come back and simply paste it
okay so these are the text we're going
and we'll have another div it will have
the class call style nft box Dash
details in that we're going to Simply
call take this P tag and then we'll call
it details and let's assign a class to
and this okay let's remove that and
will provide this on click function and
this function will call open details
and here we're going to do the same
thing let's come here and simply this
and paste here and change this to
so here we have the icons now let's come
down we're going to take this Dynamic
block and it will have a class called
details box okay and that we're going to
take this small tag and copy this and
come paste here simply take the speed
tag and with inside that will have this
small tag and that come here and simply
come back and here we go to display the
we'll have this break and we'll have
account address simply copy this account
address and come and paste it so this is
let's come down we'll have another P tag
and in that we'll have the token ID and
here we're going to display the token ID
the complete jsx part of this
image section you can see right now we
don't have this like function but it's
working fine okay so let's review the
page and let's have a look one more time
so things are looking good you can see
we have all the details things are
so now let's come up here and now we can
start working creating the functions
okay so let's come here we're going to
create a function so we'll call it
open so what function we have to get
open descriptions okay so let's come
here we have to open description and
it's going to be an error function we'll
then we want to turn it to True set it
we want to set it to false simple
function okay so in this way we can
easily able to open and close the
simply come down we're going to create
another function and we'll call it open
it's going to be an error function and
we have to build the same logic so if
details is false detailed is false then
we want to set it true and else we want
now the third function we have to write
is for the like nft okay it's going to
then we want to set it to set to true
sorry if it's like is false then we want
to set to true and if it's true then we
so let's remove that remove that and set
false okay so these are the function we
and let's come here and here you can
able to see let's test click on this you
can see we can easily open and close the
but here we have problem in the detail
so we can easily able to switch the
icons but the data is not switching okay
okay so something's wrong so let's come
here and things are looking good here
and I've noticed one thing that I
dtus in a dynamic block so we have to
so simply what you have to do is let's
come up here and we're going to take a
dynamic block we'll say description is
if it's true then only if you want to
so let's come here simply copy this
entire close one copy this entire and
now save it and now we can easily put
able to open and close simple click open
close open close so this function is
okay you can see we can easily able to
this is the other component we have
which we start working shortly okay so
this is looking fine now let's come here
let's come up here and let's have a look
so things are looking good now we can
start with the other components so let's
come click on this close this one and we
can go to this description so let's come
so close this one Zoom a bit and now we
can start working on the description
component okay so let's import couple of
things from react you state and we want
and we want to import the icons so MD
verified icon we need from and that's
slash MD okay and then we're going to
import couple of more icons so this is
going to be MD Cloud let's say upload
and we want to upload one more which is
a timer okay every timer and we want to
have one more this is called report
problem okay so these are the four icons
coming and the final one is going to be
let's say MD outline delete
the swap okay so these are the five
icons which is coming from Material UI
now we have to import the one more which
is called bs3 dots and that's coming
react icon BS we have to import one more
wallet and that's coming from react
icons fa and that we're going to import
percentage so these are the import of
icons and external Imports so let's come
here click on this and let's get back
and you can see these are the social
media icon we need in the detail page as
and come here and we're going to paste
so in this we're going to need couple of
things so remove this one we need only
this four social media icons
so these are the icons we are using in
this page now let's come here we have to
transfer and that's coming from that bi
okay so we'll have options where of the
transfer of the token so for that we are
so this is the icon for the transfer now
we have to import it let's say with
and we can come down now let's start
working on the internet board so we have
to import the style file that's coming
from the same directory and now we have
to import the images so that's coming
now we have to import the let's say
button component and that's coming from
the component component index okay
we have to do one more import and we
have to let's say import the nft
and that's coming from the nft detail
so here we have the nft tab which we're
going to use this display in the
description section so the user can
click and they can switch between the
so these are all the external internal
import we have Okay so let's come down
we're going to create a use State we'll
say social initiative defaults we'll
take on one more this will call nft menu
and let's come down and now we can start
working on the GSS okay simply remove
and it will have a class called style
Dot edit with description in that we're
going to have another dividend will have
the class call and pre-description box
and that will have this come in because
I have divided this description section
in two components first component and
the second component okay so let's call
it part one okay here we're going to
take another div it will have a class
called style description box Dash share
in that we're going to have this p and
this we're going to call it virtual and
work world and here we're going to take
another div it will have the style dot
nft description box here box and that
will have the MD Cloud upload icon and
icon okay and it will have an on click
and we'll call the function let's say
social okay so when someone will click
on that cloud option it will all open
the social media icon so user can share
that nft to the different social media
platform okay or they can get the URL of
that nft okay so that's looking fine now
let's come down we're going to have this
Dynamic block we'll have we'll say that
if social is true then we want to
display this div and it will have a
class called style dot description Box
let's remove this icon and let's call it
okay it will have this href and in this
we're going to display the icon social
media icon so first one is Facebook and
replicate it couple more time this will
let's say let's provide this name
Instagram this will become LinkedIn this
will become Twitter and this will become
YouTube let's type the name so Instagram
Twitter and YouTube so these are the
four icons we are displaying social
let's come down we're going to take this
BS icon three Dot and it will have a
class called style nft Box share box
Dash icon and it will have on click
functions and the function we're going
okay so welcome down well I take this
Dynamic block and we'll say nft menu
true then we want to render this stiff
Dev and it will have a class called
style we'll call it style Dot
nft box shared box and we'll call it
let's say social and that we're going to
take the do the same thing we have to
take the icons so this time we're going
to take this icon of let's say dollar
and we have to say change price
simply we do the another one and this
time we'll have that transfer alt and
this will call transfer okay you can
call it transfer token and we'll take
another one it will have that report
problem and this will call report abuse
okay so these are the three icons we
have now we'll select the fourth one and
outline delete Swap and this will call
item okay these are the four icons for
simply close this one close this one and
things are looking pretty good let's
come down we're going to say that we'll
take a div it will have a class called
style dot nft box profile and that we're
going to have this H1 and we'll say
the beer X and we'll give this random
numbers because every nft will have a
name and unique ID and that's what we're
so this is the H1 we'll have another div
it will have a class called style nft
description profile box and that will
have a div it will have a class
description box profile box Dash left in
that we're going to have image we have
to assign the source and we have to take
the image which is inside the image
folder user phone and it will have all
tags will say profile which is going to
be 40 and height is going to be 40 as
and we have to take the style which is
called nft box profile box left image
okay so this is the image class now
Lonesome play come down we'll take
another div it will have a class called
style description and if the description
box and if the description box profile
so left info not MH okay because this
and that will have this small and we'll
and here we'll have a break down below
we'll take another span and this will be
in the name of the Creator let's call it
Carly and it will have the verified
so that's what we have here now simply
we'll take a div it will have a class
called style dot nft description box
and that will have the image and it will
have the source so simply do one thing
come up here and we have to copy this
we need the same property the only thing
we have to change is the image Okay so
hello let's come down and we have to
Dev it will have a class called nft box
we'll call it right info and that will
have this small and we'll say creator
and down below will have a the span and
this will keep the name of the create
okay so colleague so here we're going to
so let's come here change the image to
let's say image number two and
and we go let's come down and
so things are looking pretty good so
this is the profile section we have now
here we're going to take another div it
will have a class called Style
nft description box profile Dash bid
actually let's call it petting let's
we're going to have this paragraph and
then we're going to have this verified
batch and we have to take the span and
in that we're going to say auction
down below we will have another div it
will have a style which call it nft
description box profile bidding and
we'll call it let's say what name should
I know these names are getting very long
but it will save you a lot of time in
future when you will refactoring the
code okay that's why I'm giving this
huge name so you can easily identify
that which part of the component we are
working on let's come down and that
we're going to have a tip it will have a
class calls and if the description box
box timer Dash the items okay and that
will have this P will display the number
two and we'll have a span and that will
say two days okay so let's come here
simply copy and paste and change this to
22 and this will come our closest one
copy and paste and this will become
let's say 24 20 45 and this will become
cup paste and this will become let's say
22 and this will become second okay so
are we going to display the timing
of the nft okay Lesson 12 so these are
okay things are looking good nah
we're going to take another dip it will
have a class called style Dot nft box
a price and in that we're going to have
a we'll have a div it will have a class
called style dot nft box profile bidding
and let's call it bed okay and that
we're going to have the I have the price
current bed and down below we'll have
the speed tag and then that will display
the price of the nft with this span this
will contain the converted price okay so
let's do one thing so let's come back to
the applications original application
so that's the price and remove this
extra packet from here okay remove this
so that's the price we have now let's
we'll take a span and this will contain
the stocks that how many stocks are left
so same thing copy and paste here
so this is the price and the stock we
have for this identity now we can come
down we're going to have another divid
we'll have the class called style nft
box disc description box profile Dash
button okay so this will have the button
and we'll call the bottom component we
already have that and here you can see
everything is working fine we haven't
provided the name on the button okay
things are looking good and here you
this button has an icon okay these two
buttons have icon but other buttons
don't have the icon so we have to do the
modification in our button component
so let's send the props so the first
props we're going to send the icons so
let's send the icon okay because we want
to use the icon as well in the button so
we're going to send this prop and we're
going to send the name of the button
let's call it better name and the button
name is going to be called place a bit
and it will also have a let's say
for the time being it's an empty
function and now we have to send this
custom CSS class we'll call it class
style and in that we're going to call
this style dot button okay so these are
the problems we are sending in the
button component and now we have to do
the little bit modification in the
button okay so let's come here
copy that and go to this button
click on that and here we're going to
receive those two props so first thing
is going to be the we are already
receiving true props in the button
component first one is the name and the
function and now we have to import two
more so this one is going to be the icon
and let's come back here and what we
have called it classes style simply copy
and that's what we're going to pass it
here okay so this is going to be the
custom class styling for the button okay
and that's what we're going to use is
simply copy that and simply paste it
paste here okay so in this way if we
send the props if we send the icons in
the button component as a props then
only the button will display with an
icon otherwise it will display only the
so here we have the icons and here we
can provide a space so let's type NP
HTML Space Tag and we have space
let's copy that class list and here
we're going to provide okay
so here we convert this into a
Dynamic okay and we'll take this dollar
and wrap this in the bracket and this is
how you can pass multiple classes if you
in a single div or a single component
this is how you can do it okay
so now we're going to take this and that
we're going to pass the class okay so
that's the only setup we have to do in
the button component and if we come back
to here we can see that we can easily
able to see the button display and we're
okay but if we come here and here we can
see that we have some problem in our
burden structure we have because we have
used that extra space HTML space time
okay so that's the thing we have to fix
I don't want to have that access space
so let's come here and simply remove
this one I don't need it I'm going to
with this custom CS class okay so
looking good now we can see it's normal
and this one is also looking good we're
going to provide some space in that not
a big deal we need two more buttons okay
replicate that and we're going to change
the name so make offer and we have to
change the icon so this will become the
percentage icon okay so that's the
problems we are sending now let's come
down we'll have a div it will have a
description box and profile bidding Dash
box let's call it and that we're going
to take the buttons and it will have our
own click functions and the function we
want to call it is let's say open Tab
bid history so all the bidding history
we're going to display and simply do one
in this we're going to pass this e so we
can easily able to receive that text and
on the base of that we're going to open
it we which we are already following in
and simply replicate three time and
we'll have to change the text and this
will become let's say provenance
and this will become honor so if I'm
making any spelling mistake please
forgive me for that because I'm really
so let's keep working on it so here we
have all the buttons now here we're
going to take this Dynamic okay so here
we're going to have the dynamic State
we'll say if history is true then we
and it will have a class called style
dot nft description box profile Dash
bidding box card okay in that we're
going to display the tab component okay
so nft tab so that's what we have and in
that we're going to send this data
okay data as a prop simply replicate
that and we have to change this to
provenance but what I have no I have
noticed one thing that we haven't
so what we can do so what we can do
let's come up here and let's create
so we're going to create that first will
and this will become true initially
the second one is going to be let's say
provenance and it's false and third one
is going to be the honor and it's false
so these are the three states we are
and now we have to take the data so data
for the each of the components so first
is history array and in that we're going
to just take the images of the users so
replicate it couple time and change this
and do the same thing for other
components replicate three two times so
all together we want to have three
okay arrays and let's change this to
array and we have to just simply change
so we can easily display discipline user
so looking fine now let's change this to
and then we have to change this as well
so make it a this will become two this
will become 6 and that's it okay so
these are the three arrays we have for
each of these tabs simply copy that
and that's what we have to pass as a
prop so let's open it and send it as it
props now here we're going to say
provenance and here we have to pass the
province array simply replicate it one
more time and this will become let's say
honorary and this will become honor
array okay so these are the problems we
are sending it's looking fine with
things I think we are done with that the
here we have couple of functions that
function we have to create and what I
have noticed that I've made a pro
mistakes okay so simply close this one
and okay this is the first component we
have here and this is the second
component but why we have one more
component we want to have two component
so something's problem I have so cut
this one and simply bring all the way
down to here and paste it okay
that's the thing we have to do simply
cut it from there and now you can easily
able to wrap the entire nft description
in the same company okay simply close it
and here you can see these are the two
components we have things are looking
fine everything is working fine now
let's start creating the functions okay
so let's bring this down and we'll call
it open social and it's going to be an
social is false then we want to set it
and we set the other social menu lists
false else we want to make it false okay
simply remove that and bring it down we
have to take another one open menu
if menu is false then we have to set it
true and set social false else we have
to set menu false okay so this is the
second function we have now let's bring
and let's come down here in the profile
and simply open that we have to create
simply copy here and come up here we'll
open Tab and we have to receive e it's
going to be an error function and we
have to take that button text so when
someone will click on the button we want
to get that button text and on the base
of that we're going to open and display
the that tab okay so it's going to be e
dot Target dot inner HTML in a text
sorry and we'll say if button text is
equal to what we have here so it equal
let's scroll down it's history bed
copy that and paste your instrument then
we want to set the history to true and
set other component to false so false
button text equal to what is that
provenance so copy and paste it and then
we have to Simply copy that and we want
this true and this become false come
here this is the two function we have
now let's create the final function and
this will call so we have to change this
honor okay and we can remove that e or
you can keep it okay so I'll remove that
e okay now let's come here and we'll say
honor and we're going to say if honor is
false then we want to set it true and
other component is going to be false
okay history and provenance false else
let's say false okay so that's the
okay simply close that and simply copy
and simply paste here so this is the
so here you can see everything is
working fine now let's come up here and
open this one and scroll down and here
now we can start working on the let's
say tab component okay so this is the
component we're going to create now so
we have to receive all the props which
data tab and you're going to import the
image that's coming from react next
image okay and we have to do the
internal import we have to import the
CSS file so this will become let's say
come here and so start working on the
dev okay simply remove that and we'll
take this Dynamic block it will have a
and style actually I haven't received
the style file so let's do that so
import style and that's coming from the
same directory now we can say
nft tabs and then we're going to have
this Dynamic data we're going to Loop
and we want to make it instant return
and then we're going to take this div
and we have to assign this class we'll
call it style nft tab Dash box it will
also have a key I plus one and and then
we're going to take this image and we'll
have the source let's say element and L
tag it will have the profile image we
have to assign the width is going to be
40 and height is going to be let's say
40 it will also have the class called
tab box image okay so these are the
couple of things we are sending to the
image well come down we'll have another
div it will have the class called style
and this will call info and that will
have the span and this will call the
name so we'll call it offer by
the price and the name of the person so
this name is the dynamic one okay so
that's why we are taking inside a span
so this is the data we have now
let's come down here we're going to take
small and will provide the date so June
slash and this is the time okay so this
is the data we are passing here now
I think with this let's convert that
into a span okay so with this I think we
are done everything is looking fine and
we have to receive one more thing we
have to receive the icon because the
honor tab is going to have an icon okay
so that's what we have to receive
and that the item we're going to display
right up here so we'll display the icon
save it and here in the owner we have to
send the props as an icon okay as a prop
so let's send that we'll call it icon
and we want to send that MD verified
so you can see these are the data we are
passing and that's working fine now
let's come up here if we go here here
you can see we have all the data
and something problem we have why two
okay something's wrong let's click on
this tab things are working fine okay
let's come here and let's have a look
everything's working fine okay we're
going to fix this problem later so you
can click and you can switch between
different tabs okay you can see you can
click and you can tap to different
so let's simply close that and now we
can start working on the CSS file okay
so let's come back to the closest one
and close this one and go to this nft
Details page and here we can see that
let's come here in that nft detail page
so we can start working on this detail
page for simply copy that and we can
start working on the CSS okay Target
that so let's make it side by side so
you guys can see what we are working on
so I'm opening in the my not in the
Chrome browser because I was getting
that white blank paper I don't know why
I'm using different browser so now we
can start working and styling this
so let's assign a first width is going
and let's target the box and it will
have the width to 80 percent and margin
0 Auto that will hold the entire content
now we'll say display is going to be
great and great template column 1.2 FR
and 1fr so that's how it will look Gap
let's come down we'll take this media
query and on the mobile device 35 em we
let's say margin block is going to be 2
and box is going to be with is going to
be 90 percent and grid tablet column is
so that's the setup we have to do in the
so things are looking good we can easily
able to open and close all this
let's close this one and go to this
image component okay now we can start
working on the image section okay simply
copy that and let's come back to the CSS
file and now we can Target that so first
thing we have to do is we have to assign
the width is going to be 100 and box is
going to be let's say box nft is going
to be display is going to be grid
display grid and we'll say that empty
box nft image is going to have this
let's say grid column once minus one and
we have to define the row as well so
will come down we'll come to the nft
image image itself we have to say the
will come down we'll Target the nft box
nft like this will be displays going to
align item Center and justify content
grid column 1 minus 1 and grid row is
going to be one slash minus n okay and
sorry uncertainty things is going to be
top and align itself is going to be Flex
start padding is going to be let's say
padding in line is going to be two Ram
so that's how it will look you can see
it's perfectly aligned on top of the
and let's come down we have to Target
this nft box nft like paragraph and
background is probably going to be our
so that's how it will look padding is
going to be 0.2 RAM and what Ram
color is going to be our main BG color
display is going to be Flex align item
Center Gap is going to be 0.5 Ram border
radius 0.2 Ram cursor pointer so that's
look perfect you can easily able to see
the functions are also working
we'll tag the nft box nft like okay
and it's going to be an icon we'll say
font size going to be 1.4 Rams little
bigger nft box let's say nft box and
details will Target that and we also
Target that nft image box Dash
descriptions so um we are targeting the
both the component together and we have
to say display is going to be Flex
and line height is going to be zero
let's assign a background color to our
and it will have the borrow radius 0.5
RAM and padding in line is going to be
one ram in line and margin let's say top
is going to be one ram and cursor
pointer so that's how it will look
perfect here we're going to Target that
and we have to Target that nft
description box and this will have the
1.1 RAM and it will have one ram font
okay let's come down we'll Target the
nft Box details box p and this will have
line height is going to be one font size
this looks pretty cool you can see this
is how it will look on a desktop mode
you can see perfectly aligned
so let's make a normally okay it's too
okay that's how it will look
and this function is also working fine
on a mobile device looks absolutely
let's come back here and let's start
so with this we are done with this
entire image component okay image
component now let's come here and let's
start working on the description section
and now start coming on the CSS file
description CS file and now we can start
working on it we're going to say that
where this is going to be 100 nft box
would be width is going to be 100 and
nft Box share is going to be displayed
it's going to flex a line item Center
and justify content space between
and let's make it 80 so that's how it
let's come down we'll take this media
query and on mobile device it's a 30 em
we'll simply copy that and we'll say
90 with okay so that's how it will look
pretty good now let's come here let's
come here we're going to Target that
description shared box icon we'll say
we'll talk in the Box share box
position is going to be absolute top is
going to be 5 Ram line left is going to
be 65 so you can see our Dynamic block
and let's say width is going to be 40
background color is going to be have the
our main color main BG color
and it will have the block Shadow to our
so save it we'll have the Border radius
0.5 Ram padding is going to be one ram
so here you can see this looks perfect
looking fine now let's come down we'll
social okay a okay anchor individually
first thing we have to do is to display
is going to be Flex align item Center
transition all point three second easy
padding is going to be 0.2 RAM and 0
this looks pretty cool let's come down
we have to Target that box share box
and not icon social a and over effect we
want to have this so background color is
will have the color is going to be let's
say our main color and we'll have this
border radius 0.5 RAM and padding is
going to be 0.2 RAM and 0.5 Ram okay
so let's have a look on a mobile there
you can see on overhead we are getting
the Starling and things are looking
and this is how we look on a mobile
and here we have to do the changes it's
not box Shadow we have to provide the
save it and now on overflow we are
getting this nice I can color over
okay it's not looking good right now but
it's taking shape okay we're gonna make
so let's come down we have to take this
nft box share p and we'll say background
call is going to be icon color is going
to be the main color and padding is
going to be 0.2 RAM and this will become
and what already is going to be two Ram
now let's come down we'll take this box
this will become let's say display is
a line item is going to be Center Gap is
going to be 2 RAM and font size is going
to be 1.3 grams a little bigger
let's come down we'll start the nft Box
profile and H1 is going to be let's say
font size is going to be 0.2 ram 0.3.2
ram okay line height is going to be
you'll Target the nft Box profile box
and this will be displays go to flex
align item center cap is going to be 2
RAM padding bottom is going to be 1.5
okay so we'll have some space from the
bottom you can easily able to switch and
open close working fine now nft profile
display is going to be Flex align item
a line itself is going to be start and
GAP is going to be one ram line head is
let's come down we'll Target that
we'll take the nft box profile
and writes section right info small and
we'll Target the another left
info small together and font size is
going to be let's say not funds font
width is going to be 500 okay
that's what we are targeting
so small tag is working fine and what
else we have to Target okay so change
this to box okay so this is the problem
I have so changes to box and now you can
see the standings are taking place and
simply copy that and replicate it one
more time and here we have to do the
and here we going to make it okay now we
have to Target this profile box left
section image and this is going to be
let's say border radius is going to be
5. 50 you can see we have this nice body
radius and here we're going to make it
to 8 not 500 okay so this is little
the name is little Bolder it's looking
good we have to take this nft box
display is going to be Flex a line item
Center Gap is going to be one ram line
left is going to be one pixel solid wire
and it will have this icon color okay
we'll have the padding left is going to
be 2 RAM let's come down we have to
Target this profile Dash bidding
block is going to be one ram
simply come here copy that and come here
and let's have a look we are assigning
the same class so where is the bedding
and here we have that simply
and changes to 11 okay it's working fine
let's copy that and simply paste it and
we'll Target the P will say display is
going to be Flex align item Center
font size 1.5 Ram Gap is going to be one
we'll Target the Box profile Dash
bidding Dash box I timer will say
display is going to be Flex cap is going
to be 3 RAM that's how it will look
we'll drag the profile betting box timer
and P will say that form size is going
to be 3 RAM line hit is going to be zero
we'll come down we'll Target the profile
bidding box timer item span and font
size is going font width is going to be
little bolder and we'll Target that
profile bidding box timer item
and let's remove that let's call it
price okay so we are pricing Target in
the price section not the timer section
and this will become line head is going
margin top is going to be 4 Ram display
is going to be great and grid tablet
column four FR and 1fr GAP is going to
be 3 RAM and a line item Flex end and
justify content space between okay
double Target the Box profile
let's come down bedding box price and
this will this is the price we have now
let's call it bid and we have to Target
the border is going to be two pixels
solid and we have this icon color we'll
radius going to be 0.5 Ram that's how it
will look we'll come down we'll Target
bidding box profile price bit small and
we'll say let's say font size is going
to be 1.2 RAM and background color is
going to be have icon color and color is
going to be our main color padding is
going to be 0.5 RAM and one ram and
power radius is going to be 0.5 Ram
margin left is going to be 2 RAM so this
looks pretty cool let's come down
and we'll talk with that copy simply and
and Target the p and we'll see padding
is going to be one ram and font size is
going to be 2 RAM and Ford width is
going to be 900 okay so that looks
pretty good pretty big and bold we're
gonna fix it okay so description profile
simply remove that it's a button not a
and margin top is going to be 3 RAM
display is going to flex a line item
Center and GAP is going to be 3 RAM so
that's how it will look the button and
you can see it's looking pretty good on
a desktop okay so we have that virtual
we have the icons we have the name we
and things are looking we can open we
can close so let's looking good so we
have to fix this Dynamic data okay and
this is quite bold we're going to fix
that as well not a big deal and this is
how we look on a mobile device
let's come here we have to Target that
box profile bidding box button and
remove that button we have to call Tab
and top is going to be three RAM and
display is going to flex Gap is going to
be one ram so that's the button how it
will look perfectly working fine
will come down we'll Target the
box tabs button itself and font size is
going to be one ram padding is going to
be one ram and two Ram border is going
to be zero background color to be having
and will have the color itself is going
border area is going to be 2 RAM
cursor pointer and one width is going to
be 600 so that's how the bottom would
we'll Target the nft Box profile bidding
card and we'll see margin top is going
to be 2 RAM and padding is going to be
one ram okay so that's looks pretty
and working fine now we can start
what we have to do let's have a look in
okay let's come in the media query and
we'll we're going to Target that nft box
and we'll share box social and we'll say
left is going to be 35 percent so you
and box profile box and this will become
okay does look pretty fine and remove
this code so now it's looking good okay
it's looking perfect so let's come here
and here we're going to make it 100 okay
so make sure this is the changes you
have to do and now we can scroll down
let's come here and if we go to this
close this one and go to this main one
okay nft detail page modules and here
you can see the width we have assigned
is 100 and 80 percent so the entire
width we are controlling from this CSS
so details or nft Details page main CSS
file now let's come here and we're going
to Target that nft box profile and let's
will Target the right section and we'll
border left is going to be 0 and
bottle padding left is going to be zero
so that will be aligned equally looking
perfect on the mobile device now let's
come down and we have to Target the
and GAP is going to be one ram and good
table column two alpha and one fr
we'll come down we'll Target the
price bet p and we'll say font size is
going to be one ram so this is a little
smaller look good on a mobile device
let's come down we'll Target that
profile bidding box button and
and will have a gap Point 2 RAM okay and
we'll have a description bearing box
tabs button will say that font size
going to be one ram and padding is going
to be 1 and 1.2 Ram so that's looks
perfect you can see the button is
and here in the desktop we have to still
fix a little bit okay this looks fine
so we can like we can click on this
and it's working fine but we have to fix
this okay it's very close to each other
and we have this nice animation
but they are very close to each other
we have to do something about it and
this is the price we have to face okay
so the tabs are working fine we also
have the problem in the tab but starting
now let's come back here change this to
0.5 RAM and 1 Ram okay now let's look
good button we'll take the phone width
is going to be 500 and we'll Target the
button itself and the dynamic class we
are adding in the button and then we're
going to save button size is going to be
one ram and padding is going to be one
ram 1.2 Ram so that's how it will look
perfectly aligned okay the buttons are
and these are the it's also looking good
the only changes they have to do with
and let's see where we have in the text
so let's scroll up here so this is the
price of it and that we are having this
surprisable let's come up here and where
we have here here we have to do the
changes to let's make it one okay one
let's see okay 1.5 is better okay 1.5 is
so 1.5 is look perfect and if we look on
the mobile device it's looking perfectly
aligned everything is working fine open
and close and this is the fix we have to
the price is also looking good
and we can easily able to switch to
let's come up here and so this is the
menu component we have simply copy that
okay this is the component we have come
back to the CSS file and let's have a
look where we are styling this so here
so simply do this to one ram okay
padding save it okay one instrument 0.5
Ram is look good okay this looks perfect
and here we have to make it 0.5 as well
on over effect so make sure you do the
changes in the nft description Box share
in that Paddy is going to be 0.5 RAM and
on over effect we have to also change
that padding to 0.5 Ram so looking
you can see nice or perfect we are
getting but we have to work in this tab
so we have some problem in the tab and
if we come here in the full desktop
modes it's looking beautiful so this is
image component these are the price box
now it's looking good we have this
okay and this is the name this is the
creators this is the auction timing
price section and stock okay auction we
have to change this icon as well okay
let's come back here and go back to this
GSX description jsx and let's see where
so let's come here let's come down and
here I have noticed where we are
displaying the timing here instead of
this MD verified we have to display the
timer MD timer save it and here you can
see we have the timer icon looking
pretty good the pricing the tabs but we
have this tab problem in the tab so okay
so let's cut that and come back to the
let's have a look so here we are
receiving the data not a big deal
let's start styling the tab component
so we'll start the tab and we'll say
let's open that we'll say that
display is going to be flex and let's
align item Center Gap is going to be one
a line height is going to be zero and
padding is going to be one ram and 0.
border bottom is going to be one pixel
solid where and we'll have our shadow
icon color okay so that's will look good
just come down we'll Target the image
and we'll say that border it is 50
persons and we'll Target the Box info
we'll say display is going to be grid
and a line self is going to be Flex
start and line head is going to be 1 and
margin top is going to be 6 pixels so
now we have to Target the info span
itself and font size is going to be not
font side font which is going to be 700
okay we'll Target the small and this
will have margin 0.2 Ram okay so it will
heading now let's close that one and
let's have a look on the full screen and
you can click you can switch to
different tabs but here we have the
problem in the icon okay in the order
so that's the fix we have to do and we
are rendering this two component on the
so let's come back here and let's go to
so here we have to do the changes okay
instead of sending on or array we have
to send the honor okay so that's the
I made a single mistake so honor and if
you save it and come back to the
application and you can see right now we
are displaying only one so you can click
you can switch to different tabs and
it's working fine okay and this is the
that's the small fix we have here so
and the fix we want to do in the tab
component okay so let's come here in the
tab component and here where we are
ready the tab icon so here we have the
icon simply cut this icon and paste
right here okay not outside the span but
inside this fan we have to paste now
save it and here we have the icon
looking perfect okay you can simply
click and this looks pretty cool
and if you click twice it's getting off
and here we have to do the fix on the
honor and here we're going to say that
click and it's looking fine now it's
okay with this I think we are done with
so this looks good and now let's close
this one close this one and come here
and let's have a look final time because
we have built this entire beautiful
component and let's see let's come here
as you can see everything is looking
good this is how it will look when
someone visit us for the very first time
and every details so we have this tab
component we have this nice top rounds
okay things are looking good do we
having any overflow okay it's very close
this is also working fine and our media
okay we are having a little bit overflow
okay not a big deal we could have fixed
that later okay because we are almost
when we do the final touch-up at the end
that that time we're going to do this
so you can see our media code is also
working fine we can easily able to
make it more responsive looking pretty
good now you know on a desktop you can
so we this is the category section we
have let's come back to them
in this video we're going to build the
user account page okay so I have opened
the project in the code editor make sure
you do that follow the internal
convention we have to create the page so
we'll call it let's say account
and let's type rafce close that and we
have to create the CSS file
simply we have to import the CSS file
internal import and that's coming from
the style folder okay style slash
account okay so close that one now let's
click on the main directory and we have
and this folder is for the account so
inside that will create another folder
this will call form okay and we have to
create the jss file for this form and we
have to create the CSS file for this as
nothing new following General convention
okay now let's type our AFC and now we
and that's coming from the same
okay let's close that close that one and
close this one as well and now we can
come to the pages and go to the account
page and let's start working on this so
first thing we have to do is to import
the use State coming from react and use
memo use callback and we have to use
and we have to import the image and we
and and that's coming from and I
remember that we haven't installed the
Drop Zone okay this will allow us to
drop the images okay so we're going to
use this package let's open up the
let's split the terminal and and let's
come here here I'm on the so here I'm on
the NVM so react dropzone.org and this
is the package we are using for dropping
the images so make sure you install this
packet simply copy that and come back to
this will take a little bit of time and
here we have installed the packages now
simply clear Terminals and here we go to
import that so let's call it react Drop
Zone let's come here we have to import
all the images so we have inside the
image folder now we have to import the
let's say form component and that's
account page.form component okay so in
this page we need only one component
that's why I haven't not I have not
created the extra file that's like
component index file for the account
page okay so I'm directly importing that
form here so that's the form component
we have and that's the internal external
now let's come here and let's bring this
down we have to take this use State and
this will call file URL so when someone
will upload the images that's the data
we want to store in this okay file URL
and initially has been now and we have
to remove that and we're going to do the
intervention and inside that we're going
to have a div it will have a class
called style dot let's say account and
that will have a div it will have a call
a style account Dash info and that we're
going to have this H1 and we'll say
profile setting remove that comma and
come down we have to take this come back
to the original application and we have
to copy this text okay simply remove
that go to this account page and
you can see copy that and come back and
paragraph now we can come down here
we'll take a divot we'll have a class
called style dot account dashbox and
that will have a div it will call class
style account box image and that will
have the image so we'll have the image
so before we take the image we have to
and down below will have the image so we
have to provide the source image and
we'll say let's say user one it will
have the all tags as well so account
upload will have the weather is going to
be 150 height is going to be 150 and we
have to assign the class as well so
style dot let's call it account box
so that's the images we have now
here we're going to take a P tag and
it will have a class called style dot
account box image para now we have to
take a div it will have a class called
style dot account box form and that
we're going to render this form
so that's the entire j6 for this
account.js file page okay simply come
here and visit the application and right
now you can see this is how it will look
okay profiles data and let's come here
and close this one and go to this
component okay and in that we have to do
the changes in the navigation on the URL
okay so you can click on this go to this
discover menu and here we're going to do
the changes so we need to only add this
account remove this one setting okay
and click on this discovery go to the
collections click on this collection
and here we are in the collection button
now we can click on this account setting
and you can see it's working fine
okay things are looking good now let's
come back close this one and we can
simply come here and go to this let's
come here and go to this account page
and form section and now we can start
now we have to import couple of things
so first thing we need to have the icon
so outline mail that's coming from react
out icons MD outline HTTP and that's
coming from icon MD and we have to
we have to import that TI social
Facebook and that's coming from react
icon TI and we need to import one more
linked Instagram sorry and we have to
import the button component and that's
component component index okay so that's
the internal external import we have now
simply remove that we'll take a div and
we'll have a class called style dot form
and that we will have the David will
Dash box and that will have a form
itself we'll remove that okay for the
timing and that we're going to have a
div it will have a class called let's
let's say dot form box input and that
will have this label and we'll call it
name and it will call the user name okay
down below we'll have this input and
type is going to be text place today is
and it will have a class called Style
now we'll come down we'll have another
div it will have a class called Style
form box input and that will have the
label we'll call it LM email sorry and
here we're going to take the dev it will
box input box and that we're going to
have this div it will have a class
called style dot form box input box icon
and that will have the icon so let's
have the icon to outline mail
and here you don't believe you're going
to take the input tag and placeholder is
going to be let's say email okay
so that's the second import box closest
one close this one now let's come down
will take a another device will have a
class called style dos form box import
and we'll have the label to descriptions
and description and down below we're
going to have this text area
and initially rho is going to be let's
and we'll have the place list
placeholder will say something type
something about yourself in few words
so that's the text area now simply come
down we'll have a debit will have a
form box input and that will have the
label will say website and down below
will have a Dev it will have a class
okay and in that we would have another
they will have the class called let's
phone box icon and will have the icon
itself and that down below we're going
to take the import tag and let's remove
that input and we'll say placeholder is
going to be let's say website website
come here and we will take another day
we'll have a class called style dot form
box input social down below will have
another device we'll have the class
called style and then we're going to
take this label and we'll call it let's
say Facebook and here we have to type
down below will take a div it will have
a class called style docs box input
and and that will have the icon so we'll
and here we're going to take the import
text and placeholder is going to be
we'll give this demo data so it should
be let's say Schwab High okay
simply close this one and copy and
replicate it three times and here we
have to change this to Twitter and this
and this I can become Twitter close this
one and we have to replicate one more
time this will become let's say
and this will become Instagram okay so
these are the three social media I URLs
okay we're going to take from here come
have a debit will have a class called
style dot form box input in that we're
going to have the label and we'll call
and that will have a div it will have a
box input box and that will have another
div it will have the class of the icon
I can in that we're going to have the
icon so the icon we want to display here
is outline HTTP and we're going to come
out of the div and we're going to have
this input and placeholder is going to
be let's say our vault address so okay
that's how it will look copy so this is
the placeholder I'm giving random
okay so that's the address we have here
let's come down we'll have another div
it will have a class called Style
box icon and in that we're going to have
so let's come down we'll have a divided
we'll have a class called Style
box button and in that we're going to
have the button so we have the button
component so remove that button
and and then we have to send the props
so we'll call it let's say upload
and it will have Arnold click functions
and it will also have a class so custom
class we have providing okay button
class okay this looks pretty cool so
with this we are done with this entire
j6 let's have a look so close all this
so all together we have one two three
so we are done with this and now here we
now we have to use this Drop Zone okay
because we are not using that let's use
the Drop Zone and let's write the
what we can do let's come here and we'll
take a cons we'll call it on drop we'll
take this use callback and then it's
going to be async function because when
where this is going to be an async
function okay so we'll type it expect
okay and we have to call this function
and we want to set the URL to the accept
and with this empty array okay so that's
the function now we'll come down and we
have to import couple of things from
drop zone so this is going to be a get
props and if you want to know more about
this Drop Zone package you can easily
and you can know everything that how you
can utilize this there is a lot of
property which you can explore and
that's always a good idea to know that
how this work okay so you can read more
about it so this is the one props we
have we have to get this input props and
that's coming from use drop zone so we
have to give this and we have to call
the function and that we're going to
so what are the the first object is
and we have to provide the size except
file so we what are the files we want to
accept so we want to accept all the
images okay so we'll say image slash
this star okay and we have to define the
size so what size so this is the number
we want to take so this is the standard
most of the time you will find in the
the high scale application so that's the
standard digit I'm using here so that's
the props we have here now we can simply
copy this and props copy this props and
let's come down here and we're going to
call on the dev okay so in this div
we're going to call that prop so take
this Dynamic block and that we're going
to call the props okay so that's how we
have to call the prop and now let's come
keep that and we have to call this on
the input because it's input prompt okay
so things are looking pretty good and if
we come back to the application and here
you can see if they click on this we can
our image uploading folder okay so from
your directory you can easily able to
save the image okay you can click and
you can open okay you can click
and you can open okay it's working fine
now let's come back here so we are done
with this entire j6 and all the
so things are looking pretty cool
okay and you will see the real magic
when we'll connect our smart contract
and create the nft and when we'll get
the data from the ipfs because one when
someone will upload the data first what
we will do we'll go to upload that image
or in the entire data to the ipfs and
from there we go to fetch it and store
into the smart contract as well as as
okay so you will see the real magic when
we're going to display this entire
Dynamic data from the smart contract
okay so that's looking absolutely
no problems we have here close this one
and now we can start working on the CSS
file so let's come back to the account
model CSS and make it side by side and
with is going to be 100 percent
margin block is going to be 6 Ram
account info is going to bid is going to
border bottom is going to be one pixel
we have the shadow dark color
we'll tackle the account info H1 and
font size is already before RAM and line
account p is going to be let's say font
size is going to be 1.3 RAM and width is
going to be 80 percent or not desktop
mode and line it is going to be 1.2 RAM
and padding is going to be bottom 0.5
Ram so that's how it will look
let's target the account box and we'll
see if it's going to be 50 percent
display is going to be great and
grid template column 1fr and 5fr and
margin top is going to be three Ram
a line item Flex start so that's how it
margin top is going to be too Ram cursor
positions relative and text align Center
count box image image border is going to
be five percent body fifty percent
image para this will become font size is
going to be let's say 700 Boulder and
phones with this font size font width is
going to be 700 and full size is going
to be 1.2 Ram line height is going to be
and that's how it will look you can see
we'll take the media query and we'll say
Max width is going to be 35 am
and that we're going to Target that info
will say where is going to be 90 percent
we'll Target the account box with is
going to be let's say 90 percent great
template column 1fr that's how it will
okay it's looking pretty decent
and let's come here and we have to take
H1 we'll say font size is going to be
okay we'll take go to this font H1 let's
make it two okay let's look cool and
we'll Target the font information P
because I get the font is size is going
let's make it 100 okay width is going to
and let's make it 90 that looks good
in the here in the para and here we have
to make it to let's say copy that and
here we have to make it to 100 okay so
that's looks pretty cool on a mobile
pretty cool so things are looking good
on mobile device you can see it's
and that's how it will look on our
tablet we're going to fix it and make it
more responsive okay that's how we look
I can see the beauty I hope you guys can
see the the beauty I can see okay it's
what we can do we are done with this
come back to the form and get start
styling this one so let's copy this what
now let's come here we have to Target
let's say that is going to be 100
box is going to be let's say input
and margin top is going to be 2 RAM
and fog form box input label is going to
be display is going to be block width is
left is going to be one ram and one
width is going to be 700 font size is
going to be 1.3 Ram that looks pretty
good now let's target the input username
which is going to be 100 percent
border one pixel solidware and will have
our icon color padding is going to be
border radius one ram background color
transparent margin top 0.5 RAM and
outline is going to be none
save it and that's how you can see it's
looked beautiful we haven't getting that
looking beautiful let's come down we
have to Target the fog box input
placeholder and font size 1.2 Ram color
let's say icon color we'll tag in the
form box input box and with is going to
be let's say 100 percent border one
pixel solid where and we have our eigen
border radius is going to be one ram a
line item Center and GAP is going to be
let's say overflow hidden so that's
looks pretty good you can see all the
inputs looks nice having this nice
border it will Target the Box icon and
font size is going to be to RAM and
background colors to be the icon color
and padding is going to be 0.5 RAM and
color itself is going to be our main BG
color okay this looks pretty good but we
have some issues so display is going to
be great and cursor is going to be a
pointer okay we have some issue in the
icon we're going to fix that okay
let's work on this icon well come down
we're going to Target that box input
itself and we'll say this is going to be
um border 0 and background color is
going to be transparent and outline is
going to be done so that looks pretty
awesome you can see that and we'll
simply come down we'll Target the
let's say form input text area and this
is going to be 100 and Border column
background call is transparent outline
is going to be none and Bot is radius
only one ram padding is going to be one
ram so that's looks pretty awesome
okay let's come up here and here we need
to provide that let's say where it is
here here we have to pry the display is
going to be Flex okay now you can see
it's look perfect so I forgot to add
this display flex and here let's see
because you have this nice form Style
we can come down we target the form box
let's say grid um display is going to be
great and great template column repeat
three one FR and we'll have a gap of one
ram so that's how it will look
on an extra we have this three in a row
and we have this font box BTN and magic
is going to be 4 RAM and 0 Ram
and we'll take this custom slide button
and we'll Target that button is going to
be 100 width and display is going to be
Flex justify content Center and font
size is going to be 1.5 frames so this
looks pretty awesome you can see click
on a full screen and here you can see
this looks absolutely stunning
so it's on media create this art will
look we're going to fix it but this is
how it will look on desktop on a full
screen this is how it will look
perfectly designed we have to fix this
and this looks really good you can see
we have to fix on this breakpoint
so let's come here add the media query
Target the max width is going to be 35.
35 am and we're gonna Target this social
first and we'll say grid template column
it's 1fr on a mobile device so that's
let's make it and this looks pretty good
and that's or not how do we look in a
here and that's what we look on a big
we'll take the second breakpoint and
this will be Min is going to be 425 25
pixels and the max is going to be let's
Texas okay we're going to Target that
and we'll say one FR two FR one F or 1fr
let's come back here go to the CSS file
come here and we all we have to do is
simply grab this CSS file okay says this
one copy this and come put this account
one and paste it and here we have to
move the changes simply copy this entire
and now it looks perfect you can see now
both on tablet and a bigger screen okay
okay this looks pretty good and the only
changes we have to do is this in search
bit and this one is also okay fine you
can see you can click and you can open
it and that's the fix we have to do a
so here we are and on the account page
on the current page so this is the
profile it's fine let's scroll down and
here we have that account box image para
so that's the class where it is and here
we have that let's make it one ram
and let's see if it now looks perfect
and that's how it will look on a full
that's the profile setting we have click
and click and open you can type the
emails descriptions websites Facebook
Twitter and the address and upload
things are looking beautiful and
beginning is able to navigate to
and we have that search page
it's looking fine we have this alter
and this is the details page it's also
looking good which you had built in the
and this is the account page okay that's
what we have built here this looks
pretty good and awesome you can click
and this looks pretty good all the
things are looking fine let's have a
so here in my code actor let's click on
this page and we have to create the page
nft.js and we'll type rafce simply close
this one come here and we have to create
the CSS file for this so upload nft
modules dot CSS here we have the CSS
file now we have to create one folder in
the main directory okay in that we're
going to keep all the component for this
nft upload okay so we'll create a folder
and we'll call it upload nft
and that we're going to create one more
folder and this will call Drop Zone okay
drop zone and in that we're going to
create the file dropzone.jsx and we have
to create the CSS file for this as well
so let's create that drop down
module.css so this is the one component
we have some play let's do the internal
import our CSS file and that's coming
from the same directory so here we have
the Drop Zone and we have to create one
more component so let's come here and
that's we're going to do in the upload
nft okay so we'll click on that and
we'll create a new folder and this will
let's call it actually we're not going
to create a folder it's a component
itself so we'll create in the same
so we'll create this file upload
nft.jsx and in that we're going to
create the CSS file for this as well
modules.css let's type rafce
and we have to do the internal input we
have to import the CSS file and that's
coming from the same directory
so where we have this as well let's
close all this and simply close this
folder and close this drop zone as well
and what we have to do is come back to
these pages and here you can see we have
to Simply replace this select this on
change this to upload nft and make sure
you have to type in a lower case because
the component we're going to import here
that we're going to be in uppercase but
it will have the same name okay
so that's let's do the internal Port we
same style folder and we have this CSS
file now let's come here and let's click
on this and now we have to create a file
in that we're going to import all this
component okay so let's create that file
so we'll call it upload nft index.js and
in that we're going to import the
components so we import the Drop Zone
and that's coming from the same
and we have to import the let's say
and that's in the main directory root
folder okay and now we have to Simply
export that both the component
so we can use them in in our upload nft
so let's close that one and we can come
here and we can upload that so we'll
upload the upload nft and that's coming
from the let's say dot dot slash
upload slash upload index okay so here
we have the upload component upload
component we have now simply remove that
and let's start working on the jsx okay
so first thing we're going to do is to
take the div and it will have a class
call style dot upload nft and that we're
going to have another div it will have a
class called style upload Dash box and
that will have another div it will have
a class called style upload box
Dash heading okay and that we're going
to take this H1 and it will have the
heading Creator create new nft
and down below we'll have a P tag and
let's come back to the application and
simply copy this text and paste it okay
so this is the paragraph we have now
let's come down come down and we'll have
another div it will have a class called
in that we're going to take this H2 and
we'll have this H2 heading simply copy
this one and paste here we have to take
the paragraph as well copy and simply
come back and paste so that's the second
now what we can do let's simply come
down and we have to take another div it
will have a class called style Dot
box and this will call form so this will
hold the forms okay so in that what we
have to do is we're going to call this
upload nft component okay so this is the
component we're going to call in that
so here we have to call it in uppercase
because we are importing and exporting
an uppercase so make sure you do this
change and simply copy and do it here
and if we come here and have a look is
in uppercase yes it says number case so
come back here and simply change that
okay so that's the so that's the upload
nft that's what we have here now let's
simply open up your terminal and start
the application to have a looks type npm
run Dev and just wait and bring this
let's come here and before we do that
before we check let's come back to this
component and we have to change the
router so go back to the navigation okay
nav bar where it is there are so many
folder okay that's why it's very
important that you have a better folder
structure when you're working in a
application like this okay so right now
we have this full navigation folder so
it becomes very easy to Navigate Okay so
simply open the folder and we have to go
into the Discover section and here we
have that so here we have this upload
nft so the name is right okay
and that's the name we have given to the
pages okay so close this one and look
have a look this is what we have called
upload nft okay simply rename this okay
save it and that's looking good
now simply close this one and now come
back to the application and here we have
that click on this and click on this
and here we are on upload nft page you
can see all the data we have passed
that's here so we have the title we have
the second titles and the paragraph so
everything's working fine now let's come
back to the code and simply scroll down
scroll down and let's close this one and
upload component click close this one
and close this entire component and here
we have to come upload nft and now we
can start working on this okay
let's we have to import couple of things
from react use State and we have to
import the icons outline HTTP and that's
coming from react icon MD and we have to
import one more outline attach file we
have to import one more fa percentage
and that's coming from react fa we have
safety and that's coming from the AI
okay now we have to import the let's say
and that's coming from TI and now we
have to import the image tags from
next.js okay so these are the icons we
have here let's let's come here and here
you can see in the account we have this
form and that's the form we're going to
use here in this command Okay so we're
going to use the CSS file we're going to
import the CSS file and we're going to
some copy and paste some of the
components some of the input component
so that's the thing we're going to
import here okay so let's close this one
and we have to import those from CS
style okay so this is the name I have
given to the form style okay form Style
and this is style is for the nft okay we
don't get confused so that's coming from
the account form modules yes okay so
that's the external internal import we
have now we have to import the images
all the images and that's coming from
the image folder okay we have to import
the let's say button component and
that's coming from the let's say
component okay in the component section
we are getting from component index okay
and here we have to import the Drop Zone
and that's coming from the Drop Zone nft
index folder okay so that's what all the
external internal import we have here
and now we can start working on the
actual j6 bar but before we do that we
have to take a use State and this will
call Active initial would be zero and
where this will become active name
String and this will become website this
this will become royalties this will
become let's say file size and this will
becomes let's say category okay so these
are the internal external and new state
we have here okay so everything is
looking fine and we have to take one
more category array because we have to
Loop over it all together I want to
display five category okay so let's have
a data for that so we'll take an array
and it will have this object so we'll
have the image and we'll have the name
so let's do one thing simply images we
have to get the image nft one and we'll
call it category let's say sports okay
right now I'm going with this hardcode
value but later when we'll get the data
and when we actually Define that what
are the data what are the categories of
nft will allow user to upload on that
time we're going to do this modification
but right now I'm just going with this
hardcode value okay and that's what we
have here now let's simply replicate it
and change this to Art change this to
and this will become digital and this
will become two and this will come time
let's repeat one more time and this will
become photography okay these three
images so all the data we have so simply
close this one and let's come down and
here now we can start working on the jsx
part actually okay so let's Zoom a bit
let's we have a div and it will have a
class called style Dot upload okay and
that will have a this drop zone and in
this we're going to send all the props
so that's props we have here first props
will send the title okay so the title we
call it is something like what are the
file will accept from the user to upload
in our application so the file format we
have to Define so jpg PNG we will go
with this W ebm and Max width is going
to be 100 MB okay so that's the first
title we have now we have to let's take
a heading and this will have drag and
drop file will have a subheading as well
and this will call let's say the reason
why I'm using this drop zone as a
reusable component because we can use it
in multiple places or you can do this
value hardcode but I don't want to go
with any hard code value I want to make
the component as reusable as possible so
we can use in different application or
so we'll have a subheading uh we'll call
media on your device okay these are the
title components subtitles and now we
have to send the actual data first we'll
send the name of the nft we'll send the
website URL then we have to send the
descriptions of the nft then we have to
send the royalties and royalties we have
and let's have the final thing is the
so we'll have this upload image so these
are the props we are sending in the drop
so let's come down we'll have a Dev and
we'll have a style tag and we'll call it
upload box in that we won't do is we're
going to use that form component okay so
we'll come here and we'll go to this our
account page and we'll go to this form
okay here we are in the form j6 and now
we're going to import couple of things
from here so we're going to Simply copy
and paste so let's open this one and
this one is a username so we need this
one simply copy and come back to this
so that's the One Import we have and
what we have to do is simply we have to
change this name to let's say
and we have to call it let's say nft
okay this is the first thing we have and
it will have a on change function
because when someone will type anything
we want to get the data and update into
our state variable okay so it will have
item name and in that we're going to use
this e dot Target in that we're going to
pass the value okay so here we have to
take the E okay so when someone will
click on type anything in the input we
can easily able to update that and name
so that's the input we have now let's
close this one and come back once again
to the form and this time we are looking
for let's say open this one last time we
are looking for the website okay simply
copy this one and come back here and
simply paste down below and here what
we're going to do is simply open this
one and simply copy this and simply
and the same thing we have to pass the
data so that's the website components
simply close this one and close this one
close this one now come down and in this
and this website will have a p okay so
and down below we'll have another class
and here it will have a upload box input
para okay so we'll come down to the
applications and this is the text we
want to Simply copy and simply paste
here okay so that's the paragraph We
that's looking good now let's come down
let's come back to the forms once more
time and here we're going to need the
descriptions okay come back and simply
paste it okay so this is the description
so this is the website section we have
um simply cut this one okay
simply cut this one and wrap this here
what we have to do is simply cut this
portion and bring all the way down okay
so it's looking perfect so make sure you
so things are looking good now
down below will have a P tag and we're
going to display the text so simply copy
so that's what we have here now let's
and here we're going to take a div and
we'll take a style tag we'll call form
style because this time we are going to
use that form okay form style okay
so it will say form and the name is Dash
and copy that and we have to change all
the field we have copy and paste here
with this form okay so that's the one we
have simply copy this and change this
and now we have to change this style
that's what we have and simply come here
and replace this one as well so whatever
we have imported from the form component
make sure we have to replace that with
this form style okay and that's the name
we have given on top when we have
here we have to do the changes
so that's the form one this is the form
and this is also a form change this one
and let's see where else we have no this
is not one and that's what we have and
this is what we have so simply bring
we'll take a label and we'll call it
let's say name and that we're going to
message so choose collection okay well
come down in that we're going to have
the para it will have a class called
dot upload box into paragraph and here
we're going to copy the text copy and
so that's what we have so you can easily
able to find the difference when we are
importing the component from the form
component we are applying The Styling
from the form style okay but when we are
writing any custom jsx we are using this
and we are giving the different relevant
name okay so that will make the
difference okay so make sure you follow
the same pattern so that's what we have
come down we'll have the div and
it will have a class called style dot
and in that we're going to have this
Dynamic data we'll call category array
we have the data and we go to map over
it and it's going to be an insert return
and in that we're going to have a div
and let's say it will have a class
it's going to be a template literal okay
we're going to have two type of styling
one is the normal styling and the other
one is going to be active styling so
when someone will select that particular
category we want to display different
styling or we want to change the
background color simply okay that's why
we're going with this Dynamic styling so
let's call it upload box slider
we have already taken this active State
you state and we'll say I plus 1 is this
then we have to add this active class
otherwise it's going to be an empty and
make sure you copy and simply paste here
so now looking fine so this is the
normal and this is the active one okay
so save it and let's come down we have
to assign a key as well so I plus 1 and
it will have the on click function so on
the on click function we want to First
do something okay we're going to set the
we want to call this function as well so
set category okay that's the data if you
want to update so we'll say e Dot
category okay and that we have the
and let's bring down and we have to take
a class and and we'll call let's say
upload box slider dashbox and in that we
go into let's say have another divided
we'll have a class called style upload
box Dash image and that we're going to
have the image so we'll have an image
inside this image dot not that LM
element Dot image okay so we have to
provide the alt tags so background image
we have to assign the width to 70 height
is going to be 70 and we have to assign
a class as well so upload box slider box
image image so that's what we're going
so that's the data we have okay now
let's come down and we'll have another
div it will have a class called style
Dash image and this will call icon and
that we're going to have the stick icon
okay so that's the icon we have down
below we're going to take this paragraph
and here we're going to call it okay
crypto Legend and let's come here simply
copy the text from here and copy and
so that's looking perfect okay this is
the dynamic block we have now we can
come down and before we come let's come
here in the form section and we need
couple of things from here so this is
simply close this one and copy this
entire box that's the one we need form
box input social copy and come here and
we're going to paste right down here
okay that's all the comment we need and
simply open this and now we have to do
the changes couple of changes we have to
do so simply change this royalty and
simply copy and paste and here we have
to change the icon to fa percentage
and this will become let's say 20
percent and it will also have an on
click function so we'll say set
royalty let's come here what we have
called here we have called here set
royalties so let's come down and here
we're going to pass that okay e dot
okay and then that we have to pass the C
now let's come down to with the same
with the Twitter we'll say size and we
have to change this to let's say set
and this is going to be let's say 165 MB
and here we're going to this say the
properties and paste your properties and
this is also going to be let's say hmm
simply copy that and paste the
properties as well and it will also have
this on chain simply paste here and we
have to change this to set properties
okay so we don't have let's come up here
and we have to create another use state
so that's what we're going to do now so
let's come here we'll take a another you
state and use State and this will call
properties initiative BMT string simply
copy and bring it down and now we have
so things are looking good okay
things are fine now close this one
okay this one this one things are
let's come down we're going to have
another it will have a class called
dot upload box button and that we're
going to have this button okay and then
we have to send this prop so the name of
the button is going to be upload and we
have to have this hand little click
function and it will have this customs
class style and thus we'll call it style
button sorry upload box button style
so that's the button we have and
that's all the component we have so
things are looking good let's have a
and we're missing something I guess so
simply that's what we have to pass here
in the description as well so simply
paste here and we have to change this to
copy that one and here we have this
twice okay so we have to call this set
so now we have updating all the you
state and here is the property we have
okay simply copy that and we have to
so somebody bring it down and we have to
so here you can see here we are getting
an error and that's obviously because we
are you are trying to import the Twitter
icon but we don't have it reload the
browser and you will find that this
true okay simply come down and here we
go into some play what we have to do is
here we have to remove this icon okay
Twitter icon and simply copy this file
size and simply come back to the Twitter
and change this tag now we have to
reload what else we have again we have
this error Instagrams come up here and
simply copy this one and bring all the
chain this one okay so that's
what we have so far and here you can see
so here we have the function problem
okay I that was my problem we have to
wrap that component so here we have to
do is simply remove this one and we have
to write this on click function it's
going to be a narrow function so
and we'll wrap this function and we'll
call it now okay set active I plus 1 and
we have to call the second function is
category element so when we want to call
function in one click event then this is
how you have to call it you have to wrap
that both the function in a bracket like
this then you can easily be able to add
as many function as you want okay so
make sure you do that and save it
if you come back to the browser and you
can see everything is working fine we
have this already styled description
website and items okay it's already
styled and here we have the collections
we are rendering and this is the
okay this is a small fix we have to do
so things are looking good now let's
simply these are the Imports we have
these are the use States simply close
this one and close this one close this
and close this close this one close this
one and close this one so these are the
components we have worked on now simply
close this one and come back here and
this Drop Zone and now we can start
working on this Drop Zone okay now we
have to Simply receive the props which
we have set so let's open this one and
imported one by one so title heading
submitting sorry and then we have the
and the final one is the image okay so
these are the all props we are receiving
in the drop zone working fine now we can
now we have to import couple of things
from react use State and we need use
memo use callback and use context and
now we have to import the let's say use
Drop Zone package we have to import the
image from next.js we have to do a
couple of internal Imports first is the
so that's coming from the image folder
now these are the external internal
now let's come down and now we're going
to take couple of States so first it
uh file URL and initially would be null
so that's the no and we can come down we
can have this on Drop Zone we have to
create one function on drop this is not
new we have already created this
function in the account page okay so
I'll go a little bit faster so we'll
have this use callback and it's going to
okay and it will receive the file so
and gonna be an error function will say
set URL to accept it file zero so so the
first file and down below will have this
we have to import couple of things from
the drop zone so the first one is going
get root props and that's coming from
the use drop zone and that we have to
send a couple of properties so the first
property is going to be the function we
have created on top on drop and here we
have to define the file size that what
are the files we want to accept so we
want all type of image and we want to
define a specific size size of the file
so the maximum is going to be this is
one five and six zero okay and we have
to import one more is going to be a get
input props and here I made a spelling
mistake simply remove this R to T so
these are the two props we are getting
from use Drop Zone okay so that's the
function simple function we have here
and now we can start actually working on
our jsx so simply remove this one and
we're going to take this div it will
have a class called style and drop zone
and that will have another dividend will
have a class called style Drop Zone Dash
let's say box and it will have this
props the props we have created get root
props okay that's the problems we're
going to call it here and we'll have
this input and in this we're going to
call the prop as well so we'll have this
get input props okay so that's the one
two props we are passing down below will
have this div and it will have a class
called style Drop Zone Dash box okay
here I have to provide this box and
this one is going to be called image
input and in that we're going to take
this title and down below we're going to
have another div it will have the class
box dot MH okay and that we're going to
have the images so we have to display
the image which we are receiving from
the props and that's in this image and
we have to assign the all tag and the
alt tag will call it upload and it will
have a width to let's say 100 height is
going to be 100 okay so these are the
data we are passing it's gonna be this
class also so we have to assign the
class Drop Zone box input image image
okay so these are the data we are
passing we come down we'll have another
P tag and it will have the data so it
will have the heading it will have the
sub heading okay so these are the props
we are targeting receiving sorry okay
will come down and we'll have this
Dynamic data and this Dynamic block we
are creating to display the data which
user are filling for the nft okay so
once we get the data once we get the
image then we want to display this
Dynamic component okay which will make
sense so just follow along with me so
we'll say if there is a file URL image
is if there is an image then we want to
Simply render this component we'll have
will have us a side element HTML element
it will have a class called style dot
Drop Zone box aside and that we're going
to have a dip it will have a class
called style Drop Zone box aside Dash
box in that we're going to have a image
tag and with that image we want to
display is for the timing I'm doing
hardcode because the Drop Zone we have
created it's not working so the Drop
Zone will work in such way because what
I will do when we actually allow the
user to upload the image to through this
Drop Zone we're going to connect with
this ipfs so first we'll upload that
image to the ipfs and then we'll get the
URL of the ipfs and then we'll display
the image okay so that's the entire plan
I'm going and this is the approach I'm
taking for displaying the image so for
the timing I'm just go with the hard
so just give the hard code value and
that's and the image is coming from the
image folder okay nft one that okay so
that's the image we have now we'll write
this all tag and we'll call it nft image
it will have a width to let's say
200 200 okay and here we can have this
object fit on and we can say object to
will come down it will have a div it
will have a div it will have a class
called style DropZone box a side box
preview and that we're going to have
another level we have a class called
DropZone box aside box preview Dash on
one and it will have the paragraph and
this we're going to display the name
okay and here we're going to display the
actual name of the nft okay
if there is a name then we want to
display the name but if there is no name
then we want to display this empty
string so that's the simple launching
nothing new simple JavaScript
so what we can do now now simply copy
this portion and replicate one more time
and we'll change this to website now
well let's say we'll have another if we
unless it drops in box a side box
preview and this will become two and
down below we'll have a let's say
paragraph and this will have a span same
structure we have to follow descriptions
and we have to say if there is a data
then we want to display the data
otherwise empty string so that's simple
logic and we'll come down and
we'll have another class another div and
we'll have a class called let's go three
and and that will have this P span
this will become the data otherwise
empty string and now this time is a
little tricky because I want to do a
changes I want to give a space a big
space for the description but for this
royalty a two or one word keywords I
want to give provide a little little
space okay so what I will simply
replicate this okay so replicate this
three times and just change this
actually four times file size this will
and also this will become the
properties this will become properties
and this will become the category and
this will become categories okay
so these are the data we are displaying
okay so we have all the data and by the
way we are getting done with this Drop
Zone okay so let's have a look final
time so let's remove this we are not
using this one okay so let's remove this
and things are looking good now
things are good and here you can see
we have this and now it's looking fine
okay all the props we are sending that's
working absolutely fine but we have some
problem with the image our image is not
displaying we can see what's the problem
okay if you come around and here you can
let's come back to the code and let's
come back here and click on this
in the CSS file and where it is so here
so let's start with the CSS style okay
so we'll make it side by side and let's
start plugging upload is going to be
uh that is going to be 100 and margin
will come down we'll tag that block and
width is going to be 65 60 and margin 0
that's how it will look now let's come
down we'll Target the Box heading this
will become the Border bottom is going
to be one pixel solid VAR and it will
have the shadow dark color Okay Shadow
that's the color we want to assign to
our heading so you can see there is a
now let's add the media query and on a
Max bid 35 VM we want to provide let's
say box is going to be with this is
going to be 90 percent so nice wide
will have to Target The Heading and
paragraph and we'll save it is going to
and let's come here and let's come up
here out of the media query and we're
going to Target that heading H1 and
we'll increase the font size to let's
say 3.5 RAM and line it is going to be
okay we'll come down we'll Target The
Heading p and we'll say part of font
size is going to be 0.4 Ram which is
going to be 70 percent and line height
is going to be 1.2 Ram okay this looks
now simply come down we have to Target
the title and we'll say border is going
to border bottom is only one pixel
solidware and it will have our dark
color so let's review the page and
looking fine we'll Target margin top is
going to be 4 Ram so we'll have some
you can see it's looking really good on
the largest screen so we have this nice
title paragraph and all the details
and you can see it's looking perfect on
a desktop okay we have to do a little
bit adjustment in the mobile device okay
so let's come here and we have to do the
adjustment in the mobile device so let's
okay let's come here we have to Target
the title H2 and we have to say font
size is going to be 2.5 gram and line it
is going to be zero so that both will
have on top of each other now we'll
Target the p and we'll say font size is
going to be 1.1 RAM and font where this
is going to be 500 little smaller
now Target that and simply paste your
title H2 and we have to say font size is
going to be 1.5 RAM on a mobile device
and line it is going to be one ram okay
look good 1.1 that's better now if we
have to Target The Heading H1 and we
have this font size is going to be 1.6
Ram let's make it a little bigger okay
two yeah that looks perfect okay so now
it's looking good on a mobile device as
let's come here and let's have a look
you can see it's looking absolutely
gorgeous on a larger screen
titles subtitles but we have the problem
in the images but if you click on that
you can see our this pop-up is opening
so this is the title this is one and
let's do the inspect element and here is
also looking good now let's simply close
this one come back here and simply go to
and we have to start working on this so
simply copy that and we can Target that
upload so we'll Target that upload and
we'll say upload box input para and
we'll say padding is going to be 0 and 1
and we'll come down we'll Target this
box slider div okay and this will have
the Border one pixel solid VAR and it
simply scroll down and here you can see
we are working on the category section
okay so let's target that border radius
padding is going to be one ram cursor
pointer and will come down we'll have
the upload box slider and we want to
Target that and we want to say simply
cut that okay cut that in paste here
and in the slider and here we have to
say display Flex Gap one ram so that's
we have to Target that slide box and we
have to say display is going to be Flex
align item Center and cap is going to be
three Ram so that looks pretty awesome
let's look good on a large screen but
we're going to make it more responsive
so this looks awesome let's come down
and we have to Target that box slider
box image image and we're going to say
border video is going to be 50 and
we have to Target that box slider image
icon and we'll say background is going
to be our icon color and the phone color
is going to be let's say our main BG
color and we're gonna make it to border
radius to 50 and display is going to be
great and padding is going to be 0.2 Ram
now let's come down we're going to
Target that slider p and we'll say font
size is going to be 1.2 Ram let's say
one bit is going to be 700 line it is
going to be 1.2 Ram a little smaller
and come down we're going to Target that
um upload box and this will become the
buttons and we have to say that display
is going to be grid great template
column will be 21fr and let's assign a
margin block is going to be 4 RAM and
cap is going to be 2 RAM okay this looks
pretty good now we have to Target that
box BTN style so the custom styling
color and we'll say width is going to be
and let's start with the display is
going to be great align self-center and
font size going to be 1.3 Ram okay this
that's the custom styling we have now we
have to drag it active Okay background
is going to be our icon color and color
is going to be our main BG color okay
now we have to start working on the
media query so we'll Target that Max
width is going to be 35 em and we'll
Target the let's say I'll start with the
slider slider div and we'll say display
is going to be great great template
column repeat 3 1 FR and this is how it
t1fr let's have a look so this is how we
look it's having a little bit overflow
on a small screen okay here you can see
we have a little bit overflow so let's
make it two and here you can see it's
so and our active state is also working
fine you can see on click event we can
easily able to change the state so it's
so this is looking good already good on
and this data is already fine thus we
can easily able to choose the category
and by the ways why this is not working
royalty is size so close this one and
come back make a full screen and simply
so go to inside the social where we have
all these three components okay I do
understand what's the problem we have to
change the style file name okay so
simply copy this and simply change the
select select select and select select
select select select select and change
that okay replace this with form style
and here you can see we have the style
okay so it's looking perfect we are
getting the style and we can simply
make a check on the mobile device is
okay it's already 100 responsive and
taking place let's go on a small screen
and this is how it will look on a
okay but we have one button but we need
two buttons okay so simply come down in
the button component and replicate this
and this time we'll call it preview
so that's the burden component we have
here it's looking already much better
so it's working fine all the effects are
working fine all the components are
perfectly aligned and responsive
and the datas are also looking fine
now we have to work on the drop zone as
this is how it will look on a mobile
phone 100 responsive and on click even
we can easily able to see data
okay this one is looking good
now close this one and simply open the
Drop Zone and we have to start working
so first thing we have to do is to
Simply copy this and come back to the
CSS file and let's target that so we'll
stagger the Drop Zone and let's make it
so we'll say with is going to be 100
margin block is going to be 3 RAM
and drop zone box is going to be let's
say border 5 pixels so five six plus dot
icon color Okay save it here you can see
and we'll Target that box the radius is
going to be one ram and well texture
line is going to be a center cursor
okay the Border radius is not taking
place but you can see it's looking
really much better and everything is
and here we have to do the changes it's
not box sizing it's a border radius so
simply change this to border radius and
here you can see it's looking perfect
take a padding to one ram and will come
down we'll Target the Drop Zone box
input p and we'll say line it is going
to be zero so that's looking awesome
let's come down and we'll tag at the
drop zone box input image image and
border radius is going to be one Ram but
so let's come here and go to the images
folder actually what I have noticed that
I haven't have the image in the image
folder and that's why we are getting
this broken image okay so first thing we
have to do get the images okay
so here you can see we are passing the
the image and the props and that's what
we are receiving here in the and that's
what we are trying to display in the
component but we don't have the images
okay so we don't have the images so let
me copy that image from the project so I
will simply open my project come back to
I have already imported that okay so I
will stop the video and I imported the
so I stopped the video and I copy the
video and paste it inside this image
folder and now I'm importing so I'll
import the image I'll call it upload and
that's coming from dots slat upload PNG
okay so this folder this all the images
would be provided to you in the article
okay so make sure you get that folder
starter folder from the Articles from
there you can is able to have this old
images okay and now what I have to do is
simply I have to export this so I can
easily able to display and you can see
the moment we have exported and provide
that image it's displaying on the
application so we can close this one and
here I want to show you a small trick so
if you want to turn it something lighter
to dark or dark to light this is how you
can do it okay and we're going to use
use it actually when we convert this
into a dark mode or into a other color
design okay because I'm I'm planning to
create this close to five to six version
of colors okay so right now you can see
Indian gray color we're going to have a
dark we're going to have a yellowish
we're going to have its reddish so the
entire application will have in multiple
colors that's what we will do in the
letter because we have to do a little
bit changes and the entire state of the
application the color would be changed
okay so here we're going to use this
filter here we're going to use this
filter and we're going to call it invert
and the moment we call this function you
can see the white image turn it to dark
but for timely I'm just coming it out
okay I leave it on you guys okay
so that's what we have here now we can
simply come down we're gonna Target that
top box aside and actually we don't we
can't see so let's come back here and go
to this drop zone and here we have to
turn it to let's say true okay provide
these exclamation marks and here you can
see the mode you save here we have the
all the hidden Vlog we have created and
now we can start styling on it okay so
let's come back and let's target that so
first thing we want to do is padding is
let's come down we're gonna Target the
border is going to be three pixes dotted
and it's gonna have our icon color
matching top is going to be 3 RAM
will have the Drop Zone box a side box
and it will have the display is going to
be great great template column 1.5 and 4
for 4 Rafa and GAP is going to be three
Ram this is how it will look let's come
down we're going to Target the let's say
we'll take the media query and on our
Max bid is going to be 35 VM on the
mobile device and we're gonna say with
this great template is going to be 1fr
so that's how it will look okay
well come here and we're gonna Target
font size is going to 1.2 Ram
font with is going to be 700 and margin
left is going to be one ram so you can
well come down we'll Target that
box preview this is going to be a one
display is going to be flex and
a line item Center justify contain space
between so that looks pretty good and it
will have the font where there's going
to be 700 and it will have the font size
1.2 Ram so that's how it will look
and welcome down we're gonna Target the
box 3 and we'll say display is going to
grid template column repeat 3 1fr so
that's how it will look on a next stop
mode you can see it's looking beautiful
it's already looking much better
let's make on a mobile device and here
we have to Simply copy that and paste it
and we're going to say that grid tablet
column 1fr on a mobile device so that's
how it will look on a mobile device okay
now we can drag it at one and we'll say
display is going to be grid
now let's have a look final time and
things are looking much better
close this one close this one and go to
and just turn it to normal okay
and let's come here and let's test this
and select this author image and here
you can see the dynamic block is open
because we have something in that drop
we have the images data okay so that's
div and if you come here if you type
anything you can see the live update
you can see the name of the nft the
authors and nft you can provide the
website name I'll call it dollar
thusan.com and here I can provide the
description simply copy that and paste
it so here I have the description and
here I can provide the royalty
percentage and this is the file size and
best okay so all the data and right now
you can see all the data we can able to
see here this is the digital because
right now we are selecting digital but
if you click on this and here you can
see it's a sports if you click on this
it become Arts if you click on this it
will become music if you click
so here we have this data let's change
this data okay so let's come back here
we have to go back to upload nft and
where we are rendering the data the
and here we have that professor
Professor simply change that and in that
we're going to say element dot category
here you can see we have all the
categories ports are digital time and
photography so if you click on this
digital you will have this digital but
the category and the data they are very
close to each other so we have to
provide some space between them okay
so let's come back to the code and close
and here simply copy that from one and
preview and simply come here and where
so here we have that margin left
so let's change the value to margin two
simply remove that one and say margin
in line and this will become one ram so
it will have some space you can see we
have some nice space from these data
okay looking fine again this one is also
and reload the browser let's have a look
and everything's working fine if you
click on this this pop-ups open and here
we have that data we can type it
you can simply make it side by side it's
100 responsive for all the devices you
can see images stretched a little bit
but it's looking much better now
and this is the category section we have
file size upload preview okay
so things are looking much better
let's rule the browser and let's have a
so this is the heading subheading this
is the box you can click and you can
you can simply update the data
you can type the website if you have
you can give the descriptions only copy
and paste here you can see the data here
is here now you can simply select the
category so Sports if you want to select
this art you can see art if you want to
provide a royalty some type of discount
you can do that here you can provide
this size you can provide this
properties so all the data is updating
dynamically and all we have to do is to
Simply pass this data into the smart
contract and the nft is already okay
so the details are already ready we have
all we have to do is to pass this all
data okay so things are looking pretty
good and this is the upload section we
so in this video we're going to create
the connect to wallet page okay so let's
create a page for that so we'll call it
wallet.jss and we have to type this
rafce and simply close that and we have
to create the CSS file for this we'll
call it connect wallet dot modules.css
so that's the CSS file and in this we're
not going to create any extra component
folder because this is going to be a
very simple page okay we're going to do
couple of imports so the first thing we
need is the use State and we need the
and we're going to import the images
let's come down let's do the internal
import we have to import the CSS style
file and that's coming from the style
folder and this will call connect wallet
okay so these are the Imports we have
now we have to import the images so all
and that's coming from the image folder
okay so these are the external internal
now what we have to do is let's come
I have to get a couple of images so
right now you can see I have this
provider one provided to provider3 and
provide four so that's the image we want
to use in this project okay so let's do
one thing I'll make this side by side
and I'm going to Simply drag and drop
the Cs images okay drag this one wrap
the two three and the four okay
so all the images we have for the
so because in this nft Marketplace we're
going to provide four providers one
metamask and connect wallet 4matic okay
so we're going to provide different
providers so here we have the logo of
nothing complicated now we have to
import the images here and we'll call it
and that's it's called provider one
simply replicated four times and we have
to change the file name to three four
and here we have to change as well so
two three and four so all the providers
we have here simply copy and Export that
and paste your replicated four time and
we have to change this to 3 and 4 okay
and now we can easily able to utilize
so we have that one now we can come down
we can take this U State and we'll say
active button and initially it would be
one so we want to make it metamask
and we'll say provider it's going to be
an array so in that we'll take an object
it will this will call the name Meta
Meta mask so simply copy this okay
select this one and we have to take the
object simply cut that and paste inside
this okay now replicate it four times
and we have to change this to and this
and by the way if I make any spelling
mistake please forgive me for that
because I'm really bad with the spelling
and by the time you are watching this
following this course you have already
seen me making a lot of spelling
and this will become let's say three and
link and this will become 4 and this
Matic okay all the four providers we
have with the name image okay simply
close this one and now we can start
working on the GSX so remove that we'll
take that and we'll take a div it will
have a class called style dot connect
wallet and then we're gonna take this
style connect wallet Dash box inside
that inside that we will take this H1
and we'll say connect your wallet it
will have a P tag and this will have a
and that we can say something like
that's the message we want to pass here
now we can simply come down here we'll
take a div it will have a class called
and this will call let's say provider
and then we're gonna take this
will hover the array we're gonna Loop
over it element I instant return and in
that we'll have a div it will have the
class call connect wall let box provider
and it will also have a gig otherwise
the react will give you an editor and it
will have a on click function
and we'll call it let's say set
that's the function we want to call it
let's turn this class into a dynamic
class because we want to make it active
whenever someone click on any one of the
provider okay so let's take in a
template tutorial and we'll take this
dollar and wrap this entire num bracket
so this is the normal CSS file and now
we have to take this active one so we'll
equal to I plus 1 then we want to say
active ad activate class active
and otherwise we don't want to add
anything okay so that's the simple logic
we have built here now let's come down
we'll stick the image and then we have
to take the image as well so which is
inside the element and provider and
we'll take the all tag and in that we're
going to pass the provider so element
dot provider we'll have to assign the
width so width is going to be let's say
50 and height is also going to be the
50. okay nothing new very simple and we
have assigned a class so this will
box provider item image okay
and we can come down we'll have this P
tag and we'll display the element name
as well okay so that's the simple j6
which we have written for this entire
connect wallet function okay current
so looking fine and right now we are not
using instead because we need to use
this use statement will actually connect
with the smart contract to check whether
the user is connected with application
or not okay so I'll just keep it that
so so let's come here start the
as I've noticed that we are somehow we
are not using this active BTN simply
copy that and let's come here
okay here is a mistake I made it simply
to one thing simply remove this stylus
so make sure you do this change open the
application on the browser and before
you do that you have to change the
navigation so let's go back into the
component navbar and the Discover
section and here we have to provide this
and what we have called the page let's
say we have called this connect wallet
capital W so remove that and add a
capital W so this is the URL we have
and now you can come back to the
application and here we are and now you
click on this and click on this connect
okay here we are on the connect wallet
you can see all the data is already
displaying connect wallet and all that
so things are looking fine now let's
make it side by side and let's get start
styling this component so let's make it
things are looking good now we can
simply copy this and come back to the
CSS file we'll Target that and we'll say
let's say width is going to be 100 and
block is going to be 5 Ram from top and
bottom and we're talking about the Box
will say width is going to be 50 and
margin is going to be 0 Auto
okay save it it will hold the content
and now we'll Target the Box H1 and
we'll say font size is going to be let's
line head is going to be zero
let's come down we'll take the media
query and the max of it is what we're
going to have is 35 em and we'll Target
um box connect box and we'll say which
is going to be 90 on a mobile device so
that's how it will look simply copy that
H1 font size is going to be let's say 1
Ram very small make it 2 RAM that's too
big let's make it to 1.5 that looks
this looks good now we can come down we
we can simply Target the Box para and
we'll say font size is going to be 1.5
RAM and padding is going to be
padding bottom is going to be 2 RAM
border bottom is going to one pixel
solid VAR and it will have our shadow
that's the color we want to assign so
save it and here we have that simply
come down we'll Target that we'll Target
the Box provider and we'll say margin
block is going to be 5 gram and
will have some space from top and bottom
provider current wallet box provider
item it will say display is going to be
Flex align item Center Gap is going to
border radius is going to be one ram
margin top is going to be 1.5 RAM and
and we have this Shadow color save it
let's come back padding is going to be
cursor pointer and transition all point
three second EC in so that's how it will
look you can see it looks beautiful and
okay we have some problem in the
formatic image okay I think I don't have
so okay we can fix that later let's come
down we'll Target that provider item on
over effect we want to add the let's say
box Shadow and it's gonna have okay I
wanna have the background color to our
Shadow color so you can see on overhead
we are getting this nice color okay
we'll come down we'll Target the
and we'll see image we'll call it border
item P font size is going to be 2 RAM
linet is going to be zero it's too big
let's make it 1.5 that's all perfect
okay now let's come down we'll Target
that active State and we'll say
box Shadow is gonna have that box Shadow
okay the moment I will save the metamask
will have that active State because
that's what we have defined you can see
you can simply over it and you can click
on any one of this provider and that
will have that color and it's responsive
here in the provider and here actually
we don't have this formatic image so
I'll simply replace that with that one
first thing we're going to do is to
create the page for it so we'll call it
and it's going to be an Aegis we'll type
rafc we have to create the CSS file for
so before we do that let's come here
so let's go get into this style folder
okay and sidebar we need to copy this
icons and simply paste it because we're
going to use couple of icons in the
contactors form okay here we have the
icons simply remove this one and let's
come down we have to import the
outline mail and that's coming from
we have to do the internal import and we
have to import the style file
so I remember that I haven't created the
style file so let's come here go to the
style folder and we have to create a
style file contact us dot module dot CSS
and that's what we're going to import
here so that's coming from the style
okay so that's the folder so we have to
import the let's say form style because
again we're going to use that form
components here in this contact form
okay so we need to import this style for
the article okay form style so that's
form style coming from the let's say dot
dot account page form Dash and we have
this style file okay so these are the
two style file one is for the contact
and one is for the form component okay
simply come here we have to import the
button and that's coming from the
so these are the internal import we have
and now we can start working on the jsx
parts so we'll remove this one
and we'll take the div it will have a
class called style dot we'll call it
contact us inside that will have another
div it will have a class contact us Dash
box and that we're gonna have let's say
and down below will have another div it
will have a class called style contact
and we'll call it let's say box
and that we're going to have another
David we have a class called style
contact box box Dash left in that this
will have a light so we're going to have
two days and inside that we're going to
let's say we'll have a div it will have
a class called Contact box box Dash left
and we'll call it item and that we're
we'll take this H3 and we'll come here
and simply copy that data and paste here
come back here copy that data and paste
and we'll have down we'll take this
item and that we're going to take this
H3 and we'll simply copy that one
pasture we'll take a P tag and we'll
that's the one we have now simply we
have to replicate this one more time and
we have to make the changes copy that
and simply change this number select all
so that's what we have simply do one
and this time we have to copy one more
time and because we want to display the
icon so let's come here copy this and
and here we're going to display the icon
simply remove this one here we'll take
the h a anchor and here we're going to
simply replicate this couple of times
and this will become let's say
LinkedIn this will become TI
YouTube and this will become let's say
TI Instagram so these are and one more
we have this Twitter okay so these are
the five icons we have okay
so that's looking absolutely fine
now we are done with the left hand side
now we can start working on the right
so simply bring this down and we'll have
and inside that we're going to render
but we're going to Simply copy and paste
couple of forms so let's come here go to
this close this page and close this
files close this one and come up here go
to this account go to this form and from
here we're going to take couple of
things so first thing we're going to
take this this username we need simply
copy that and come back here and paste
here okay that's the first thing we need
we need the email so let's open that
okay this is the email we need this as
and come back here and paste right below
and this is the one we need simply
select all these descriptions and close
this one and come here and paste it
and here we have to do the changes in
the style file okay so let's have a look
so things are looking good we don't have
and here we have this form style and
that's the style we want to pass here
change this select all this
we'll select only forms okay
and now we have to replace that save it
and save it now we have to can start the
application but before we do that let's
go to this navigation you know the drill
and here we have to change that so go
so we go to the help section and here we
have this contacts remove this save it
and let's have a look it's too good
and now we can open the application and
click on this help and click on this
and here we are you can see things are
looking good we have all the components
in the form component and we have the
let's come back to the code and now we
can start styling but before we do that
we need a button okay so let's take a
well provide the props we'll say let's
and we will have a handle click function
So currently we want to have this empty
function it will have the custom class
we'll call it style dot button okay
the entire thing.js for this and if this
let's copy this one and close this and
now we can start working on the CSS
let's make it side by side and we'll
with is going to be let's say 100
box contact box is going to be with is
going to be 60 percent and margin 0 Auto
let's come down we'll have the media
query and we'll say Max width is going
to be 35 em and this is going to be
let's say 90 percent on a mobile device
let's come here we can attack that box
font width is going to be 900 so that
let's come down we're going to Target
that box box and we'll say display is
grid template column 1fr and 2fr GAP is
going to be 5 Ram align item Center
a line self is going to be Flex start
and margin bottom is going to be 10 Ram
okay you can see this is how it will
look now let's come back to the media
query and we'll Target the box and box
and we'll say grid template column is
going to be 1fr and GAP is going to be
one ram so that's how it will look on a
mobile device looking perfect and let's
come here we're going to Target that
um box left and it will have the items P
it will say a line height is going to be
1.2 and width is going to be 80 percent
phone size is going to be 1.2 Ram
and you can see now it's looking good
we'll come down we'll Target the Box
left item a and we'll say from
size is going to be 1.5 RAM and body is
padding is going to be 0.3 RAM and why
these styles are not taking place
okay I think we have made some mistake
okay let's come down we'll Target the
button and we'll say with this margin
top is going to be listed 2 RAM
so it will have some space from the top
and let's scroll down here you can see
but still this class are not taking
place box left let's come back to the
and let's have a look what we have
okay here we have that box box okay we
so make sure you do the changes con
contact us box left item okay make sure
and do the same change on here as well
and here we have the same one assembly
and you can see styles are taking place
so things are looking much better now
you can see it's look beautiful
so that's what we have things are
looking perfect perfectly aligned now
let's have a look so this is what we'll
look on our desktop you can see we have
and this I think we have to decrease the
so this is the data and let's change the
name okay in description email so let's
come here go to the jsx and here we're
going to make the changes this become
and email is there and this will come
reload the browser and you can see it's
now we have to decrease the font size to
this sections okay let's come back to
here we have where is the P area let's
and this one is looking perfect small
beautiful icons everything is working
and 100 responsive for all the devices
so make it full screen and with this we
are done with this okay let's come here
and you know the drill what we have to
do so let's create a page for it so
we'll call it about us about us and
Zoom a bit and come here and we have to
create the CSS file for this so about us
so that's the general setups we are
doing here and now we're not going to
create any extra folder for this page
okay because we have to write a little
bit code in this okay so we're going to
write all in this about us page so let's
start working on it first thing we have
to do is to import couple of things so
first we need the images let's do the
internal import we need our CSS file and
that's coming from the style folder okay
so that's the Cs file we need to import
the component and that's coming from
so these are the import and then we have
to import the images okay and that's
coming from the image folder
so let's remove this so these are the
external internal import we have let's
come down and let's start working on the
GSX so we'll take a div it will have a
buzz and inside that will have another
divided we'll have a class called about
dashbox and that will have another div
this will call about dashbox
hero in that we're going to take this
let's say we'll take another div it will
and we have to take H1 let's come back
to the original application and we have
to copy this and simply paste here we
have to take the paragraph and paste
okay so this is the left section we have
to come down and we're going to take a
let's say another div it will have a
Box Hero Dash right okay and that we're
going to have the image so we'll have
this image tag and we have the images
inside this image okay and we will call
hero2 okay so there is two images one
hero which is we are using in the home
page and this is Hero 2 which we are
using in about a speech okay here we're
going to take another div it will have a
class called style about box and this
will call Title here we're going to take
that let's heading to and we have to
copy this and simply comment paste here
we have to take a paragraph and copy and
so that's the heading component we have
let's simply close this one and close
come down and this is going to be the
third component okay so so we'll take a
div it will have a class called box
about us box Dash Founders and that well
and that will have another divid will
have a class called about us box founder
Dash box and that we going to take a
demo data okay so all together we want
to display four founders so we can do it
in a hard code value but we're going to
use the array because I believe that
this data is going to be dynamic and
filtered so that's why we are taking
this approach so we're going to take an
array and we'll call it founder array
and this will call in in this error
we're going to take an object
okay so the object would be like
first is going to be the name of the
founder so let's come and copy and
then we want to type the positions that
so simply copy here and paste here
and let's take the simply replicate this
four times because we are displaying
four Founders and just simply replace
their name and the position
so these are the four errors we have
and I remember that we have to add the
image as well so let's do that as well
so let's take the images and inside that
image we have an image called founder
so I believe that I have I don't have
so what I have to do I have to get into
my folder and from there I can simply
get the images so the images we have
go to this image folder and Founders
so make it side by side and simply open
and simply select all the founder image
so and drag it and leave it here
come back to the index and here we're
going to import the images so let's do
it we'll call it founder one and that's
coming from founder one PNG and simply
replicate it four time we'll change it
two three four and that's four three two
and simply paste copy unsembly paste it
and replicate it for time and change
this to three four okay so these are the
image we are importing exporting now
let's come here and here we're going to
image use the images so let's use the
founder of one simply copy this portion
and do the same thing to others okay
simply copy and paste and change the
just the value Formula 3 and this will
come found before so these are the data
we have about the founders and now we
can copy that and we're going to Loop
over it okay so this is the founder box
we have and that we're going to take
this Dynamic block you will say farmer
array map element I it's going to be an
instant return and that we're going to
take a div okay and it will have a class
and we'll call it let's say box Dash
image and then we're going to have the
image of the founder so we have the data
so that's the data we are getting from
here okay now we have to assign couple
of properties so all tag is going to be
the name of the founder which is going
to be let's say something like 500 and
height is also going to be 500 and we
want to assign a class to this so about
it's pretty huge name okay image image
okay so that's the class we are
assigning to the image now let's come
down we're going to take this H3 and
we're going to display the name of the
founder so element name and we have to
display the position so element dot
position so that's the day where we are
rendering so it's working fine now we
can come down and simply copy this one
because the title is going to be the
same for first one and second one okay
so I'm just simply copying and pasting
this one okay so here we have the title
okay simply copy that and paste here
copy this portion and simply replicate
changes okay so this is the title and
simply close this one so all together we
have four divs and this is going to be
the final one we're going to take
another div and we'll have a class
and this time we're going to call facts
and that we're going to have another
demo we'll have a class call about box
facts that box and that we're going to
have the dynamic block because again we
want to Loop over it okay so let's come
up here and we're going to take the
array so this time we'll call it let's
say fact array and this will contain the
object and the let's say title is going
let's give it 10 million this is what we
have in the demo okay in the template
and we're going to add this info and for
this we're going to Simply copy and
paste so let's come here copy this
simply replicate this two times and now
we have to change this data quickly so
this becomes like big number just copy
this one and simply replicate this come
and simply chain this one copy the text
and simply change this one so this is
the fact array simply copy that and
and we're going to Simply Loop over it
okay map element I it's gonna be an
instant return and in that we're going
to have a div in this we'll have in div
it will have a class called style box
facts box and this term we'll call it
let's say info it will have the S3 tag
and it will display the element dot
title and down below we're going to have
a paragraph and this will call info okay
so that's the data we have let's come
down and here we're going to display the
that's the entire j6 part for this about
a space as you can see it's pretty small
code okay so we are done with the jsx
part and just reload the browser and
actually we are getting an error it says
that cannot read properties of undefined
okay I have provided this Dot
so simply reload the browser
okay this is the problem we have let's
come back to the code and here we have
to Simply remove the dot and write a
if we come and reload the page and here
you can see we have the about us we have
the paragraph image and all the founders
we have and all the facts data we have
so everything is working fine now we can
start working on the J on The Styling
part okay so let's mix side by side so
you guys can see what we are working on
exactly okay so things are looking so
far so good okay so simply copy this
class and close this one and come back
to Simply close this folder image close
this one and go back to the images One
sorry style file and now we can start
styling this okay so we're going to
Target that about us and we'll say first
thing with is going to be let's say 100
about us box is going to be where is
margin 0 Auto auto will come down will
take about us Box Hero section and
grid template column 1.5 FR and 2fr
a line item Center Gap is going to be 3
about this box hero left and H1 we're
going to Target that and we'll say font
size is going to be let's say three wrap
line it is going to be 0.5 and let's add
this media query so we'll say and Max
width is going to be 35 em we'll say a
about us Box Hero grid template column
1fr so that's how it will look pretty
good now let's come down here
we're going to Target that box hero left
and this will become font size is going
line height is going to be let's say 1.5
RAM and we're going to Target the about
as box title and this will become margin
top is going to be 5 Ram so we'll have
some space from the top okay
let's come down we'll tag the about box
title 2 and this time we'll see that
line height is going to be 1. we'll tag
the about box title P we'll say font
size is going to be 1.5 RAM and line
height is going to be 1.2 where this is
going to be 40 percent so that's how it
will look simply copy this one and come
back to the media query and this time
say width is going to be 100 so that
let's come here and we're going to
founder and this will become margin top
margin bottom is going to be 10 RAM and
founder box here we're going to say that
display is going to be great great
so it will come in four okay Gap is
and simply copy that and come back to
the media query and here we're going to
say grid template column 1fr for the
mobile device so that looks pretty good
so so far so good and here we're going
founder image and we'll say border
background color is going to be our icon
and we'll have a color itself is going
okay we're going to have the padding is
one ram and we'll take this border
radius is going to be one ram so that
looks good you can see nice background
we have Target the image and we'll see
that border radius is going to be one
so let's come down we're going to Target
image H3 line it is going to be zero
we'll Target the founder box image p and
we'll say line height is going to be
font size is going to be 1.2 Ram so
it's working fine you can see things are
and now we can come down and we're going
about his box and this will say facts
box and display is going to be great
and we'll take the gap of 2 RAM we'll
take the margin top is going to be 4 Ram
will come down we're gonna Target the
box fact box info it will have the
background color to this icon color will
have the padding to one ram and 3 RAM
will have the Border radius to one ram
and color is still going to be our main
okay this looks pretty cool well come
down we're going to Target the fact box
info H3 and this time we're going to
increase the font size to let's say 4
RAM and line height is going to be zero
so that looks pretty huge now we can
come down in the media query we can say
that auto box width is going to be 90
will come down we're going to Target the
box founder and we'll see margin top is
and let's come down we're going to
box and grid template column 1fr and GAP
we'll tag the let's come here and we're
going to Target the about box fact box
and this will become grid display and
grid template column 1fr and GAP is
going to be 2 RAM and margin top is
going to be 4 Ram so if we say that's
look pretty cool you can see it's
and now we have to just simply decrease
the font size okay so simply copy this
and let's come here and we're gonna say
that H3 font side is going to be on a
mobile device is let's say 2 RAM so that
looks really good on a mobile phone
so everything's looking fine let's come
here and let's have a look so this is
how it will look let's increase the size
and we have to add a second breakpoint
is the problem we have so we have to fix
this this is how we look on the desktop
pretty good no issues we have in our
and let's come here what we can do
simply come here and let's write the
second media query so this will become
let's say Min width is going to be let's
so it will start from 4 to 45 pixels and
it will go all the way to let's say Max
let's say 768 pixels and simply now
simply open the previous media query
simply copy the entire one okay copy
this and simply paste it and save it and
here you can see it looks beautiful
the only thing we have to do is the here
in the forwarder section so make it 1fr
okay and that's how it will look on our
tablets on a bigger screen so it looks
everything is looking beautiful so
things are looking beautiful 100
responsive for all the screen sizes this
is the about section so images we have
this is the photo sections this is the
facts about this nft marketplace now
final page which is a subscription page
so you know the drill what we have to do
let's create a page for it and with this
time we're going to call it let's call
dot JS subscription and we have to type
now we have to create the CSS file for
this so we'll call it subscription dot
going to start working on so we have to
do a couple of internal Imports so first
thing we have to import is the style
file and that's coming from the style
so simply close this one and let's come
here and we're going to create one more
folder and this is going to be the final
folder for building this template which
is going to be in the root directory
okay so let's create a folder and we'll
call it subscription in the capital way
okay copy and we have to create the jsx
and type R afce close this one and type
we have to create the CSS file for this
so this is the component we're going to
use right up here okay so let's do the
internal Imports so we're going to
and that's coming from the same
directory okay we have the CSS file here
so let's come here and go back to the
and now we can start working on the GSX
import so we have to import the
subscription component we have created
and that's coming from the dot dot
j6 okay and now we can start we have to
get the data okay so let's come back to
the original project and this is the
data which I have already prepared so I
copy this entire data and let's come
back here okay I'm copying the data and
pasting because if I start typing it
will take a little bit time okay so
simply paste the entire data so this is
the pricing plan so we have we are
displaying all together three prizing
plans starter Basics and pro and this is
what we are displaying the price
popularity Services informations okay so
these are the area of objects we have so
we we have all this data okay which
we're going to display simply close that
we can start working on the j6 so we're
going to take a diff it will have a
class and we'll call it let's say
so make it small inside that will have
another div it will have a class called
subscription Dash box and that will have
another divided we'll have a class
called subscription Dash box sorry Dash
info it will have this H1 we have to
copy this entire H1 and simply paste
here come down we have to copy this p
and paste here so this is the data we
have now we can come down we'll have
another tip and we'll have a class
called surprise subscription box
box and in that we're going to Loop over
the data okay so we have this data array
subscription array and we're going to
Loop over it and render in the
components so we're going to pass that
inside the component as a prop so
it will have a key and in that we have
to pass the data as it as well so first
thing is going to be the index and
second one is going to be the element
so that's the only GSS part we have to
write here in the subscription model
okay and now we can start working on the
subscription component let's come here
and we have to do a couple of external
Imports so first thing we need the icon
take icon and that's coming from react
and let's come here we're going to
import the button and that's coming from
the component component index
so that's the internal external import
we have and here we're going to receive
the props element and I let's start
working on the jsx we'll have a Dev it
will have a class called Style
subscription and let's call it box and
the reason why I'm calling the name in
this way because I don't want to create
a name conflict because in the page we
are calling subscription okay so I just
two things separate okay so I'll go with
and that will have a let's say we'll
have another div it will have a class
called style dot subscription box Dash
will have the span and it will have a
class called style subscription box Dash
box and we'll call it span and then
we're going to display the data so we'll
have a we'll display this display the
actual startup package okay the name of
the plan so and it will have this small
and it will have a class called
and this will call small itself and in
this we're going to display the let's
what if you want to display the popular
so whether which one is popular whether
standard popular or Pro one okay so here
we'll display the popular data
and if we have the popular then we want
to display the popular if we don't have
then we want to display nothing now we
can come down we'll have a P tag and
simply copy this entire and simply paste
it and here we're going to call it para
and here we go to display the price
so we'll we'll call it let's say price
and let's come down we'll have another
Dev we will have a class called style
and we'll call it subscription box Dash
box info and that we're going to have
element okay and service because inside
the service we have a couple of more
information okay so we're going to Loop
over with that as well so we'll do map
element I and it's going to be an
instant return and inside that we'll
so simply copy this and simply paste
here and this will call Para okay it
and I plus 1 and inside this we're going
to display the span and this span
contain the take icon and here we're
going to display the actual data
the actual data will display so far so
good now let's come down we have to
display the button finally at the end
okay it will have a class not class we
have to assign the button name so the
button name would be submit and it will
have a handle type functions and it will
also have the custom classes for the
button so we'll call it let's say button
so that's the entire j6 part for this
entire subscription component so far
everything is looking good okay
let's copy that and let's start working
on the CSS file okay let's come back to
and let's change the name here okay so
let's change this to subscription okay
so we can easily able to navigate to
so let's come here and let's start the
application npm run Dev and click on
and click on this subscription
and here we are you can see every data
we are rendering everything is working
fine we don't have no error here right
so far things are looking good now let's
make side by side so you guys can see
what we are working on exactly
simply copy this and now close this one
and come back to the CSS file okay first
thing we have to do is to Target the
subscription page CSS okay so let's open
that and let's start with that so we'll
margin the block is going to be 7 RAM
and subscription box is going to be with
is going to be 80 percent margin 0 Auto
well come down we'll tag this media
let's say Max where is going to be
35 em and in that we will say width is
90 so that's how it will look okay why
the stylings are not taking place
we made a mistake so let's come back to
the G6 and here I made a mistake it's it
s okay so make it capital and save it
okay change this to Capital
so make sure you do this change and
let's come down we have to Target the
info and we'll say text align Center
we'll have this line at zero
will come down and we're gonna Target
info H1 and we'll say font size is going
to be 4 Ram line head is going to be 0.5
will come down we'll Target the info p
it will have the font size to 1.6 RAM
and it will have a line height 2.5 okay
now let's come down we have to Target
the box box and this will become display
and the grid template column repeat 3 1
FR and GAP is going to be 3 RAM
margin top is going to be 7 Ram so we'll
okay that's how it will look now
we can come into the media query and
we'll Target that subscription and we'll
margin block is going to be 4 Ram
box info H1 font size is going to be 2
and we have to Target the p as well so
this will become font size to one ram so
little small on the small screen and
let's come down we have to Target the
box box and we'll say grid template
column 1fr for the mobile device so that
looks pretty good okay this looks
beautiful now we have to take the second
not Min with and we'll start from 4 45
and 455 to it will go all the way to
1024 pixes and in that we're going to
so simply remove this and complete this
entire CSS and paste here okay
we want to provide the exact media query
and the only thing we have to do is in
so let's come here and you can see
everything is working fine here we are
dividing in two column things are
looking pretty awesome Okay so
with this we are done with this entire
CSS path for the pages now we can start
working on the component CS passing
close this one and go to this component
and now we can start working on this
simply copy this and come here and start
so we'll Target that and we'll say we'll
say border one pixel solid VAR and it
we have to take the padding to Ram we
have to take the board radius one ram
position relative and transaction all
0.3 second easy in cursor pointer so
we have to take the box on over effect
we want to have the let's say box Shadow
to our custom box Shadow color
that's what we have here let's come down
we have to Target the subscription box
itself and span will say font size going
phone width is going to be 900
it's come down we'll Target the Box
small and this will become position is
going to be absolute right is going to
be 3 RAM and font size is going to be
1.2 Ram it will have a background color
to our icon color and it will have the
we have a padding 0.5 RAM and two Ram
one ram and we'll have the let's say
border it is going to be 0.5 Ram so
that's how it will look you can see
beautiful design let's come down we have
and this will become the box price we'll
take the font size going to be three RAM
and line it is going to be zero font
width is going to be 900 but why the
stars are not taking place okay simply
and here we are making a mistake okay
so what we have to do is let's come here
and remove this and call it price okay
so make sure you do these changes and
and here you can see the styling is
okay a little bigger now we can come
info will Target the margin 4 amp and 0.
info better and this will become display
align item Center Gap is going to be 2
RAM and font with is going to be 500
font size is going to be 1.5 RAM and
line height is going to be zero so
that's how it will look pretty big on
on the desktop okay we'll take a media
query and this will become let's say Max
width is going to be 35 em we'll Target
subscription box info para and will this
font size is going to be one ram okay
and that's how we look on a mobile
device let's make on a big and this is
how it will look on a tablet so looking
pretty good so it's looking really good
on over effect we are getting the style
and you can go to the collection Pages
remove this one and go to the home pages
and let's have a look okay so with this
finally we are done with this entire nft
Marketplace template design okay we
completed the second part of this entire
full stack nft Marketplace project
all of you hope you guys are great and
welcome back to this full stack nft
Market based project video so in the
first two part we handle the smart
contract in the second part we had built
the front-end application right from
this video we can start connecting the
smart contract with the front-end
application okay so that's what we're
going to do right from this video so
here I have opened the project where we
left in the last video and those of you
watching this video right from here let
me give you a quick overview of this
folder and file structure which we have
built for the nft marketplace template
design okay so on the right hand side
you can see we have these folders so the
very first folder we have this account
page it's actually a component for the
account page okay in that we have this
form we have this author page and that
we have all this component okay for the
author page we have this collection page
these are the component for the
collections and same goes for this
component so in this component we have
all this component like filter
collection category follower navigation
footer so all this component we have
this is the image folder in which we
have all the images which we are using
in this project okay now this is the
login component for login page and this
is the nft details components for the
details nft Details page okay and here
we have the page folder inside that we
have all the pages which we have created
for this template okay so we have this
account about us author collections
wallet contact us index login nft
details search sign up subscription
upload nft so we have a lot of pages
okay let's close this one and now we
have come down here we have more
component search component we have so
this is the folder which I have created
in this I have the sample data which
we're going to use when we build the API
okay so don't need to worry about it
okay so let's come here here we have the
style file style folder in that we have
all the CSS files for the pages okay
down below we have the two more
components subscription component and we
have this and upload nft okay and I have
also opened the smart contract project
in my other code reader okay you can see
this is the project in which we have
built a smart contract so this is the
Smart contract we have written open this
one and this is the Smart contract for
our nft Marketplace so we have written
tons of code for this nft Marketplace
okay so you can see this we have this
packages counters we have this one they
have mapping they have the struct and we
have all this function okay so we have
and we have getting listing price we
have create token and we have this
create Market item we have resale token
and we have this create Market cell
function we have this fetch Market item
and we have this fetch my nft we have
this fetch item listed so there's a lot
of function we have written in the smart
contract but you have noticed one thing
the template we have designed and the
smart contract we have written there's a
lot of difference between that in the
actual template we need a lot of data we
need the data for the collection page we
need the data for the users we need the
data for the like followers for all
those things but we don't have any one
of those function in our smart contract
so the point is from where we'll get the
data that's a very valid question you
guys should ask me so this is how I have
planned to take this course forward okay
so the smart contract we have written
it's a very simple smart contract for a
small application where you don't want
to allow user to follow someone else
follow creators just a simple
marketplace where user can create nft
and they can sell and buy if you want to
build an application like that then it's
perfect to go with the smart contract
but our my nft Marketplace is a big it
needs a lot of data okay there is a lot
of functionalities there so we need more
Rover smart contract which can handle
all of those things for that what I have
done first we'll start working with this
basic smart contract we can connect with
the front-end application and create nft
cell nft and all those things whatever
we have right here in the smart contract
first we'll start working with this once
we will done with this basic smart
contract then we'll move to the API okay
so here you have two options first
option that you can store all the
information about your application in
the smart contract like the followers
like the collections category everything
in the smart contract and from there you
can fetch a display in your front-end
application or you have the second
option instead of writing a new smart
contract what you can do you can store
those creators or category user
information in the back end and from
there you can fetch and display in the
front application but I will show you
that how you can do in both way so first
we'll start working with this basic
smart contract for our nft Marketplace
once we connect and everything starts
taking shape after that we'll start
working on the backend development we'll
build an API for our nft Marketplace and
after we build an API after that we're
going to redesign the smart contract
right to the actual data we need to
display in the front-end application
because I want that the entire
application is controlled by the smart
contract not by any backend API okay
every single data we can render on
display at transaction two that's all
controlled by the smart contract okay so
that's why I keep that part into the end
of this section because I want you to
understand how things works in the smart
contract how you can render data how you
can create nft all those things with the
basic things once we're done with this
basic one then we'll move to the
advanced one and where we're going to
write all the functions like we're going
to write the function for the category
collection all of this thing okay so I
hope so far everything is clear what I'm
approach I'm taking if you have still
any confusion do leave in the command
and ask me because this is a very
crucial point and you have to understand
that what plan we are following to build
this application because we have to
follow a proper data model okay
that's very important for performance
purpose okay so let's come back to the
application here I have opened the
application and let me show you what I
mean so what I will do I'll click here
and go to the collection page and here
you can see that we need data for the
collection page we need this pricing we
need the total item we need all these
nft details like nfts art music Sports
Photography right now we are doing this
hard code but we need this data from the
API from the smart contract not from the
API okay so we need going to remodify
the application for the collection page
as well same goes for the other Pages if
you come here go to the author page here
you can see we need a lot of details
about the authors like account address
titles their social media icons and
these following tabs so we need the
Collectibles created like follower
following so we need all this data from
the smart contract okay and if we go to
The infp Details page and here you have
noticed one thing we have we need a lot
of data for the nft detail as well so we
need the collection time or auction
bidding and if we scroll down here you
can see this virtual world and here you
can see we need bidding history on our
list so all these data we need and if we
and here you can see we need a function
which can install all the information
about the user the Creator like name
email description websites all this
thing so here I have opened the project
directory and in that you can see that
we have three different folder one
folder for the API second folder is for
the smart contract and third folder for
the template so what I want you I want
you to create a copy of the template so
if we commit any mistake in the template
we have a backup okay so for that
purpose create a copy of it and that's
what I'm going to do so here we have all
this folder okay so let's create a copy
of this template so I'll copy and paste
and here I have the copy of the template
now let's simply rename this one and I
call it let's say connecting contract
Okay the reason why I have given this
name because in this we're going to
connect with the Smart Control obviously
okay and that's the folder we're going
to open in my code editor so let's open
here we are back in the code reader and
you can see we have all the folders for
the templates but we don't have the
contract okay so we're going to import
the contract here okay so we we have all
these folder for the templates Now open
up the terminal and let's run the
application so clear the terminal and
to see everything is working fine let's
click on this and here we are on the
browser and things are looking fine we
don't have any issues all the functions
are working fine let's close to the
and these are also working fine so
things are looking pretty good okay
you can easily able to switch open close
and things are looking good okay now
let's come back to the coordinator
and now let's come here clear the
and now we have to install couple of
important packages which allow us to
communicate with the blockchain okay so
the first package we're going to install
is harder and harder is very popular
it's allow you to test a smart contract
it will give you a local blockchain
where you can test the smart contract
okay so let's initialize that so for
that I'm going to type let's say npx
hard hat in it so if you have installed
harder in your computer then you have to
run the command npm install hard at and
then you have to initialize I have
already installed Hardware Global in my
computer so I can start I can initialize
directly so let's initialize that hit
indoor and this will take a little bit
of time okay so here I want to create a
normal file so let's create a JavaScript
hit enter hit enter and we have to
install all the recommended npm packages
so simply copy and we have to install
this one copy and we have to install
head into this will take a little bit
time so let me do fast forward so
installing and here we have successfully
installed harder and now we have to
install couple of more packages like
ether JS and we need to install web3
model okay so let's install that
nbm I ethers head into now close it and
we have to install web3 model so web3
model install Okay installing now here
we have installed the web3 model and
etherges so bring the terminal down and
and once you've successfully initialize
hard hat it will create couple of
folders and files for use like this
contract folder was not there but after
initializing harder we have this
contract folder we have another folder
called Script and we have another folder
called test and we have another file
which is a readme file so when you
initializing hard hat on that time make
sure that you should delete that readme
file I was already deleted that that's
why you haven't seen so make sure before
you initialize hard hat you should
delete that readme file and then you
should initialize otherwise Hardware
will not initialize okay it will give
you an error so we have this folder if
we bring this terminal down and if we go
to this contract folder and inside the
contract we have this lock Source smart
contract so this is a general smart
contract you can have a look that what
they are doing here okay but we're going
to import our contract which we have
already built so let's delete this
folder we don't need this one delete
okay so we have deleted that and here we
have the another folder which is a
script inside that we have a file deploy
okay so we're going to modify this and
this script will allow us to deploy the
smart contract okay so let's simply do
one thing delete this comment and delete
this command as well and we don't need
this extra data okay so I'm going to
delete it if you want you can keep it
but I'm going to delete this one okay so
that's the basic setup for the deploy
script we're going to do a little bit
more modification here but that's for
the letter part okay so that's the
deploy script and if I closer and if I
go to the next folder this is a lock
test file okay so if you want to test a
smart contract that's we can do it here
which we're going to do definitely not
now but later okay so and that you will
find you're going to write all the
scripts so this is the file so we don't
need to worry about this okay so simply
close this one and this is the harder
config file so here we're going to do
all the configuration for the hard hat
so if we when we deploy the smart
contract to the local local blockchain
on that time we have to Define that when
we have to deploy the smart smart
contract to the rinky buy or any test
Network so we have to Define support a
couple of properties here okay so that's
all we're going to do here I'm just
giving you a quick overview okay don't
need to worry about because you and I
we're going to do it together so this is
the hard config file and that we're
going to do all the configuration okay
so let's close this one and if we come
let's open this contract we already have
the contract and now open this in the
we have a contract here okay we have
already have this contract now we're
going to Simply close this one okay we
have all this contract close this one
are we going to Simply drag and drop
here again drag and drop in the main
directory okay simply copy don't remove
so here we have the contract and simply
open and here we have the salty smart
contract but we need to install a couple
of packages in this smart counter you
can see we are using open Zeppelin but
we don't have open zipping but we have
so this is the Smart contract we have
here things are looking fine now simply
do one thing here you can see we are
getting the error for the open sampling
we have to install that okay so now
let's close this one and come back to
the smart contract and close this one go
to this packages and file and this is
the package we have to install I hope
you guys have this folder so this is the
one we have to install so simply copy
copy this come back open up the terminal
open Zeppelin contract hit enter and
and here we have installed the open zip
link now simply clear the terminal and
if you come back to the contract here
you can see we don't have any error
things are looking fine okay let's come
to the readme file so this readme file
is created by harder so make sure you
delete your previous readme file and
then initialize harder otherwise you
will get an error so in this readme file
you will find couple of commands and
this is the command we're going to run
shortly okay so you will find this
detail this is the help test and this is
the harder node for internal for the
local blockchain and this is for the
so that's the readme file okay so simply
copy this and come back split the
and now here we're going to run this
so hit enter this will start the
blockchain locally in your terminal so
here you can see once you initialize
that it will give you 20 accounts with
private key okay so here you can see we
have all these accounts so we have this
account zero and each account content
1000 ether obviously it's a fake ether
which you can use to test a smart
contract okay which we're going to do
so we have all this account which is
going to use it for testing the smart
contract okay and we have the private
key so you should always make sure that
this drumler should be on don't stop
this otherwise it will not work so make
sure your local blockchain should always
run okay otherwise it will give you an
so all these accounts we have and let's
and before we do that we have to do a
couple of changes in the deploy script
okay so here in the smart contract the
name we have given to our smart contract
is this nft Marketplace okay simply copy
this one and come back to the script
and go to this deploy and here we have
to do a couple of changes okay so here
we have to provide the smart contract
so what we're going to do we're going to
Simply change this to let's say nft
smart contracts or anything smart
contract and here we have to change also
and here we have to remove this extra
data we didn't need to pass in data in
the deployment okay and here we're going
to change this to nft Smart contract but
and we are not passing it simply copy
that's the display screen let me simply
remove this portion and here we're going
contract address so here I want to
console log out the so contract address
and we're going to change this to nft
Marketplace so I want to get the
contract address okay and that's I want
to console logout in my terminal so I
can use it okay there is a lot of
you get when you deploy the contract but
right now we are only focusing on the
so that's the deploy script we have and
okay so far everything is looking good
no problem we have here now close this
one and come back open up your terminal
make sure that this part of the terminal
should be running otherwise you're not
able to deploy the smart contract okay
and let's bring this site come back to
this terminal and here we have to write
the command Okay so type clear terminal
come here go to this test and simply
copy this NBA card at run script deploy
and after that you have to define the
network so where you want to test your
smart control or deploy a smart contract
so in this development we are going to
use the local localhost okay we're going
to use our internal browser to do the
testing okay so first thing we have to
define the network dash dash so this is
the script you have to write and we have
to type that let's say dash dash Network
and here we have to define the network
name so we're going to use the localhost
so we'll call it localhost if you want
to use it to Rinky buy or other test
Network you can do that so let's type
as you can see downloaded compile
and here is the compiled successfully
and here we have successfully deployed
the smart contract and here you can see
the address of the smart contract so
make sure you should copy the address of
the smart contract okay copy that and
and build that terminal close this one
and now we have to create one more
folder okay in the root directory
and this time we're going to call this
so in this we're going to make all the
connection with a smart contract in this
folder okay so we have this context
folder and we'll create two files so
first file we'll call it let's say nft
and let's call it context dot Js okay
and we have to create one more file this
and inside this constant folder we need
to paste our API so let's give this
command and let's have our have our
and that's what we have here and once
you deploy the smart contract
successfully after that you will have
couple of folders and files so you can
see right now we have this artifact and
so let's close this one and here in the
artifact you can see we have this couple
of folders so the packages we are using
in the smart contract we have here okay
this is that you can see able to see
inside the inside the token we are using
ERC 721 extension so all this thing
whatever we are using that's all we have
here which you don't need to worry okay
that's all things are happening
so close this is the utils folder so we
are using counter in the smartphone
track so that's what we have again you
and that's all we have here simply close
this one but the one we want to focus is
is this contract so inside the artifact
we have another folder contract and
inside that we have the ABI of the smart
contract okay so this is the API nft
Marketplace jsons so okay the second one
so here you can see this is the ABI of
our smart contract which is very
important okay you can have a look
whatever function we have defined
whatever variables we have defined
that's all we have here in form of API
simply close this one and come here and
simply drag and drop in this context
folder okay simply move it and say move
so right now we have the eBay in our
so here we have the API simply close
this one and if you come here close this
one now come back to the context file
and here we're going to import that API
so let's call it nft Marketplace and
that's coming from the same directory so
we have this Json file now we have to
export the contract address and the
contract API so let's do that so we'll
say const we'll have nft Marketplace
address and here we have the address
already so we'll pass it in a string
okay and now we have to pass the API so
nft Marketplace will call it API and
here we have that nft Marketplace inside
so here we have the if we come here and
we go all here so here we have the API
so that's what we are importing
so that's the only setup we have to do
if you have multiple contract that's all
import we're going to do and export from
here but right now we have only this one
so we are going with this okay so let's
close this one and now all the logic
we're going to start writing in this nft
Marketplace context okay so this is
going to be the place where we're going
to communicate and bring all the logic
so simply come here and type our AFC
we have to import couple of things from
react new state use effect and we need
to use context let's come down we have
to import the packages so we need let's
say web3 model OKAY import web3 model
and that's coming from web3 model we
have already installed we have to import
the ether.js and that's coming from
okay now we have to import the router
and that's coming from next router so
these are the internal input now Supply
come down and now we have to do the
internal import so we have to import the
API and the address from our constant so
let's do import and it's called nft
Marketplace context no what it's called
so here we have nft Marketplace address
simply copy that and that's what we're
going to call and this is coming from
the constant in the same directory okay
will come here we have to import the API
and that's also coming from the same
file so that's the internal import we
have that's interval simply delete this
one okay because we don't need this and
we're going to use create context for
managing the state and all the data okay
so welcome down we're going to call it
let's say export const and we'll call it
nft Marketplace context and we'll use
create react create context so that's
and welcome down we'll take another
export and we'll get a nft Marketplace
and it's going to be another function
inside that we're going to send the
children so children and it's going to
be an error function and instantly and
we want to return it data function and
and here we're going to call this nft
and inside that we're going to pass the
children and here we're going to call
let's say not value we have to call
provider and then we have to pass the
value so whatever data we're going to
pass inside the value that would be
available in the entire application in
every component we can easily able to
call the data okay so that's the
approach I'm taking okay so we have our
context we have our provider and we have
the children and we have the value in
which we're going to pass all the data
so right now we are just setting up the
stage and later we're going to utilize
this stage for getting and sharing the
data okay so hope so far everything is
clear if yes then you guys should hit
like And subscribe and do give your
comment if you have any confusion I'll
try to explain one more time because
this is a very important part which you
have to understand then it will make
it will not make sense okay so that's
to see the working example of this
let's let's come back here and go to the
pages and here we have this app so what
we have to do is we have to use that
provider and wrap the entire application
then only we can easily able to share
the data okay so let's close this one
and here we're going to import that
provider so let's come here so here we
have this nft Marketplace provider so
simply copy this one and come back here
and we have to import so we'll call it
import and that we're going to call this
provider and that's coming from the
let's say dot dot slash context context
and we have the nft marketplate context
okay so here we have the provider and
now we have to wrap the entire
application with this so simply copy
this one and call on top of navbar
provider close this one and cut this
and paste it so in this way what will
happen whatever data will share inside
the value that would be available in the
entire application in every single
so that's the best part of this so here
we have the provider that's the only
so to show you the working example what
we can do here so let's come up here and
take a variable I'll call it let's say
let's come here and go to this note here
wait is it component in the hero section
so we have here hero section and here
here you can see we have H1 discover
collect and sell nft okay simply copy
and come back here and we're going to
so we have this title we have a data and
simply copy this and that's what we're
going to send here inside this value
so here we have the data we are passing
it and this data would be available in
every single component in the entire
application let me show you how it works
so we'll come back to the hero section
once again and here we're going to
import the context so let's do that so
here we're going to import couple of
so we need this use State we need this
use effect and we need this use context
so we have this three components now
let's come down and let me give the
comment I'll say smart contract import
and here we're going to import that so
take the bracket and come back here and
here we're going to take this nft
Marketplace context simply copy that one
dot dots slash dot dot slash context and
nft Market context so here we have that
and now we'll come down here we'll say
const and welcome back to this and
simply copy this to data we are passing
so copy this so you can pass anything
you can pass function you can pass data
you can pass array a lot of things you
can pass whatever you can pass here so
we're going to copy this and we're going
to receive here and here we're going to
use context and in that we're going to
use this nft Marketplace context
for the data okay in this way we can
easily able to receive the data in this
hero section and now if we come here
let me show you without that okay so let
me start the application make sure you
you keep running this this terminal this
internal blockchain okay and this clear
this terminal and here we're going to
open the application in the browser and
here you can see here we have open the
application and we don't have that title
okay we have this image emoji but we
everything's looking fine but we don't
have the title now we'll come down let's
bring the toment down and here we're
going to pass this data simply copy and
here we're going to pass it save it the
moment you will see in here you can see
we have the data okay so things are
and that's how this context works and
this is what we're going to use
throughout this entire employee entire
when we get the data from the smart
contract this is how we're going to
receive the data in multiple components
so that's what we have here okay so
that's the only thing I want to cover in
this I want you to understand this which
is a very important that how we are
planning to take this course ahead how
are we going to share the data for the
contract so these are the these are the
important things you have to understand
and in the next video we're going to
talk about more about this web3 model
packages which we are using so we're
going to talk about the three models
we're going to talk about ether.js we're
going to talk about hard hat because
that's the thing you have to understand
that how everything works behind the
scene so when you will sit for the
interview and when you will show this
project so they will definitely going to
ask you that you are using this
dependency how it's work so in the next
two videos to the three videos we're
going to talk about this the three model
e3js infura ipfs because we're going to
use ipfs a lot we're going to use
inferior a lot for connecting with the
blockchain okay so in the next three
video we're going to give Focus
more in that then we'll start working on
this okay so we're going to talk about
so hope everything is clear so far if
you have still any doubt do leave in the
comment section I'll try to explain one
more time because this is a very
important part which you have to
understand once everything is cleared at
this point then you can easily able to
build the application very fast okay so
that's why I have taken so much time to
explain all of these things at how we're
going to plan the data modeling for this
on the last video we had done a basic
configuration for sharing the data in
this entire application okay so we have
set up our create context for sharing
data into different components you are
at the same place where I am and let's
get started so here I'm going to let's
do one thing open up the terminal and
let's bring it up so here you can see on
the right hand side we have our local
blockchain where it's running make sure
it's keep running then you can easily
able to work okay and on the right hand
side we have our application running so
let's bring this down and create one
more terminal okay separate this and we
need to install couple of packages okay
so here what I'm going to do is I'm
going to Simply clear the terminal and
I'm going to install this npmi ipfs
because when the user will upload the
data or the images or the nft we want to
upload that data to the ipfs okay so for
those of you don't know what is ipf is I
will make a complete video on each of
these packages because these are the
very important things which you have to
know when you will go in the interview
they're going to ask you this this kind
of things that what is ipfs what is
peer-to-peer and how you can utilize
this ipfs in your blockchain project
okay so I'm going to Simply install this
one this might will take a little bit
time and and here we have finally
successfully initialize or install ipfs
in our project now simply clear the
terminal and we need to install one more
thing is which is a let's remove this
one and we need to install axis which
allow us to do the API request okay so
we're going to use we're going to do the
as a very powerful package you guys must
have heard about it and that's what
we're going to use so here we have
installed let's clear the terminal and
simply close this terminal and make sure
this two terminals is running and bring
this down and here we're going to import
those packages which we have installed
so first thing we're going to import the
let's say we have to import the axis and
that's coming from axis now we have to
import that ipfs so here we're going to
import the create and we're going to
import as a ipfs HTTP and we'll call it
client and that's coming from the ipfs
okay nothing new we are importing that
this that's the external port and now
we'll come down here and bring some
space and now we're going to do the
internal import so we're going to import
the API and the address of the contract
Mark contract okay so here we're going
to write the function which allows us to
fetch the smart contract okay so that's
what we have we'll call it fetch
contract and we're going to provide the
signer or provider we're going to use
this new ether package and we'll call
the contract and inside this we're going
to pass inside this we're going to pass
the address of the contract and the and
the ABI of the contract which I think I
don't have right now okay so let's
let's import that quickly so let's come
back to the constant and here you can
see here we have the nft Marketplace
address and empty Marketplace API so
we're going to Simply copy and insert
this and that's coming from the constant
and now we have to import the ABI so
that's what we have here and that's the
exact thing we're going to pass in the
contract so simply copy that and pass
here okay we have to pass the ABI we
have to pass the sign in provider so
that's this function will allow us to
fetch the smart contract okay
so that's the whatever we are doing we
are just setting up this stage so we can
utilize this function in our letter code
okay so that's the fetch contract
function now let's come here and I'm
going to create one reusable function
because we need to communicate our smart
contract with the front-end application
so for that for the wallet okay so for
that what we're going to do I'm going to
abstract the code which is repetitive
okay so if I will not extract this code
we have to write this code over and over
again in all the functions like create
nft by nft transfer nft okay so what I'm
doing I'm just abstracting this code and
creating a separate function so in that
way we have to write less code okay so
just don't don't be confused just follow
along with me okay so I'll call it let's
say connecting with smart contract okay
this is the comment I'm going to give
this kind of comments throughout the
entire course so you guys will navigate
very easily so that's what we have we're
going to call this one connecting with
smart contract very generic name and
it's going to be an async function
because we have to deal with the data
and asynchronous behavior so we'll take
this try and catch so if there is some
sort of error while fetching connecting
with the contract so we have to get that
error okay so right now I'm going with
just try and catch but we're going to
when we build the API on that time we're
going to create a global error handling
very complex model not complex model
very beautiful system which can handle
all the errors of our application okay
so in this we're going to Simply console
error so we'll say something went wrong
contract okay that's the message I want
to display anytime we have any kind of
error to come down and here we're going
to take another variable we'll call it
web3 model and that's coming from new
web 3 and this is the function we have
to call so here we have this web3 model
we're going to Simply copy okay it's a
capital and replace replace this Capital
so here we have the web 3 model and it's
so again I'm not explaining this web3
package in detail because this package
is really huge okay so I'll make a
separate video and that I'm going to
explain that how you can utilize it in a
more advanced BK I'm just using couple
of properties which it has to make
things work okay so I'm not going to get
so here we have that and here we're
going to create the connection so we
have a weight and we have this web 3
model and we're going to call this
connect function now we'll come down
we're going to create the let's say we
have to create the provider and this
provider is coming from new we have to
call this ether package which we have
and we'll call it providers dot web3
provider and in that we go to pass the
connection so that's how we got our
provider now let's come down here we
have to come and we have to create the
signer so we'll call it provider.get
signer so whoever will interact with our
smart contract became the signer okay
okay so that's what we have here now we
have to create this contract and finally
we have to fetch the contract so in that
we're going to pass the signer so that
contract will interact this particular
user and here we have this one and that
we are passing the signer or provider
okay so that's what we have and now we
have to return this function so return
so now this function is a reusable
function and we can use whatever we want
in this entire application okay
so that's the abstraction part of the
so let's close this one and let me show
what are the properties we'll get once
we call this function okay so for that
let's close this one as well and for
that what I can do I can come here I can
come here and I'm going to create a
function and this function I'm only
creating to show you that what
properties will get when we'll call that
contract function okay only for that
purpose I'm creating this function to
show you okay so we'll call it let's say
contract it's going to be an async
function and here we're going to call
the let's say we're going to call this
function okay so we're going to take a
variable we'll call it contract here we
have the contract and we're going to
call this a weight and we're going to
and I want to console log out all the
from this contract okay so let's call
that so that's what we have here now
let's come up here and that's what we're
going to pass this function here so we
can receive in the index page so let's
come here go to this index page and here
we're going to call the functions so
before we call that we have to receive
the function and this setup we have
already done in the last in the first in
the first video sorry in the first video
so if you haven't watched that make sure
you watch this is the second part okay
so here we'll call the function and here
we're going to call the EU State we
already have here now here we're going
to call that U State and it's going to
be an empty area and then we're going to
call this function check contract and
it's going to be an empty array okay
let's save it now come back to the
browser and as you can see here the
metamax is got open because we are
calling the smart contract and when the
smart contract is getting called our
web3 the package we have installed with
three models it's automatically tried to
connect the application with the
metamask okay that's the world we have
actually I have in my browser so that's
getting popped up okay so it's
automatically getting open and now here
just wait I have to put my credential in
this make sure you put here so what is
microdential okay let's type that and I
have to Simply unlock this so the moment
I unlock it will let's see let's do the
inspect element and let's come here and
here you can able to find couple of
things okay something went wrong while
connecting with contract okay because
first time when the application got the
metamask got opened on that thing we are
we were not connected with this
application okay so what I will do now I
I'm going to reload the page okay so
let's come back here and review the page
so the time I will do this is still I
have no information about the contract
why so we not have that and let's come
here okay my bad because I have not
called that contract in my console okay
so let's do that simply copy and simply
okay so here we have called that and
here you can see we have that
information so here we have the contract
and it's contained all the information
about the smart contractor you can see
the address so this is the address of
our smart contract we have created this
approved functions and balance of
functions we have created all the
function which you will find right up
here in the smartphone okay in this here
so fetch my ft market items listed item
estimated gas create token so all the
function you will find which we have
created in our smart contract and this
becomes only possible because we have
installed that web3 model and we have
used that connection okay properties
don't need to worry about that web3
model it's a beautiful package and it's
a powerful package we're going to
discuss more in the separate video okay
okay so that's all the data we can is
able to have here and we can easily able
to use in those property and interact
with the smart contract so that's what
we have so let's come here we don't need
this one it's okay simply comment this
actually remove this one we don't need
this actually remove this as well let's
come here go back to the nft Marketplace
context and from here we're going to
remove these functions and we have to
remove it from here as well so that's
now we have the clean environment and
now we can start working on it okay so
we have this two function fetch contract
and connecting with the smart contract
and now we'll come here and we're going
to start working on the actual function
okay so the first function I want to
create is before we create that we have
to create a couple of few States so
usted will create that is current
account okay so whoever will interact
with the smart contract or interact with
the application we want to get the
so that's that's what we have taken it's
going to be an empty string and now
we're going to create a function which
allow us to check whether the user is
connected with the application or not
okay so we're going to create a function
for that so let's give this message
check if wallet is connected okay so
this function will check whether the
apply whether the wallet is connected
with the application or not okay
so it's going to be a const and we'll
say check if wallet connected so very
generic name and it's going to be an
async function and and that we're going
to take this try and catch because we
want to handle the error as well and
here if I'm going to console log out
that let's say something like something
let's say something when something wrong
to wallet okay now here we're going to
write the logic for that so I'll take
this let's say if windows ethereum so if
we know that ethereum is not there then
we want to return this error message so
I'll simply say that install
mask okay if we don't have that windows
or ethereums I will show you that what
it is exactly and from where you will
get this object now let's take that but
if we have that window dot ethereum then
we want to get the account so we'll take
this account and we'll call this a
weight window dot ethereum we have to
request and here we're going to call
this method okay so the method we're
going to call for getting the account is
it Dash accounts okay ethnot R okay in
this way we can get the array of
accounts so okay this will give the
array of account it could be have more
than one account so for that we have to
build a condition okay so let's simply
come down we'll take a if you will say a
account length if there is an account
length then we want to call the set a
current account and we won't take the
first account okay else we want to say
simple JavaScript nothing fancy okay
hope these things are making sense okay
window.ethereum from where we are
getting this okay simply copy that and
come here and reload the browser and
and here we're going to paste that so
let's copy this one and come here and
paste it so you can see I'm getting this
object and you might be thinking from
where we are getting this object so the
moment you install this metamask that
metamask will inject this ethereum
object in your browser okay and with the
help of that you can easily able to
detach whether they have any kind of
web3 wallet or not okay so this object
is coming from metamax if I remove meta
marks I will don't have this object okay
if I open this if I open this you will
find tons of property so you will have
the chain ID you will have enabled
metamax is true because we have metamask
and all the network whatever Network you
will connect in with whatever network
will inject this this provider this
ethereum object they will be become true
okay and it will find the address
all these events you will find so you
so now let's come back to the code and
here simply we copy this and we have to
pass this function here so we can easily
able to call in our main index page okay
so they call it here now that's the
check wallet connect function now we
have to create another function which
allow user to click on the button and
connect with the wallet okay so you
should always have this two function one
it will automatically check the account
and the other will have a function which
allows user to click and connect okay so
let's create the function so we'll call
it ah connect wallet and function okay
we're going to say current prediction
it's going to be an async function and
async function and we have to take this
General convention and we have to Simply
display the error message we will call
it less something error while connecting
to wallet and here we have to do the
same check okay so here we have to write
the same piece of code so what we can do
we can come here and check if wallet
connected and here we're going to copy
this part okay this entire if statement
okay copy this one and come back here
and simply paste it the same if
statement we have to do whether they
have the metamask or any web 3 wallet or
if they have then we want to get the
account and here we're going to change
the method so this time we are
requesting for the account so we'll call
eat and we'll call it request
okay so here we'll get the array of
account and now we have to set the
account first of all we have to take the
first account so you have seen the
difference like in the above function
when we are checking the for the account
automatically on that time we are
checking with the help of length Okay
account.length you have both the option
you can either go in that way or you can
either be directly check this way okay
so here we have that function but here
we are writing simply okay you have both
and here we have that okay now once we
get connected an account is said we have
to reload the window okay so we'll call
this location Dot reload function this
is optional but it's always great to
reload it so everything will start from
so that's the connect wallet function
simply copy and we have to pass that
function here close all the functions
and here we go to pass it so that's the
two important function which every web3
application should have so let's close
this one and now we're going to start
creating the other important function so
this function will allow us to upload
the images to the ipfs once we upload
that they're going to return that image
and we're going to display it okay so
this is the reason function we are
creating so we'll call it let's say
let's come here here we have imported
this x is and we have this ipfs but we
haven't created the client okay
and here I'm giving you my personal URL
and here I'm going to create the client
and here we're going to use this ipfs
here we go to create the construct the
URL of the ipfs so we'll say http
five sorry not slash dot five thousand
one slash API slash v0 and this is my
personal URL which I'm giving you
because if you want to get this URL you
have to create an account on infuria and
from there you have to fill out the
credit card details then they will give
5gb data uploading data so here I'm
using this one so make sure you use the
exact URL or in the next video when I
will make a dedicated video for the
inferior where I will explain that how
you can utilize that infuri even in more
advanced way okay for a lot of things
for getting the data and connected with
the blockchain okay so in this way I'm
just six I'm just utilizing it whatever
I have but don't need to worry about it
we're going to make a dedicated video on
the web 3 Model we're going to make a
dedicated video on each Source hard at
infura ipfs I already have a video on
ether ether JS which I will link in the
iPad in the description where I have
explained every single thing about The
Ether GS package so you guys can
understand how you can utilize this and
we don't have any video about the infuri
I'll make a bit dedicated video on that
and I will talk about that how you can
create your own inferior URL for the
ipfs okay so just utilize this URL for a
so that's what I have here that's the
exact URL you have to type this is my
client and now we're going to utilize
that client so let's come back here in
the function we're going to create a
function we'll call it upload NF to nft
and it's going to be an async function
and it will receive a file so whenever
we call this function we will get the
so when someone will use the Drop Zone
and it they will drop the image we'll
get the path of that images and that's
what we're going to receive here okay
and here we're going to create this try
and catch which is a general convention
and we have to say like error uploading
to ipfs okay and here we're going to
variable called add and here we're going
to call the a weight client this is the
client we are calling and here we're
going to call the method to add which we
and in this we're going to take this
content and here we're going to pass the
so that's the path and here we're going
to take another one and now we are
constructing the URL okay so it's going
to be on a template role http
dot infuria dot IO and it's say ipfs
slash and here we're going to pass the
path okay so this is the address the
main ipfs address and at the end we are
adding the file path so whatever data
in the path that would be available in
so that's how we're going to upload the
data to the ipfs okay so once the data
is uploaded okay now we're going to
so when we'll call this function in our
upload nft we'll get the URL there so we
don't need to extort the data and Export
and then receive we are directly
returning this URL so we can easily able
to get that URL in the ipf in the same
upload page and from there if you can
easily able to display okay so that's
the approach I'm taking here
so that's the function for the ipfs
simply copy this function and that's the
function we have to pass here so we can
receive in other components so let's do
one thing simply cut this one and we're
going to call this function right up
here okay so let's come here and we're
and we're going to call this function
right up here so connect wallet
so let's call this function and
so every we want to call this function
every time okay that's why I'm doing it
come here this is the function for
upload close this one and now we can
write the other function so let's come
down and this time we have to create the
function okay so this will allow us to
create nft by the name you can
understand so we'll take a variable
and it's going to be an easing function
and it will receive couple of data so it
so the reason why I'm getting the entire
data so this form enter would so this
form input is an object okay it will
have all the data about the name
descriptions price okay so it will come
so here we have the form input here
we'll have the file URL will also send
in this create function and we'll also
send this router okay so these are the
property this function will receive and
it's going to be a narrow function
we have to follow the same convention
try and catch we have to say console.log
and in this we're going to display the
error message so let's say error while
nft so that's the function we have and
deconstruct the data from the form input
because formula is an object okay so
we're going to deconstruct the data
we'll take that and we'll say name we
need we need the descriptions and we
need the price and that's all coming
so that's the data we have from the form
input now we can to check we have to
check that whether the users who
creating this nft are providing all the
data which is required to create nft
okay so we check for that before we
description is not there and price is
not there or file you are is not there
if we don't have if we are missing any
one of these property then we want to
Simply return this message okay we have
DOT log and here we're going to say data
okay data is missing so that's the check
we are doing once the user provides all
the data we want to execute the function
further so let's come down and we'll
take another variable we'll call data
and here we're going to take that data
and convert that into a Json okay so
we'll call it Json dot in stringify and
in that we're going to take this object
and in that we're going to pass the
entire data so name descriptions and
we'll pass this image as well so here
what I'm doing here we have the file URL
I'm going to convert that file URL name
to the image okay so this is how you can
do it it's a normal JavaScript okay so
here we are converting that into a
string adjacent so once we have the data
like this now we can come down we're
going to take this try and catch again
we're going to do take this one and
we'll say at the same convention we have
to follow which we have followed in the
upload to ipf is okay so added it's
gonna be a weight we have to take the
client and we have to take this ad and
we want to pass the data okay so here we
have the data and now we'll come down
and we need to convert a construct the
viewer of this entire information so
this URL will in this URL will have all
the information like name description
price and the image is okay it will have
all the data whatever data will pass
that would be available so let's
construct the URL so we'll call it let's
infura dot IO slash AP ipfs slash and
here we have to pass the data okay so
added dot path so that's the URL we have
that's sending here and that's what we
so once we have that now we're going to
create this await and we're going to
call this function create cells
and we're going to pass the data URL and
price and you might be thinking from
where we are getting this create cell
function actually we don't have this
function right now we have to create
this function because this will be
responsible for creating this cell okay
and this function will execute
internally not externally so once you
call that function create nft this
run internally okay so in this we go to
so that's it for this function okay so
looking pretty good we are getting all
the data checking and we are converting
that and sending to the ipfs now simply
here we are getting some sort of error
okay so let's do one thing let's simply
remove this one and come up here and go
up and remove this try because what we
already have one try and catch and this
looks pretty fine okay so that's make
sure you do these changes okay
so here we have that function
things are looking so good let's have a
look one more time so we have to create
this fungus I play copy close this one
let's say let's copy this function and
now simply close this one and come down
and we'll say what is the name of the
function we have given credit sale okay
simply copy and come up paste here so
this is the function we're going to
create now okay create cell function so
we'll get say const create cell it's
going to be an async function and it
will receive data so it will receive the
URL it will receive the price so this
time I'm calling form input price and
you might be thinking that from where we
are getting this form input price but we
price only where you might be thinking
we have sent price but here we are
calling form Enterprise you can call
whatever you want but make sure the
order would be saved okay so here we
have the price we're going to call take
this another data is called is resale
and the reason why I'm taking this
approach because I don't want to write
the same piece of code over and over
again okay so this resale is resell will
allow us to do a couple of check that
which function should I execute and what
function the user is calling okay only
for that purpose I'm taking this so I
everything will make sense just follow
so it's going to be an async function
and you know the drill I have to take
this try and catch so we can get any
so let's say something like console
cell okay that's the basic structure we
have following now let's come up here
and here we're going to call this
function so we have created this
function connecting with smart contract
and that's the function we're going to
utilize now because this time we're
going to actually interact with the
smart contract so simply copy that and
let's scroll all the way down and we're
going to call that function here so
first thing we have to do is we have to
take the price okay so we'll take that
const and we'll call it price and we
have to convert this price okay so we'll
call it ether dot utils dot utils parse
utils and here I want to convert the
price into ether because you know that
whatever transaction you do on the
blockchain or basically on ethereum
blockchain that's happened in terms of
way okay so I want to transform this
price into ether so let's do that so
here I'm going to call the form input
price and here I have to define the
currency so I'm going to convert that
into ether so that's what I'm going to
do here we have the price of that nft
and we'll come down now we're going to
call this contract function okay so
and what is the name we have given to
the function so simply say oh wait and
here we're going to call the function
name correcting with smart contract okay
so in that way I can able to have all
the property of the smart contract on
this contract variable so let's come
down we're going to take this data so
here we're going to call the listing
pricing because we want to get our
commissions whenever user will create an
ft resell nft we have to get the
commission okay so let's get that as
well so here we have this listing price
and a weight and we have this property
let's come here open the contract side
by side so we can have a look what we
are working on and let's come here and
if I scroll down if I come up here and
here you can notice here we have two
function update listing price and get
listing price so we have to get the
listing price which we want to charge to
the nft creators okay simply copy this
function and come back here and we're
going to call this function okay so
we'll get the listing price exactly
and once we have the listing five and
here we go to do the magic we're going
to say const transaction okay
transaction and the reason why I'm doing
it this way because we have to do a
check you will appreciate this okay so
transaction we have to take this so here
what I'm saying is not reselling so if
user is not reselling their existing nft
they are creating new nft then I want to
execute different function but if user
try to resell the same nft which they
have created in the past then we want to
execute different function okay resale
resale token visual nft function we have
so here we have that we have this
contract in that we have the function so
let's come here if the user tried to
create if the user tried to create new
nft then you want to call this create
token okay function and you can notice
one thing that in this create token
function we have to pass through thing
one is the URL of the nft and the price
and that's already we have okay let's
come here and that we're going to pass
the URL and we're going to pass the
price and we have to define the value as
well okay so here we have to define the
listing price and we have to convert
that listing price to string that's the
first function but if user try to resell
then we want to call this a resale
function okay contract and let's come
back here and we're going to scroll all
the way down and here we have that
it will take the same property it will
take the token ID and the price so let's
come here and we're going to call the
function we're going to pass that URL
and the price okay URL is actually the
token ID okay and here we're going to
and we have to send nothing new We are
following the same pattern okay
so this is the reselling function we are
checking in this way we can easily able
to take a lot of code so in this way we
can easily able to save a lot of code we
don't need to write the same code over
and once it's done we have to execute
this function so we'll update
transaction dot weight and here we are
using this weight because we have to
wait till the transaction got written on
the blockchain okay so it's always
important that whatever function you
call and that function make any change
on the blockchain you have to make sure
that you use this weight okay so that's
the weight and that's the function for
everything's looking fine no errors we
have okay simply close this one close
this one close this one close this I
don't know why they got open simply
close this one right now everything's
looking fine but when we do the actual
testing with the smart contract on that
timing we find that we have to do any
changes we'll definitely come back here
so one thing you have to keep in mind
that the code you write it's not always
the final code okay you keep optimizing
for the performance purpose for writing
less code okay so that's what we're
going to do as well but just follow
along with me whatever we have done so
far okay so we're going to come down
we're going to create another function
fetch nfts function so what this
function will do it will fetch all the
nft which is created in the
on this application okay in this
Marketplace okay if you want to fetch
so we already have that function so
we're going to do this Fetch nfts and
it's going to be an async function you
know the drill and this time you don't
need to pass anything inside this it's
going to take this cry and catch and
a little while fetching nft where I'm
getting an error why okay I made a
spelling mistake in the async so simply
change this to async okay now things
looking fine let's come down
we'll take this variable and we'll call
this provider okay so we need to have a
provider then we can easily able to
communicate with the smart contract okay
so we'll take the provided new ether and
provider dot JCP okay Json RPC provider
we call and once we have that we're
going to pass that we'll call it
we'll call it contract and we're going
to call this fetch nft okay so fetch
contract function and in that we're
going to pass the provider okay
so in this way we can is able to have
the access of the contract now we'll
call data and here we'll say weight
contract and we're going to call this
data function so where it is the
function so where we have the function
or so this is the function we have so
it's half fetch Market item simply copy
and that function we have to call here
and let's come so log with all the data
we'll get here so I remember that we
don't have an nft so let's comment this
and let's come down we're going to take
this items and we're going to because it
promise okay so we have to resolve the
promise and then be able to get the data
okay so a wait promise dot all
and in that we're going to take this
data and we go to map over it it's going
to be async function and in that we have
to pass the property which we want to
get so we want to get the token
ID we want to get the seller we want to
get the owner we want to get the prize
we are converting this price and
we'll call it unformatted price okay so
the price will get it will come in the
form of big number okay so we're going
so we have the price and you might be
thinking from where we are getting so if
and here let's see come here here you
can see we are passing the data in form
of array Market item but if you come
back to the market item here in the here
we are defining all the data so we have
the token ID we have the seller on our
price sold so these are the data we are
returning from that array okay
and that's all data we are receiving
here we have the data now will come down
we'll take this cons token URI and we'll
call it a weight contract dot token URI
and in that we're going to pass this
token ID now let's come down we take
another variable this time we'll go to
call data and we're going to deconstruct
that okay so we have to say image name
description and it's going to be let's
say a weight we'll call the axis and
call get function okay where you get
that so token URI we want to pass it and
this will give all the data okay
and here we're going to take the price
and we're going to convert that okay
utils format unit and in that we want to
convert that to unformatted price
and I want to convert that to let's say
string and we're going to convert it to
same logic We are following here
so once we have the converted price now
we can come here and we're going to
return the entire data okay so you have
either two options you can return all
the data right up here one by one and
Save in a used it and send as a as a
data okay or you can return the entire
data and render in the in in the
component where you want so I'm just
running in returning the entire data
okay and in that we have to pass this
price we have to pass this token ID and
we have to convert the token ID to
number okay because it will come in the
form of big number now we have to pass
image name and the description and the
final is the token URI so these are the
data we are returning from this function
simply copy this and we have to return
as enter as a whole okay so we'll say
let's come down and we'll say return
so that's what we are returning so this
is the entire function we have for this
so this will give all the nfts which is
related to this empty Marketplace okay
so that's what we have and here we have
to pass the function and simply close
that and let's write the next function
so let's come here we're going to call
this function fetch my nft or listed in
Ft so now we have to create the function
which fetch all the nft related to a
and so we'll fetch that entry we'll call
const fetch my nfts all listed okay nfts
it's going to be an async function same
logic we have to follow and here we have
because we have to fetch two types of
nft one is one is the nft which is
created by the user and he owns that nft
and the other type is the listing if the
user put that nft for sale or whether he
have put not for sale okay so here we
have two version of the entities which
is related to the single user okay
that's why I have taken this type
and it's going to be async function same
logic we have to follow try and catch
and here we're going to display the
error message so we'll say error while
that's what we have here now let's come
here first thing we have to do is to we
have to get the contract okay we have to
get the contract so we'll say const
contract and here we have the contract
once we have the contract we have to
in that we have to define the type okay
is equal to let's say let's call it
items listed okay if this is the type
then we want to call this function
contract Dot and let's come here and
here we're going to call this fetch item
listed okay so we call this function
okay this is the function or else we
so my nft so here we have that function
so that's the nft simple logic I hope
and well come down we're going to click
this let's say items same thing we have
to do is here we have to resolve the
so we'll say await promise dot all
we'll take the data map over it it's
going to be async and it's going to be
let's say object will Define that token
and we Define the seller we Define the
owner we'll Define the let's say price
but it will come in the form of big
numbers so it will say unformative price
so that's the data we have and here
we're going to construct the token URI
we have the name we have the description
and here we're going to say oh wait
access dot get and in that we have to
pass this token okay I don't have that
okay sorry my bad I have to create the
token URI which I have not done so I'll
I'll come up here I'll say token URI and
I'm getting from here contract dot token
URI and then I have to pass the token ID
okay and that we will I have the token
URI and that I'm passing into this get
and this will give us the data okay
and same thing we have to do here we
have to return before we return that we
have to take this price and we have to
convert that into a ether okay utils
format unit and here we're going to
either here we have the price okay now
we have to return all the data so we'll
say return and we have to return the
price we have to return the token ID and
we have to convert it into a number
now we have to take the seller we have
to take the honor we have to take the
image we have to take the name we have
to take the description and the token
URI itself so this is the bunch of data
we are sending okay simply copy this and
now we have to send all the data as a
whole as a whole okay so let's come here
we have to say return items okay
so this will give us the entire data for
the my nft and listed ft simply copy the
function and close this one and pass it
so this is another function we have done
I hope so far everything is making clear
to all of you guys if you have still any
confusion in any point of these code we
do let me know okay give me the name and
explain your query that what's the
problem you have what's the confusion
I'll try to explain on that because this
is a very crucial part because here we
are interacting with the smart contract
and we are using XCS and extracting data
resolving promises to get the data from
the contractor so we can display on the
so that's what we have here now let's
close all the functions and now let's
so this is vdan so let's come here we
okay so this is the function we have to
create create Market cell okay we allow
a user to buy the nft okay so this is
the function we're going to create
simply copy that come here and we'll say
by nft so this function will allow the
so it's going to be anything by nft same
logic async function it will take the
data of the nft it will take and
try and cache we have to display the
error message so a little while
here first thing you have to do is to
and we'll say a weight we have to come
up here copy this contract function and
so simply remove this comma so here we
have the contract will come down we're
going to call this let's say price
and we have the price utils
and we have to convert the price and
this price we have inside this nft okay
we'll call it price and we have to
convert this into ether okay simple
now we'll come down we'll simply call
this transaction and we have to call
this function contract by function so
we'll come up here and we're going to
Simply copy this create Market cell
function and you can see in that we have
come here and we're going to pass the
token ID and we have to pass the price
okay we have to pass the price
so in this way the user can purchase the
token sorry nft and once we're done we
have to call this transaction dot weight
we have to wait after once the
transaction is written on the blockchain
so that's the buy function okay
so simply copy that and we have to call
so that's all the function we have to
write for our smart contract whatever
smart contract we have built so all the
and with this you are ready to go and
launch your smart launch your entry
Marketplace okay so now it's time to
connecting with this okay and passing
all the data so let's have a look one
we have all the functions we have
written and here you can see we have
a current account so we have to Simply
copy that and we have to pass that as
data as well so we can send it data so
we can receive another component and we
can build logic around that okay
so that's the account we have now that's
the details now let's close this one and
that's the okay fetch create cell get
nft connect wallet and here we have this
let's open this check if wallet is
connected and we need to console log of
the account okay so let's come here
let's come down below and we'll say
console.log and we're going to call this
Uh current account sorry current account
so we have to see that whether it's
working or not let's open the
application and make sure you should
restart the application okay and close
all the thing okay so let's do that so
I'm going to stop this terminal
blockchain and we're going to stop this
okay let's come here and we have to
delete these folders artifact and cache
okay any API okay because we're going to
redeploy the contract so let's come here
and we have to delete the cache okay
and we come back to the context and
we're going to delete this API okay
Json file okay and we're going to
okay let's come here type node
so just wait here we have the local
blockchain okay it's running now we have
to run this display the script deploy
the smart contract this is the command
you have to type nothing new
and it's compiled and here we have
deployed the smart contract and you can
see that we got the same address no
matter how many time you restart the
applications or deploy the contract
you'll get the same address sometime it
get differed it's depend okay so that
but that's really happened okay but
happen Okay so simply copy that and
come here and let's have a look do we
have the exact address so that's the
that's the ABA we have go to the
constraint and you can see we have the
address of the contract okay don't need
exactly let's close this one and we have
to clear the terminal and start that
application so type npm run there
and here you can see so far if this is
looking good let's do the inspect
come here go to the console and here you
can see we have these two but the
account addresses are not displaying
metamask and you can see we are
connected but still we have some history
and here you can see the balance is got
detected because the account number two
we have used to deploy the smart
contract and as you know whenever you do
deploy contract or do any transaction
you have to pay gas fee so here we have
pay a couple of ethos which is obviously
a fake either if you have that medicine
you are going to be a millionaire okay
so if we come if we log out and
so things are looking fine we are
connected we have this ether now but
still we have some Pro if we click here
you can see we are pointing out to this
but the account address is not
and let's come back to the code bring
this down and what I have to do is uh
to fix this one I don't know why it's
happening but we're gonna find it out
so let's come up here and simply do one
and simply copy this function and we're
going to call this function here pass
the function here we can pass this
function here so we can receive another
component and from there we're going to
call it okay so let's call the function
Let's uh okay that's what we have done
let's come here go to the index page
okay let's open the pages go to the
index page and here we're going to
receive the function so let's receive it
and here we're going to call the
function we'll take this use effect and
simply call the function okay
and here we're going to do the console
let's do the console log out the current
come back here and here you can see we
have the address so sometime it happens
so you have to figure it out a way to
make things work okay so this is how we
can easily able to get the account in my
and try to copy that address and paste
here you can see the exact address we
have okay 226 and this is the data okay
so we have the exact address now let's
come back to the here close come back to
let's close all this and now
simply copy this account so we already
have and simply delete this one console
I don't want to unnecessary comment and
now simply send this data account data
okay so let me copy and scroll all the
way down okay I have already sent the
so I can work around it so let's come
that the account function account we
have on using that account so now we
have the data about the account so
whenever user will connect to this
application will get the account and on
the base of that we're going to build a
logic okay so let's start with the
navigation okay so this is how we'll go
we have all the data all the function so
first we'll start with the navigation
then hero section and then we'll move to
so we'll come back here let's close all
these four pin folders and go to this
component okay and this component we
have this navigation and that's
navigation we'll go to the main
directory okay main folder so here we
have that navigation and let's scroll
all the way down where is the button
so here we're going to add a dynamic
button so if a user is not connected
with the application we want to display
a different button for connecting with
application but if a user is connected
with the application we want to display
a different button for creating nft okay
so here we have the simple button now
here we're going to build the logic for
so for that what we're going to do
uh first thing we have to receive the
data okay simply close this functions
so first thing we have to import that
data component okay so we'll call it
from Smart contract okay so first we
have to get the context and here we're
going to use this use context
and here we're going to import the file
what is the name we have called let's
come here and simply grab this context
Marketplace context and paste here and
that's coming from the nft marketplace
context okay so here we have the context
and now we're going to use this context
so let's scroll down and here we're
going to call it so we'll give this
so you guys can know what we are working
we're going to take that const and we
have to receive that data okay and
that's coming from use context and here
we have the context okay simply pass it
so the data we want to receive is this
let's come scroll down we want to
okay so that's the data we're going to
and simply copy that and come down here
in the button section and here we're
going to build the dynamic block okay
not if we're going to take this battery
if current account is EMT you don't have
any addresses in the current account
then we want to display this button okay
so we want to take this button
and we going to pass the name ptn name
so we'll say let's say button name is
and it will have the handle functions so
the function we want to call this one
so we actually we can come here and we
have to get this function connect Vault
function okay so we'll allow user to
click and connect so first thing we have
to receive the function here and then we
can easily able to use that function so
we'll come down here and we're going to
if user is not connected we want to
display this button and we'll have this
function on that button okay but if the
okay if the user is current assembly
copy cut this one and paste here okay we
so this time we'll call create and here
here we're going to import the link okay
because we want to redirect the user to
upload nft page okay so let's import the
a lying killing and that's coming from
next link and this is what we're going
so let's come up here and here we're
and in that we're going to call this
and we have to define the path in the
link okay where we want to redirect so
we'll take this href and we'll take this
object we'll say path name it's spark
name and here we want to redact to the
so that's the pretty simple function we
have here okay that's the only setup we
have to do here and it would be working
fine okay so let's come here and
heavy left close this one and here you
can see it's create but reload the
browser and let's have a look
so we have already corrected you can see
it turned to create because we are
already connected with this application
okay let's come here and let's click on
let's do one thing simply log out from
the metamask and renew the browser
and this time you will find that we'll
have different button will have this
connect if we click on this it will open
the metamask click on this and it will
okay it's not working let's do the
inspect element and let's have a look it
says that either while connecting to the
wallet means our function is getting
triggered but we have some problem in
because we can see the error message
okay so it's working fine we have to
things are looking good no problem we
have here now what we can do we have the
problem in the code so let's come back
to the code and go back to the this
current volt function and where it is
this is the check and close this one and
open this correct wallet okay okay here
is the problem we have it's account
request accounts I forgot to add s okay
now it would be working okay let's come
here cut this and reload the browser
and still we are not connected you can
yes it's still we are not connecting and
if we click on this here we have
metamask means our function is working
so just wait we can open that we can put
here we are connecting the application
we are reloading the browser and you can
see that the button is changed to create
and if we click on this button we can
easily we need not to return we are
having some error okay we haven't
defined that anal click function on the
button that's why we are getting this
that's not a big deal so so far things
are looking good now let's come back to
the code go back to this navigation bar
and here we go to define the head and
click function on the button
so let's click call the function handle
click and for initially we're going to
have this empty function we don't need
to pass any function here you can see
the error icon if you click on you can
you can't able to redirect to the upload
not a big tail we can fix that let's
come back to the code and do one thing
simply remove this link okay we're going
to use it later okay I don't know why
it's we're having this problem but we're
going to see okay simply change that
take normal anchor tag okay
remove that bring this down and paste
here and we're going to call that hrf
and we have to redirect to the upload
nft okay not home page okay so let's say
come here what we have called to that
page go to the pages and here we have
called upload nfts okay so that's the
exact name we have to call here upload
and now it should be working simply go
and simply just log in okay log out from
let's try the final time okay rid of the
right now we have this connect if we
click on this we can easily able to open
the metamask and we can easily able to
connect with this metamask let me put
here we are reloading browser I don't
like this reload we're gonna fix this
okay and we can click on this create
it's reloading and it's coming back to
the upload nft page you can see here on
the URL upload nft page and from here we
can easily able to upload the nft we're
going to change this Behavior okay it's
reloading because we have used that
anchor that's why it's having this
reloading but when we use that link link
like next year link we don't have this
reload okay we're going to fix that okay
it's looking fine you can see
things are looking good we can easily
able to redirect to this and we can able
we can easily be able to create the nft
okay so things are looking good we are
and let's come back to the home page and
this looks beautiful let's come back to
the code so with this we are done
close this navigation bar and with this
we are done with this entire Logic for
the nft marketplace context all we have
to do is to use these functions and call
in the component where we wanted to
render the data as upload nfts okay and
we already have all the status so now
we're going to use these functions okay
so so far everything's looking good
so first thing we have to do is to go to
this context folder inside that we have
this nft Marketplace context and this is
the function we have written in the last
video okay so all this function which
you can see that's all we have written
in the last video and here we passing
all the function with the data okay
so everything's looking so fine here and
we're going to close this one and first
thing we have to do is to open up your
terminal okay open up your terminal and
we're going to clear the terminal and
our internal blockchain so we'll type
npx hard at node we'll come this side
and we're going to redeploy the smart
contracts okay so let's deploy the smart
we're going to start the application
okay let's start the application type
run Dev and here the application is
started let's open it on the browser and
here everything is working fine as you
can see we are not connected with the
application that's why we can see that
connect button so so far this is looking
fine let's do the inspect element and
make it side by side so you guys can see
what we are exactly working on okay
let's bring this down and so far things
are looking fine and now what we're
going to do is we're going to add the
connect Vault function on this button
create button so this is where we're
going to add the function first so right
now nothing is happening we go to add
the function so let's come here let's go
to the component inside that component
we have this navigation inside the
navigation we have this sidebar okay so
we'll go to the snap bar and in that we
will take this data and that data we're
going to send as a prop in our sidebar
and let's come here we have to send this
function as well connect wallet
and these are the two functions we have
to receive in our sidebar so let's
let's receive the current wallet so here
we are receiving the data now we have to
do a couple of days simply copy this and
let's scroll close this one okay close
all these functions and let's come down
and here we have this two button okay
so we're going to add this connect
wallet function on the first button on
the create okay so we'll say if account
is empty same logic we have to follow
here then we want to add this button so
we'll save button and it will have the
button name so we'll call it connect and
it will close this one and it will have
the handle click function and that
function we're going to call this the
functioning we're going to call its
okay connect wallet function so this is
the function we're going to call on this
if we have an account then we're going
to call this function okay and we're
going to take this anchor tag so we can
redirect to the create page create nft
and here we're going to provide that
simple logic what we have called okay so
that's pretty simple logic okay
so far everything's looking good now
let's come up here and let's try to log
out with application and we are already
logged out and click on this you can see
this one is working fine we can enter
the credentials and just simply log into
the application and here you can see
and you can see if we click on this you
can see right now we have this create
means we are actually log into the
application that's why we are getting
if you click on that we can successfully
redirect it to the upload nft page so
the logic is working fine okay
nothing fancy we have already done this
so this one is looking fine let's close
close this one and come up here close
get into the pages and now we have to go
to this where it is upload nft okay so
now we're going to start working on
upload nft and allow user to create nftk
so this is what we have done so far
so first thing we have to report couple
of things we need to use effect use
State and use context and that's coming
from react now we'll come here and we're
going to import couple of things from
contract okay so import we need that
come here what we have called let's say
come up here and it's called nft
Marketplace context simply copy that
and simply pass here and that's coming
from the context directory okay nothing
new we have already done this and here
we're going to take the data we're going
use context and in that we're going to
parse this nft Marketplace context so
the function we want to receive here is
so let's come down so first thing we
need to have the function is upload to
ipfs okay so that's the very first
function we're going to receive
so that's the first function let's come
back here what else we need we need this
create nft so this is another function
we need here we're going to pass it here
okay so these are the two function we
are coming one will allow us to upload
to ipfs and the other one will allow us
to create okay and now what we go to
pass it here so both the function we're
going to pass as a prop in our in the
and we're going to pass this function as
nft as a props and this is what we're
going to receive in this upload nft okay
to ipfs and we want to receive this
component and these are the two function
just close this one and here we're going
to take a couple of view State okay so
we have to take the price so we are
taking price and it's going to be an
empty string and here we're going to
change this name from item name to name
only okay so make sure you do these
changes so we'll call it name select all
and here we'll call name it's here we
have to also change the name so let's
okay so make sure you do these changes
both in the state and both in the drop
zone as well so this is the change we
have to do and let's simply copy that
set price but before we do that we have
to take one more new state so this time
we're going to take this image okay and
it should be null and that's the use
so we have created price and we have
created this image and we have din uh
rename here in the upload images what
we're going to do is simply change this
one and we'll call set image and we'll
send the props to let's say set image
and we have to also send this function
upload to ipfs okay because the
uploading image we are doing in the drop
zone drop zone component okay so let's
send this function as well so ipfs
so that's the Drop Zones we have now
we're going to Simply copy this set name
functions and that's what we have to
replace here so let's replace this one
and we have this set price and what I
remember that we don't have the input
field for set price so we have to create
so let's come here let's close this one
close this one and we're going to create
here so simply copy and simply paste
here and here we're going to change this
to price okay select this all together
price remove this last s so this is the
what we have to do is so so far
everything is looking good now we have
this create nft function and that
function we're going to call here so
scroll all the way down and here we have
this two buttons so one for the preview
and one for the upload so we're going to
create the function here so it's going
to be enhancing function because it's
going to have a asynchronous behavior so
we'll call this and inside this we're
going to pass all the values okay
so pass the name will pass the prize
we'll pass the image will pass the
descriptions and here we're going to
import the router so let's come here and
we have to import router so we'll say
use router and that's coming from next
route okay and that's we're going to
take another variable we'll call this
router and we'll say use router and
simply copy and that's also we're going
okay because we are receiving router in
our create nft function so let's pass
that router we have to pass the let's
say website we have to pass the
file size and the last one is going to
and the final one is going to be
property so these are the data we are
passing right now our smart contract can
only receive four data name price image
description and router okay so when we
modify our smart contract and that we're
going to add all this property okay but
I'm just passing all the data here and
I'm going to commit few of them okay but
I just try to keep it okay so that's all
data we are passing in create nft so
that's what we have here and let's come
here and let's get into the Drop Zone
and here we're going to receive the
props which we have sent so we have
image already and let's come here we
have to receive this ipfl simply copy
okay so this is the ipfs we have now we
need to get this set image and we also
props and here we go to do the changes
so instead of having the image from the
as a prop so we're going to take it from
the folder simply so we have the images
so that's the profit we're going to
so simply remove this image we don't
need that one so so far everything's
simply rename that item name okay
because we have changed the item in
there so rename that and simply copy
copy this one and let's come down here
and here we have to change this name
okay so make sure you do these changes
and here we're going to call that
function upload my face simply copy that
and copy and simply paste it and it's
going to be in a variable it will return
the URL so when the when the image will
be uploaded to the ipfs it will return
the URL okay and once we get the URL
to the file URL and we are also going to
set this image to the URL so this is the
we are getting from the top sum very
simple not so complicated okay so
everything is looking fine open up your
terminal and simply stop the application
now we have to Simply redeploy the smart
contract so let's delete this delete
and we're going to delete this cache
and now we're going to deploy start the
internal blockchains and we're going to
deploy the smart contracts so let's do
it is compiled successfully we have to
and now we have to start the application
so let's come here and start the
and let's click on this and here we are
and so far everything's looking fine we
are not connected and you can see so we
have the connect ball click on this and
let's simply correct the application so
I'll type my credential so here I have
my credential click on this and I'm
logging to the applications it's
and simply click on this so here we are
redirected to the upload nft page so
let's get started and we'll come back
here bring this problem down
what we have to do is come back to this
simply remove this one okay because you
see that once we are connecting with the
application it it's reloading the
browser so for the timing I don't want
that functionality so I'll just simply
so right now it will not reload whenever
we connect the application okay
so let's come here reload the browser
so far everything's looking good let's
and let's make it side by side so we can
see what we are exactly working on
so let's click on this three Dot and
so right now we don't have any error
actually we do have one here so click on
this and here it say that help center
component is missing a key okay it's
missing a key so let's fix this one
and let's come back to the component
inside the component we have the snap
bar inside the number we have this help
center and that we are missing that key
so let's provide this key to this div so
key is going to be let's say I
plus 1 so everyday will have a unique
let's close this one if you reload the
page we don't have that error anymore
so you can see everything is looking
fine so far we don't have any error we
do have couple of warnings but don't
need to worry about it and here we don't
have the information now simply upload
that nft simply click here and I have
and I have already provided you this
images so I guess you guys will have
this one now so we create that and okay
so I have some issues while uploading
the image to ipfs so this is the error
message we have passed up error
so let's come back to the code and let's
and here we are uploading that
here we are displaying the hardcore
value let's change this to the actual
image which we are getting from the user
okay so what we have called let's say
this file URL here we have the data
and that's the image we want to display
simply replace this one and paste here
okay make the make sure you do the
changes and now reload the browser
reload the browser and just wait
so click on this and upload the images
till we are getting that error so as you
can see this error is coming from upload
to ipfs so there might be some problem
in the URL okay so that's the problem we
so what I can do let's close this one
so so far this is looking good here we
have the problem okay let's have the
error so let's log out the error
and let's come here and let's try one
so now let's upload the image
error message okay so we need to have a
project ID is required and because of
this we are not able to upload the image
the nft to the ipfs okay so let's come
back here and I did a little bit
research and what I have found that the
API the public API we are using this
public API we are using it's no longer
valid okay because after the merge and
after the update in the inferior you
can't use this public API to upload nft
okay you have to get your own API key
and let me show you how you can get that
okay but before we I do this before I do
that you have to do a couple of changes
so we have to change this one simply
comment this one and here we're going to
do a couple of setups before we get the
API key to that so we're going to take a
const and we'll call Project ID you have
to paste your project ID here okay
then we're going to create the secret
project secret key and that's the key
you have to paste here okay
so these are the key you need
and you also need the let's say auth and
this is the exact URL you have to build
Basics and it's going to be a dollar
sign and that's you're going to pass the
buffer from and this from is going to be
and then you have to pass this project
secret key so this is the setup you have
to do okay and it's going to be a string
it base 64. so we are just doing the
so these are the basics project and here
we're going to take the client ipfs and
here we're going to Define couple of
objects so first we have to define the
host host is going to be infura slash
dot PS and we're going to define the
port 5001 and we have to define the
protocol so it's going to be https and
we have to define the header and
okay so these are the setups you have to
do okay make sure you do this one and
here you have to provide your project ID
and secret key I'll show you how you can
get your so far everything's looking
fine and now we have to take one more
variables which is a domain okay because
when you will upload the nft to the ipfs
it will have your domain name
which you will create in your project ID
okay so I'll show you how I can do that
so let's create this let's call it
subdomain and here you have to pass the
URL of the subdomen okay so these are
the three thing you need you need the
project ID project secret key and sub
domain and before we proceed ahead we
have to do a couple of changes down here
okay so here we go to do the changes in
upload to ipfs okay please come and
remove this part and here we have to
type this subdomain okay subdomain the
variable you have taken on the top so we
have called subdomain simply copy that
and that's what exactly you're going to
so make sure you do these changes in
upload to ipfs that's the one thing you
have to do and here you have to Simply
come here and simply copy this host
okay complete this host and you have to
Simply replace this with this copy and
replace this one okay infura Dash ipfs.i
Okay so this is the host you have to
provide here you have to provide this s
okay https so this is these are the
changes you have to do make sure you do
this and this is the sub domain URL and
this is the setup for the client and
this is the project ID and project key
so to get our project ID and secret key
we're going to use infuro it will allow
us to communicate with the ipfs okay so
make sure you come to this application
and read about it they have explained
everything about it so I'll simply
create my account so this is my actual
account I'm going to create a new
account so let's click this and you have
to make sure you agree with the terms
and conditions click on this create
and once you're done with that it will
send you an email in your email ID so
let's caram and here you have to click
so congratulations click on this
and here you will direct to the your
inferior dashboard so simply close this
one here you have to do this formalities
so let's select this so engineer you can
select whatever you want so no specific
requirement okay and click on this
submit and here you can able to create
your project okay so what you want I
want to create a project to let's say
so I'm going to choose the ipfs and here
you can give the name of your project so
nft project click submit so here we are
back into the inferior and to get that
project ID and secret key you have to
enter a valid credit card number okay
they won't charge you anything for the
5gb okay so they will give you 5 GB
limit in a month if you exceed that
limit they will charge you very less
okay so make sure you enter your valid
credit card number and then save enter a
card number and if you come here here
you can able to find all the projects
which you have or if you have any
questions query you can that's all you
can able to find here so from here you
you can click on ipfs and you can click
on this and you can create from here as
course and if I come to the Explorer you
can see right now I haven't created any
project because this is my brand new
I have another account which is active
home okay so simply click on this select
the give the name to your project and
click on enter and you have to enter the
valid credit card number so this is my
active account now let me show you how
it will look so here I have already
created this project nft Marketplace and
here you can see all the requests I have
made all the nfts which I have created
and uploaded to the ipfs that's all the
data you can find here and if you go to
this project right now don't have it and
if you go into this you can see here we
are and this is how it will look once
you enter your credit card details this
is how the interface looks so once you
enter your credit card details you will
come here and here you can able to find
the project ID and key secret okay
secret key this is the infuri API
so make sure you get that and from here
you can easily able to set the limit so
if you want to set the limit as a quota
you can do that so let me save it to two
because I don't want to pay money for
using this ipfs and from here you can
easily able to enable the sub domain
okay so make sure you can give whatever
name you want to your sub domain so I'll
I'll call it something like
nft Marketplace okay so this is the sub
domain which I've created okay save it
and it's generated and that's all the
thing data you have to paste here you
have to paste your project key secret
key and your sub domain close this one
and close this one and simply next just
config file and here you have to do a
couple of configuration because we are
using external file external domain to
get the images so here we have to do the
configuration for that so what we're
going to do is I'll go to Simply copy
and paste the thing okay so this is the
image and the image will come from these
directory okay so this is my nft
subdomain and this is the actual
inferior ipfs okay so make sure you
write the exact thing instead of my
subdomain you have to type your own and
the inferior would be the same
so that's the configuration you have to
do in the next yes config file and here
you have to paste the project ID and
cigarette key so I believe that you guys
have got your secret key and project ID
key and subdomain once you're done with
that let's start using this ipfs okay so
here I'm back let's upload that image
click on this and select the image and
okay so here we are still getting an
error so now you can see that error is
not related to the I like the ID project
ID it's related to something else it's
related to Basics okay so I have done
something wrong in my basic URL in the
so let's come here and okay this is the
problem we have so make sure you provide
reload the browser and let's try one
and still we are getting an error okay
so this time the error is not related to
the basic not edit the project ID but
this time the error is related to the
the URL okay the configuration file
everything's looking good we have also
okay so we have also configured this one
if you click on this here it will come
and here you can see this is what we
exactly done in our next year config
file for the images but still we are
getting that error I don't know why
so but we can come back here so the
image we have uploaded to the ifs it's
in this URL okay so I'll simply copy the
URL and simply open the browser and
hit enter and you can see this is our
nft and it's on my domain dollar to send
nft Marketplace dot infurat ipfs.io okay
so the the ipfs work is working fine now
the only problem we have in the our
nextges config file so this is also
looking good we don't have any issues in
that okay so simply close this one and
close this one and simply come back to
this terminal code and let's restart the
application because I will I just look
for the code for the half an hour and I
found that no problem issue we have in
such scenario the only option we have is
to reset applications so let's restart
the application and have a look so we'll
run the blood local blockchain then we
have to Simply go into start the
and right now we don't have any issues
click on this and here we are now let's
and here you can see it's working fine
so sometimes there is no problem in the
code but sometimes you have to restart
the application and the error you're
having it will automatically get fixed
okay so whenever you get any kind of
error and you find that all the code is
working fine but still you are getting
that error make sure you restart the
application so here we have the image
working fine here we have to provide the
name if you provide the name you can see
you can provide the website I'll say
thusan.com here you can provide the
detail of this nft my first entity
choose the category provide the royalty
and style file size and property and
here we go to set the price so 23 123 if
we click we don't have that function if
we do this inspect element and here you
can see data is missing okay so
everything's working fine we can easily
error message as well so things are
looking fine we can easily able to
upload the image to the data ipfs okay
so let's come back to the code bring
this down and let's go to this close
and close this one and close this one
and let's go to this upload nft and here
we are calling the function so here we
are calling the function and you have
noticed one thing that we are only we
need only four data name price image
description and router sorry five data
to create nft so let's do one thing
so we have all this data here and we can
come back to this context in the smart
contract and here you can see we are
this url url of the nft and the price to
okay so need this two data we need so
let's close this one and come back but
here we have the all this data so what
we can do we have to Simply comment this
half okay comment this data obviously
right now we don't use it in our
application but definitely we're going
to use it later okay so that's what we
it will work so let's close this one
close this one and here we are back in
the context and here we have to do a
couple of changes so let's open this
okay so here we have to Simply replace
this one total and paste the data so we
have to paste the price a name image
description and router so make sure you
do these changes we can simply remove
this we don't no longer need this one
and we have to do the changes so here we
have to pass the file image and here
we're going to pass the now that's it
okay the only four data we want to send
okay so description price image and we
have to change this only okay
image so here we are converting that
data into a string and that's what we
in the client and that's what we are
putting to the inferior okay and the
and here we don't need to do any changes
so contract we have listing price we
have this two function so if someone
tried to create new token then we have
to call this function or if someone
tried to resell that then you have to
call that function and here we are
passing the data and the price and we
have to get the commission so everything
is looking fine no issues we have here
and here we're going to console log out
the transaction data okay lock
so that's what we have to do now let's
we're going to restart the application
and this is what you have to do every
time you make any changes you always
should start with the fresh otherwise it
will give you an error this is how I'd
here and have to delete this artifact
and now we have to delete this one as
we have to start that node and here
we're going to redeploy the contract so
so compile successfully deployed
and before we start we have to Simply
drag and drop the API so here we have
the ABI now we can start the application
open folder so looking good now we have
click on this 3000 here we are close
everything's looking fine so far now
simply log out the application and let's
so working fine now click on this
and here you can see we have this button
and that's working fine let's do the
and let's make it this way okay
come back to the console and now we're
so here we're going to clear this one
okay otherwise it will throw an error so
whenever you restart the application
make sure you just delete the reset the
so this is the account we have used to
upload and now we're going to upload the
nft click on this before we do that
let's bring the terminal down and
go to this upload drop zone and here I'm
going to console log the URL the image
which we are uploading okay so let's
come here here in the Drop Zone on drop
and then we're going to do just simply
so that's what we have save it
let's come back to the application and
now we'll reload the page and let's
so here you can see we got the image URL
it's updated to the ipfs and
now we have to pass the data so let's
pass that dollar nft we have to pass the
the dollar 10ft just ignore it for our
time being and let's type the price
because these are the data is mandatory
so we'll type one two three click on
and here you can see it's working fine
so we are interacting with our clear
token function which we have in our
smart contract you can see the contract
address and this is the listing price we
are taking okay you can see this is the
contract address you can quickly copy
and check okay and this is the listing
price which we are charging on every
so that's the listing price we have
and if you come here here you can go to
this data here you can see the function
we are calling create token and we are
passing a string and a number
UNT if you come here you can able to
find the details and this is the detail
gas fee and the total phase now click on
this confirm and you can see boom so
here you have created your first nft
here we have got the data so if you open
this one you can get all the data
related to the nft which is you have
minted so we have this access list block
number chain ID data from gas and we
all this data we are getting because we
have successfully created nft
and let's come here close this one so
this is working fine now here we're
going to import the let's say use router
we have this use router and here
we going to take another variables we'll
and this router is coming from user
so we have this use router and simply
copy that and simply come down here
so once we successfully create the nft
we want to redirect to the search page
okay so you have option wherever you can
transfer but we want to transfer the
after they create the nft to the search
page so here we're going to use that use
router and we're going to call this
router.push and here we're going to push
this to the search page okay search page
and that's what we have called the page
name okay so this is what we have to do
and this time what we have to do is uh
simply let's create one more nft so this
time this we have the URL let's pass the
data so we have to pass the name
hey subscribe my channel so if you
haven't done please do that and here we
have to price the price click on this if
so same function click on this confirm
and here you got the URL and you can see
we have successfully redirected to the
search page so this redirection is also
working fine and these are the demo data
we have but we're going to display the
actual nft which we are creating here
so this is the demo data we have
rendering here but we're going to
display the actual nfts so things are
looking fine so far everything is
working fine let's get done with this
function now we have to call this
function fetch nft so let's do this call
this function we'll take this use effect
and we're going to call this function so
we'll call this what is the name it's
fetch ma fetch nfts so simply call this
function so I want to call this function
every time whenever we reload the page
okay so there's a certain function we
so that's what we have here now simply
close this one and close this one come
back here and we have to go to the
search page okay search page and here we
have to import couple of things we need
use effect use State and use context the
same logic we have to follow here as
well so we're going to import the let's
and import and we'll call it import and
here we're going to call this nft
context Market context so somebody come
here what is the name we have called so
we have the MarketPlace contact simply
paste here and that's coming from
okay you guys are good I hope that you
guys are getting familiar with this okay
I still have any confusion do leave in
the comment section okay I try to
we have the import now I'll simply close
this one and here we go to import the
data so it's coming from use context
empty Marketplace let's come here and
this time the function we need is this
fetch nft simply copy and pass it here
so that's the function we have
and now what we're going to do is now
we're going to call this function so
use State and we'll have the nft is
going to be an empty array we have to
take this nft copies it's going to be an
empty array and this nft copy is only
for filter purpose okay so these are the
two used we have now we're going to call
and we want to call this function every
develop the browser uh we have any
so we're going to call this function and
then because it will give us the promise
we have to resolve that promise and we
let's say set nft and then we have this
pass this item and we'll call it reverse
and so we have all the nft in there and
now we have to do the same thing for the
set entity copy because we want to take
because here I don't want to mutate the
array okay I want to take the reference
and I want to do the changes in that but
I don't want to change the original
so this is how we have the data not
simply console logout the data so nft so
that's the setup we have here now if we
and simply do the inspect element go to
this console and here you can see we
have the data array in that if we open
this one in that we can see we have the
data which we have resolved simply
so first thing we have to do is
simply copy this nfts okay and that's
what we have to send as a prop in our
nft card 2 component so send it as a
prop here simply come back to this and
here we are receiving the data and here
we're going to do the changes sorry so
here we are looping over the data and
we'll come here in the images and here
we're going to call because it's going
to be same element and we have to call
okay we have the image now if we come
here and here you can see we got the
image the two nft we have created here
we have got it it's looking absolutely
fine let's make another full screen this
is the two nft we have created this is
the price we have given and right now we
so now we have to change this to the
name so we'll say element.name save it
here you can see we have the name my
and here is dollar nft so the name is
also displaying okay now we'll come down
and here we're going to display the
price of the nft element.prize
and here you can see the price we have
you can like and like so right now we
have this small data okay we're going to
make our smart contract more robust so
we'll have all the data which you can
see in the template design okay
so right now I'm just telling you that
how you can work with this so it's
working fine we can render the
template and now we have to start
working on the search okay on the filter
search so far looking good let's come
here simply not remove that simply
comment out this data because I don't I
want to keep it so you guys can have a
reference now let's create other
function for our search bar okay so when
anybody will type any nft name we want
so here we're going to take this on
handle search and it's going to be take
the value and in that we're going to
take this filter nft and all the nft we
have this inside the NFP and we're going
to call this filter method on it and
this will have the name and we want to
check okay we have to first take the
name and convert it to the lower case
once we have we have the name in the
lower case after that we have to call
this function include function and we
have to try to match the data okay it's
and we have to convert the value also in
a lowercase so that's the filter
now here we have to do the if statement
so if filter length is deeply equal to 0
then we want to call this displace this
data nft copy else we want to display
so this is the on handle search function
so simply copy and that's that that's
what we're going to pass it here in the
search bar component so send it as a
props now this is the one function we
have now create the other function for
the clear okay so when there is nothing
in that search we have to display the
data okay so we'll say clear search and
will not take any value and we'll say if
nft.length is and nft that copy then we
lft full copy okay and the same thing we
have to do here we have to pass the data
so that's the two props we are sending
simply copy that one come back to the
search bar and here we're going to
receive those props so send the copy and
so these are the two data we have
and here in the search bar we have to
take this use State and use effect
and we'll come here we're going to take
this use State angle say search
and it will take another use State and
we'll call it let's say search item
and in that we're going to pass the
search okay so that's the setup we have
used it now will come down we'll create
this use State and we'll say that const
and we're going to create a set timer so
we can replace we can detach the timing
and in that we're going to call this set
search and we're going to pass the
search item and it will take one second
okay you can adjust the timing as per
your but I'll go with once again
so that's the set timer and now we need
to return the function so we'll say
let's clear the timer function once we
everything's get done so we'll call this
clear timer function and it's going to
be in a search item okay so that's the
basic function I hope things are getting
simpler for you because these are the
simple JavaScript that's what I'm not
explaining that much so that's what we
have here let me come down we'll take
another use State and this time we'll
say if search then we want to call this
function what is the name on handle
search simply copy and pass paste it and
in that we're going to pass the search
on clear search and okay so that's the
search component things are looking fine
and it's gonna be this search
so it's looking good and here we're
the input so and that we're going to say
it will have an on click and we'll say e
search item and in that we're going to e
and it will have the value to this
search what is the name search item okay
initial value so so far everything's
looking good all these things we have
done for the search and now let's have a
try so everything's looking fine if I
search something okay we have some
problem in our search it's not working
just do the inspect element and let's
and let's try to search it so my
okay we have some problem in our search
so let's come back to the code and let's
do one thing let's close all this one
and let's restart the application and
deploy the contract let me do it very
quickly so let's run this all command
so so far everything is looking good you
can see all these are looking good we
don't have any issues now we have to
come here and first thing we have to
Simply log out and let's relog into the
application one more time refresh okay
so let's click on this connect and
what's your credential so let me type my
and here you can see click on this
and now we have to create the nft so
let's do it very quickly so let's come
if I click here and you can see right
now we don't have any nft because we
haven't created any nft that's why we
don't have anything here we have to
create nft so let's come back to the nft
simply first we have to reset the
account otherwise it will give us an
error make sure you clear your history
okay so now let's click on this
and here we have the nft now let's put
and here we can type the description hey
nft and let's skip the prize one two one
simply come here and click on confirm
after creating nft here we have
redirected to the search page and here
what I have found that nfts are not
displaying so I stop the recording and
try to find out that what is the problem
we have in the code so there is no
problem in the code at the time of
recording we having a lot of requests on
the ipfs or infuria so when we are
making those API records it's taking a
little bit time to load the data so that
could be the first reason and the second
reason is that I'm getting I was also
getting 504 error while making those
requests okay from inferior so there is
no problem with the code that's
happening because a lot of requests is
going on on inferior or ipfs on all the
way we are using the free account so
that's why we are getting this slow
server request so if you have the same
problem don't need to be panic because I
faced this problem and I was trying to
figure out this problem for the last two
hours then I found that this is the true
problem exactly happening at this point
of time when I'm recording this video
okay so make sure you keep continuing
with this whatever we are doing we are
going on the right parts just keep
working on that if still if you still
not get that nfts keep working all with
me we'll try to figure it out in the
letter that how we going to fix it okay
sometime you will have the data sometime
you won't have the data okay so there is
no problem with the code so keep working
on it so let me show you so you can see
let's review the browser and it's come
here and you can see still we don't have
the data now let's do the console here
it took almost two minutes and here we
got the nft so sometime it will come
sometime it will give you an error okay
so here we have the 150 we have created
you can see we have the price image and
that's all we have and we have also the
problem in the search bar we're going to
fix that as well so let's come here and
and here we have redirect you can see
this time we haven't got the data
because sometimes it's loading the data
so just wait for a little bit
and here we can come let's console logon
do we actually have the data or not so
let's do the inspect element and you can
this is the error I was talking about
okay simply redo the browser there is no
problem in the code simply redo the
browser and as you can see right now we
have received the data so sometimes the
data will come in late sometimes the
data will arrive fast so you can display
so we have this dollar that I mean that
nft we have created so everything is
so this is the bug I have found and
that's happening because of the inferior
or ipfs so make sure don't be panic and
if you are typing here anything in the
search bar our search filter is not
working okay so this was not working we
have to fix this as well okay so let's
drive our still is not working so it is
a serious problem let's create one more
and here you can see we got it okay
because I was testing when I was not
getting the data so I created two nft so
you can see sometime the data will
arrive fast sometimes the data will
arrive late and sometime you will get an
error so it's nothing your problem
that's happening because at the time of
recording I am facing this problem
because there is a lot of requests is
going on in fura or ipfs so that's
because of that is happening okay so
keep walking along with me we're going
to do a better modification so we don't
have any issues right now just walk
along with me so that's the only thing I
want to cover in this that how you can
create your nft the only modification we
have to do in our search bar because our
search bars is not working fine
and the first thing we have to do is to
redeploy the smart contract so let's
come up here and let me delete this
delete the cache and go to this context
folder and we have to delete this API
because we have to start with fresh okay
Now open up your terminal and so play
clear the terminal and we have to type
npx hard at known which is not new to
all of you guys and we have to
deploy the smart contract okay so let's
click on this deploy and here the smart
contract is deploying so compile
successfully and here we got the
let's come back to this artifact and
here we need to drag and drop this API
of the smart contract to the context
okay move it so that's the setup you
have to do which is not new okay and
let's come to this side and we have to
restart the application so we'll type
npm run Dev and let's open the
application in the browser so here
everything is working fine we don't have
so let's click on this and go to this
upload nft and here we are on the upload
okay so before we do that let's come
here I like to change the theme so let's
come back here let's bring this terminal
down and go to this style inside This
Global here you will find the theme
color so all together I have 12 theme
for this template so this is the main
thing and here is the second one two
three four five like we have almost 12
theme for this template okay so this
time I'm going to change the theme so
let's come up here and simply comment
this part the main theme and this time
I'm going to take this number two theme
okay so let's uncomment this one and
here is the yellow one now let's come
back here and you can see everything's
turn yellow so the theme is working fine
now this will look pretty good okay so
sometime you have to do this changes to
keep yourself focused okay because this
project is getting very long and I want
to explain you everything that how you
can make a beautiful and a powerful
application so things are looking good
now let's come here in the metamask and
first thing we have to do is to delete
the history so make sure you do this
because if you start creating nft like
this it will throw you an error and this
is not the problem in the code we have
it's the problem in the metamask because
if you keep the history of one account
and you switch to the another account
there is a conflict okay so make sure
you always reset okay now let's come
here and redo the browser one more time
so let's give the name my nft
I'll say subscribe to my channel okay
that's the description and this is the
price we have to pass click on this
now we are interacting with the contract
and now let's click on confirm
and here we have redirect to the home
page sorry search page so things are
looking good right now you can see the
data is not arrived because it's taking
a little bit time we have to make that
API request to the ipfs and from there
we're going to fetch the data and
display so it will take a little bit
time but here we're going to display
that loader okay we're going to build
so it's not working let's do the inspect
element and here you can see in the
we haven't arrived anything we have the
and here you can see finally it's
arrived so it took a little bit time one
minutes then it's arrived so here we
have the nft we have created you can see
so this is the first nft we have all the
data now let's create another one
and let me quickly create this
let's come here and we're going to
so here we have this second nft we have
created and you can see again we have
facing the same issue so if you are
facing the issues and if the data is not
coming and you are getting any kind of
error don't need to worry about it okay
just work along with me okay because
this data will take a little bit time to
so it's not working we don't have the
data let's create one more okay let's
quickly create as many NFP as we can so
so let's try and call this web hi nft
we'll type the description a Schwab nft
make it capital and we have to give the
here we have the metamask now let's
so back here one more time so still
nothing is displaying let's come here
and now we're going to create a couple
of more nft from different account okay
so this time we were using account
number two now we're going to use other
account so we can purchase and list okay
so make sure you have to delete the
now later the page and now we have to
and let's create the nft so we'll pick
this one let me do it very quickly
so here we are and you can see finally
it took close to two minutes and finally
the data arrived okay so we're going to
display the loader okay so here we have
all the four nft the third the first
three nft created by the first account
and the last nft created by the second
account so everything is looking fine
looking good now we have to add a
to this nft so if once anybody will
click on this nft we want to redirect to
the nft detail page and where we're
going to display all the data about this
so that's the functionality we have to
include so if we click nothing is
happening but we got to add it okay so
let's come here and close this one and
close this one go to this Pages go to
this inside this search page okay search
page here we are and click on this nft
heavy will come and inside this we are
displaying the data okay so here we're
going to import couple of things so we
and that's what we're going to wrap the
entire nft card with this link okay so
let's come here we'll take this link
cut this one okay simply close this one
and we have to define the href path
where we want to redirect so it's going
to be a path name we'll call it so the
page we want to redirect is let's say
what is the name let's have a look uh
nft details okay so this is the page
where we want to redirect and we want to
send the entire data so which is inside
this element okay and we will send it as
so we have the data in the URL and we
have to assign a key otherwise it will
react will give us an error so let's
save it and it will come back here
and reload the browser and if you click
on this click and here you can see we
are redirect to the detail page and we
are here on the URL we have all the data
related to this nft and that's what we
so you can see we have all the data
seller token ID all the information we
if you click on this you can see we are
getting the data this one is also
and let's come back to the code so
that's we are done with this and let's
open up this and here we're going to do
a couple of changes because we have the
in this card and that's what we do to
display here so let's come here close
this one close the search page and
simply go through this nft detail page
and in this we're going to display the
data okay so let's come up here so this
is the detailed component so first thing
we have to do is to get the data and
that's what we're going to do here we're
from that page so for that we have to
import couple of things from react so we
need the use effect use State and use
context now welcome down we're going to
import the let's say use router because
inside the router we have in the URL we
have all the data so we will use this
and welcome down we're going to do the
import from the smart contract okay data
and we say what is the name we have nft
play Marketplace context so here we have
do a couple of things so we're going to
take this and it's coming from use
context and in that we're going to pass
so that's looking fine now let's come
here and here we're going to take a use
State and this will be the nft and this
nft will come in the form of object okay
so first thing is going to be the image
second is going to be the token ID third
is going to be the name and fourth is
going to be the order and last part is
going to be prize and we have one more
is seller okay so these are the data who
will take from that router and that's
the data we are sending actually so this
is our object now let's come down we're
going to take this router and
user router and here we're going to use
and here we're going to say if router is
so this this piece of code will what it
does it will check whether our router is
ready or not if it's not ready then it
will return from this function but if
it's ready then we'll get the data and
set to the nft workplace okay so we'll
say nft router dot query in the in the
query we have all the data okay
and now if you want to call this router
is ready okay nothing fancy very simple
function we are writing here here we're
going to pass the entire data so simply
pass the data here and that way we can
easily able to receive the data in our
nft detail page so let's come here and
let's go to this context and let's have
a look what are the things we need to
and here we're going to receive this
current account simply call it here
and that's the only thing we want to get
so things are looking fine no issues we
have here okay so this is the data
that's the nft details here we are
checking for the data is ready or not in
the URL and here we are passing the data
so far things are looking good now
simply come here in The nft Details page
and here we're going to receive the data
nft which we are sending us a prop and
that's the exact data we're going to
send in both nft image and nft
in the both component okay is that
looking good now we're going to start
with the nft detail image first so let's
click on this and here we are
here we are and this is looking fine now
first simply close all this function so
we'll have some clean environment close
this one and first thing we have to do
is to receive the data which is coming
okay so we have that data here now we're
going to render the data so first thing
we have to do is to change the image so
we'll simply come here and remove it
we have the the image inside this nft
dot image okay Simply Save It and here
we're going to change this to skip range
description sorry and we'll say nft dot
inside this we have the description now
let's come here and here we're going to
display the address address so which we
have inside this let's what's the name
of the address we have called I think
seller so let's come here and let's have
a look so what we have called seller
so that's the entire data we are here
and now if you click on reload the
browser and if you click on any one of
these ft you will able to see the
changes in the image name and all those
and boom you can see the images changed
okay and here you can see the
descriptions we have this hey that's
what description we have given we have
contract address and the token ID okay
let's assign a space in the token so but
so here we're going to provide a space
HTML Space Tag so let's do it so we'll
have some space so it's looking fine so
this is working fine we can render the
now if you click on this you can easily
able to choose the changes here also
looking good if you click on this
looking fine okay the data is changing
the nft is changed so all everything is
looking fine now let's come back to the
come and we can start working on the
description and if it is clicked on this
and we have to receive the data here
okay same thing we have to do here as
and let's simply close all these arrays
close this function close this one close
this one and close this one and now we
can start working and displaying the
data so first we have to display the
names then this nft dot name and here
we're going to display the token ID so
so that's the first piece of data let's
come here and here you can see my nft
and token ID is one so it's working fine
no issues we have here now let's
come here if you click on this you can
see the title is changed and the token
so looking so far as good and here in
the image 2 it's actually going to be
the collection okay here we're going to
display the here we go to display The
Collection image and the name of the
so I'm going to remove this username and
so you can see this is the background
because every single collection will
have its own background image or attack
which user will create okay so that's
what we have and here we're going to
change this to let's say collection
that's collection and here we're going
to type the collection name let's say
okay so that's the collection name you
can see the changes are taking place
collection and monkey app and the images
and here we're going to display the
price actual price of the nft so we'll
that's the price we have here and
let's you can see we have this place of
width but we're going to make it Dynamic
okay and now we have to start working on
this Creator so I want that whenever
someone click on this Creator okay
whoever created this nft we want to
redirect to the author page where we're
going to display all the information
about that particular creator that how
many nft is listed to the marketplace
how many nft he owns how many user or
follower he follows so all the data
related to this particular creative you
go to display in the author page and
that's what even we're going to add in
this here is the name okay so
and before we no let's come here let's
come here up and we're going to import
couple of things we need to import the
link and that's the internal import
let's come down and we have to import
and we have to import this nft context
Place simply take this use effect use
context so far everything's looking good
let's call this down Okay so we're going
so smart contract data and we're going
to take this const and this we'll use
this use context we'll pass this nft
context and the data one we want to
receive so let's come here go to this
close all this open folder and go to
this context and what data we need we
need this by nft function because we
want to add this functionality on the
buy button so if anybody wants to buy
they can buy okay simply come back here
and we go to receive that function and
we need to receive one more thing we
need to receive the account okay
so let's come here and that's what we're
going to receive here so these are the
two functions we are receiving and now
we're going to utilize this okay
so let's come here and let's scroll down
and so this is the creator sections
and now we're going to add that
change this okay so we're going to add
that link so let's come here take a link
and we're going to cut this and we're
so we're going to take this href we have
path name so we want to redirect to the
author page and the query is going to
have the information about the address
so nft dot seller okay so we want to
we want to redirect we have to give the
seller address not the order because
honor is the nft marketplace okay so
seller the one who created this nft
so that's what the what we have so if
anybody will click they can easily be
able to redirect to the author page
let's come here and this is the button
so right now you can see this two button
but here we're going to make it more
so let's come here we will take this
Dynamic block and we'll say if current
account is equal to nft dot seller we
have to make it to lower case and
if that's the case then we want to
render this button so we'll take this U
cannot buy your own nft okay so if
someone's created the nft and if they
visit that nft detail page then we want
to display this data because they can't
so that's the first check we have to do
and else we say current account nft dot
honor to lowercase so if the nft belongs
to the marketplace to the smart contract
of the marketplace then we want to say
this so simply copy this button and
paste here and here we're going to say
that uh we're going to change this text
we'll say list to list on Marketplace so
just imagine in this way you have bought
an nft and you want to re-list to the
marketplace so anybody can buy it so
that's the functionality we're going to
add right up here okay so this is the
and that's the one and now like we have
to take one more so we're going to
Simply uh paste this button one more
time and here we're going to add this my
nft function so the one who want to buy
it and here we're going to call that
function so let's call it by nft and in
that we have to send the entire data of
the nft so if we click here here we are
this is the second check and this is the
and this is the last fourth person we'll
make an offer we're going to make it
let's come here and here you can see
right now we have this by nft because
this is not the nft we have created okay
here you can see we can able to have
the first account created this three nft
and we have created only one so if I
click on this things are looking fine if
you come here and if you can see they
if you click on this and here you can
see you cannot buy your own nft because
this is the nft we have created
so the our message is also working fine
all the test now so far things are
looking good now if you click here we
can easily able to redirect to the
author page and you can see in the URL
we have the account address as well
so and here we're going to display the
data so as you can see we have this
collectible where we're going to display
all the nft which user are listening to
the nft marketplace for selling and in
the created section we're going to
display all the nft which the which the
owner actually own okay so we're going
to rename those two tab okay so collect
instead of collectible you're going to
add the let's say listed nft and instead
of create we're going to add that let's
say old nft okay so these are the two
changes we're going to do shortly and so
far this is working good let's come back
here and if you click on this everything
is dynamic working 100 percent
all the data is working fine now let's
come back to the code and let's come
here in the buy nft function you can see
we are receiving the entire data
of the nft and here we are converting
that nft price and that's what we are
actually passing in the create a market
sale function on the smart contract okay
so let's redirect to the actually author
page so when the transaction get
completed we want to redirect that so
so we want to react to the author page
so that's what we have here save it
and now let's try to make a purchase so
things are looking good let's come here
and make sure you have to clear your
history before you start making purchase
let's click on this buy nft and here you
let's click on this confirm
and here we have redirect to the author
page so everything's working fine and we
so we have bought that nfe but we can't
we are not displaying here because we
have to do the changes here so here in
the collectible we're going to display
the nfts and this is the create section
so things are looking good so far let's
come back to the code and let's close
this one close this one close this one
and close this one so let's come here
and close this one as well close this
let's go to the pages and we have to go
and here we're going to do a couple of
changes so we have to receive this use
and we have to come down and we have to
nft Marketplace context and that's
there okay so nft Marketplace context we
have that now we're going to close this
existing one and this is the use State
for tabs and here we're going to do the
import from the smart contract okay
smart contract data so first we're going
to take this use context and then thus
we're going to pass our context
so the function we want to receive here
let's come back to the context
and what the function we want to receive
we want to receive first thing is this
fetch nft fetch my nft or listed nft
because in this function we are calling
two functions the first function is
fetching the listed at fft to the
marketplace means the person who want to
sell the nft and the second one is the
function which the nft he actually owned
okay he bought the nft so here in this
we are in this function we are calling
this two functions simply copy this
function okay defining that and we're
going to send this and then we're going
to run the function copy this function
and that's what we're going to receive
now let's come here and we have to
receive this account so we have this
account so that's pretty good
now let's come here we're going to take
this use use context and we'll call it
nfts it's going to be an empty area we
have to take another one so we'll call
it my nft empty array and this is the
let's come down and we're going to take
this use effect and in this we're going
to call this function simply copy and
paste here and we have to pass this
so what we have to pass we have to pass
items listed so if we call this pass
this then we want to call the first
function fetch item listed okay simply
copy that one and paste it it will
so we have to resolve those promise so
say that we call the item it's going to
be a narrow function and here we're
nft items so this is how we will receive
the data and set that to the nft array
so that's the first thing and it's going
simply come down and we have to do the
same thing for other function so we'll
do this exactly the same thing so we'll
so let's come here copy this function
and in this time we want to call the
other function fetch my nft so we'll
and we have to resolve the promise items
and we want to set the nft so we'll call
set and my nft and then we're going to
pass this items okay looking so far so
so Adam's gonna be an empty right so
these are the two functions for fetching
nested directory and my nft so let's
this is that looking fine let's come
back to this author page author nft card
in the same page and here we're going to
pass the data so let's come here we have
and we have to pass this my let's set
nfts okay so these are the two data we
are passing in let's come here
and make sure you do these changes make
it small okay nfts okay make it small do
and here we're going to make it small
so things are looking to make it small
so make sure you do these changes
because this is the pattern I would like
to follow I'd never try to keep the last
alphabet of the any used State as a
Capital One it's my preference you can
so we have the data in this author nft
and we can click on this and we can come
back to this nft card box and we're
going to receive those data so let's
come here receive the data and nfts
M this is called my nfts so this is the
two data we have here close all this
simply pass the data in this component
so first thing we have to do is to pass
the data in the Collectibles so this
collectible where we go to display the
nft which is listed to the marketplace
okay so let's pass those nft data so we
have the data let's Commit This one and
so we have the listed nft now my Nifty
we're going to pass it here
right okay simply comment this okay so
we have to comment this collectible
array and created array so make sure you
do this one so we have the data in this
simply click on this and if we come down
we are using the exact reusable nft card
component so we don't do any changes you
can see we have all the data here
so we have the images and and reloaded
we have created that one nft listed we
have listed that one ft which is
it's working fine so we have the image
title prize everything's looking good
now you can come here go to this search
items click on this and here you can see
so we have this all nft which is created
if you click let's come here if you
click on this here you can see author
page like this account address create
this nft and that's what he can find in
the author page so this looks pretty
good and now we can start working on
this create nft we don't have it right
okay looking fine let's have a look it's
looking really good click on the other
you can see right now we can buy it
simply buy this nft okay he bought it
and here we have redirected but we can't
able to display that nft here so I think
we have a problem in that function
in the function it has to display here
but it's not displaying so we have some
issue we have to figure it out
but this one is working but our created
old nft is not working okay
so let's come here and go to this
and this is the fetch my nft function we
have so everything's looking good this
is the function we are receiving with
this function we are receiving the
listed nft but fetch my nft is not
this function is not working okay so
let's come here in the smart contract
where is the function here we have the
function inside that things are looking
okay things are looking good but before
we start working on the smart contract
let's start fix the problem which we
have in the search okay so we'll fix
that first then we'll come back to this
okay let's go to the search page and now
we have to work on the search before we
move to the smart contract okay so let's
so let's come here and you can see if
I'm tapping any things we are getting
this blinking but we can't able to
filter it okay we are getting this be a
so if we are typing anything nothing is
happening and let's come back to the
code and here what I have found that I
somewhere here so this is look good
and here I've made a mistake okay it's
an empty and we have to pass simply
provide this one and because of this
missing bracket our filter was not
working okay so make sure you provide
this bracket and now everything is good
okay don't need to do any changes in the
filter in the search bar the only thing
we have to do is to provide the bracket
that's working fine now we can come here
and now we can easily able to use this
filter so we have to type the name of
the nft if we type h you can see we have
filter working fine if we type hey
that's there if we type the let's say
what is the other name my so if we type
my we have this my nft so our filter is
working perfectly and we can easily able
to see the data and do all the things
if we click it's working fine so so far
everything's looking good now let's come
here to the author page and this is the
account this is the nft we have listed
to the marketplace that's what we
displaying but we have this is but we
have the problem in the the nft we have
owned okay so it's not working we have
to see what's the problem we have there
let's come back to the code and things
are looking good simply close this one
close this one and now let's go to this
uh context and here we have to have a
look one more time so this is the
problem we have in the fetch my nft
so let's come here go to the contract
and so I found that there is a little
bit problem in the smart contract in
terms of fetching the nft okay so before
we work that come back to the author
here we have that account but we're not
using it we have to display the account
so let's come here pass the account in
the author profile card okay as a prop
so let's pass it here so we can display
in the card so let's click on this and
where we actually displaying that we
have to receive that account and simply
in the input okay so here we have this
demo account we're going to display the
actual account of the Creator okay so
remove that one and we're going to pass
that account so if we save it come here
you can see the actual address of the
nft Creator if you can copy and you can
open in the browser and you can see
everything so if anybody wants to
validate anything on etherscan or
anywhere they can do this by this
account address okay it's looking fine
but this is the problem we have we have
so things are looking good so far close
let's this is the fetch looking fine
and let's come up here copy one more
time and do one thing let's call it
let's call the function right up here
because I want to call this function
an application gets started okay so
and when that we're going to call the
function let's come here let's check one
still be having the issues yes still we
having the issues we have this two nft
which we have created but still we have
so the nft which I have bought let's
come back to the contract and so here
I'm back into the nft smart contract and
I did a little bit changes in the smart
contract so I will provide you the
updated version of this smart contract
so you guys can utilize that one because
we had some problem in our Fetch nft and
I I I was stuck for quite long to find
out the problem so I there was a lot of
problem in that code which is correlated
to one another so I did a couple of
changes I'll provide you the updated
smart contract in this article so make
sure you come to this article simply
copy this entire updated smart contract
and instead of this old one you have to
so this is the updated smart contract
okay all this updated I have updated the
here you can see this is the updated
and this is the function we have here so
what we can do let's come here
and we have to do this function this is
the function we have to do it's uh fetch
that's the one thing you have to do in
this context and what else we have to do
and here we have this another function
fetch Market item let's come here where
it's that fetch Market item so this is
the fetch market items s okay it makes
sense because we are trying to fetch all
the items of the nft okay so simply copy
and that's what we're going to pass it
so far things are looking good making
make sure you do only these two changes
and get the updated smart contract
if you want that your own nft function
so so far things are looking good
simply come here and this is also fine
now simply close this one and close this
one and we have to redeploy the smart
contract so I'm going to delete this
let me do it very quickly let me deploy
that smart contract start the
so as things are looking fine now simply
clear your entire history let me do it
so right now the nfts are not displaying
and you know why let's do this console
and here finally the data is arrived so
it will take a little bit time you go to
so these are the two nft we have created
now let's change the account and create
couple of more from other account okay
so here you can see we are this one is
working fine the listed nft in the
now I'll simply switch the account and
create a nft from different account so
it's where we got the three account two
nfts now let's come back to the author
you can see in the second account we
have this 1850 because what ft we have
so far things are looking good and now
it's a 23 ether a lot of money click on
this confirm if you have redact to the
author and again you can see finally
it's working fine okay so make sure you
then you can easily able to fetch your
own nft which you have bought okay so
make sure you get that from article
you can easily want to switch between
the tabs and get your own nft and listed
nft if you come back to the search and
you can see this is the two nft we have
and if you can see this is the listed
nft you created that nft and if you
click on this created you have this
board nft which you have bought okay
it's looking also fine and here you can
see the button is changed to list to
list on Marketplace so if you want to
resell this nft to this Market placed so
other can buy it we're going to attach
that function right up here okay resell
function which we have already there in
so if we come back to the search right
now you can see let's come here
let's create one more nft from this
account so let's do it very quickly
and here we are again it's taking a
little bit time we have to attach that
loader okay so finally the data is
arrived and right now we have this two
you can see this is the nft we can't buy
because we this is the one we have
created and if we click on this Creator
and you can see this is the two nft the
created and this is the two nft he
okay so that's the things are also
looking fine if you click here here we
have this button to list on Marketplace
and that's the function we go to assign
looking fine so far let's come back to
so so far everything is looking good now
let's come back to the contract so make
sure you do this one okay make sure you
get the updated smart contract then
string will work otherwise you will have
an issue so this is the updated one
so now we have to create one more page
and when someone will click on this list
to nft Marketplace we want to re-tag
them to the resale nft page where they
can put the price and and they can
re-list the nft to the marketplace okay
so this is the logic which I want to
follow okay so you can do with the
pop-up but I want to do with a separate
page okay so let's create a page so
before we do that let's come here
click on this and go to these
descriptions and if we come here here we
have that button so let's scroll down
here we have that button okay so this is
the first check we are doing this is the
second for buy and this is the list on
Marketplace and here we're going to
attach that function okay this is the
function where we want to attach let's
go to this context and in this context
here we have this function create sales
okay and in this create cell we have
this two function so if user tried to
create the new nft then we want to call
this create token function but if user
try to resell the nft to the marketplace
then we want to call this resale token
so that's the two change we have to do
so this is the data we have to pass in
this create cell that's looking fine so
that's the resale we have and here we go
to call this function resale token and
so far things are looking good let's
close this one and now we have to create
a page so let's create that we'll call
it resale token JS we'll type rafc
okay now let's come here close this one
we have to call the CSS file as well so
let's create a that resale dot modules
okay that's the CSI let's do the import
style and that's coming from the style
and this is called resale token okay
that's basic thing let's come here close
let's come here and go to this nft
in here we're going to click on this
we're going to go to the description and
we're going to attach this functions so
which redirect to the resale page okay
so first we have to use import the
router okay so we'll say import
use router and that's coming from next
router that's the router we have and now
we can come down here and here we're
going to Simply take the router okay
router and this router is coming from
simple logic you guys have already seen
that and now we're going to attach that
that router here in this button okay so
we'll say router dot push and we want to
push it to the what is the name we have
called resale token okay this is the
name we have given to the page okay save
let's close this one and let's keep it
this open resell token because here we
go to write this jsx and all the logic
so looking fine let's come back here and
and you can see this is the button we
have list on Marketplace so if you click
and here we have redirect to the resale
token okay page and here we're going to
allow user to put the price and so
reselling the Smart Car reselling the
now let's come back to the code and here
we're going to write that jsx so we'll
take this div it will have a class
called style Dot and we'll call it
resell token we'll have another div it
will have a class result token Dash box
or inside this we're going to use the
form component which we have created
so we're going to use as well come here
go to this account page inside the form
here we're going to take this first step
okay we need only one input simply copy
and simply paste right here so we'll
have this form and if we have to change
the name so we'll call it let's say
so that's what we have here we're going
price and here we have to import the
form style file okay because we want to
and that's coming from the account page
slash form slash modules form okay so
that's the style file we have let's come
and here you can see it's looking fine
now simply copy this and we have to add
that style into the form okay so let's
replace this one this one and the second
one simply replace this both and save it
let's come here you can see that's how
it will look our input is already ready
and now we can utilize it okay so let's
just copy this series and come back to
this width is going to be 100 margin
let's say block is going to be 4 Ram so
we'll have some space from top and
bottom and we have to stack the Box
we'll say where is going to be 80 margin
and this looks good pretty big
okay let's come here we have to
take this H1 and we'll call it resale
so that's the title we have here
now we're going to add the make it 60
the way this 16 and we have tag the H1
and we send font size mode with three
Ram so this looks pretty good
okay now we're going to is convert this
to a number because we want to take
input as a number not as a string okay
text so that's what we have here looking
fine we can type and as you can see we
are it's going into minus we have to set
the minimum value so minimum is going to
be 1 meter I know it's pretty high but
so it's a one eater we have
and that's the input and now we want to
receive the data so when someone will
click on that button list to Marketplace
we want to send couple of data okay and
that's what we're going to receive here
so let's receive a couple of things from
new States so we have use effect use
State and use context we have to use
this router and that's coming from
router and we have to import that axis
to make our API calls and here we're
going to import that let's say what do
we have to import import the button
because we want to have a button which
so and we're going to import the context
and that's coming from nft Marketplace
context and here we're going to use that
and that's coming from here and in that
we're going to receive this function so
what's the function name we have here so
we're going to call this function
so this is the function we have
now let's come here we're going to call
this function create cell so we have
this function simply copy that one and
let's come here we go to call this
now we go to take this couple of U State
price and we have to take this images so
we'll send the data in the router in the
and so we have that word and we're going
to take this router use router okay and
we're going to take this ID token and
this data is coming from the
router.query okay right now we don't
have the setup we go to set that okay
so just follow this setups and here we
go to Cup and we're going to say fetch
let's say fetch nft is going to be an
async function and then we're going to
URI is not ready then we want to return
this one but if it's ready that we want
to take the data and that data is coming
from weight axis get and then we go to
pass this token URI and in this in this
data we have all the data price image so
we're going to receive that one data dot
price and we have to receive the state
set image image okay so we have this two
and that's coming from the URL okay
and we're going to call this use effect
once and we're going to call that fetch
and we're going to call this ID okay we
have to call the function so it's
we come down we're going to take a
resale function and it's going to be an
async function and we'll say await
create cells and then we have to pass
this token URI price true and ID because
that's the input we have to provide to
this function so this true is will this
true will Define that it's a resale okay
nothing complex very simple and here
we're going to post that once the
process happened to author page okay so
once someone's purchase we want to push
that's what we have here come here
and we have to import the image tag as
well and now we're going to take a image
because we want to display the image
display the image so let's come here
we're going to take another div it will
token box image and that we're going to
have the image so if we have the image
then we want to display the image so
we'll have this image tag in that we
have to provide the source of the image
so we have the image all tag and we have
to provide the width so where is going
to be 400 and height is going to be 400.
so this looks pretty good nothing
complicated and we're going to take
another div it will contain the button
so resource BTN and then we're going to
call the button function and we have to
provide the name resell nft and
let's say we'll say handle click
function and here we're going to pass
so the function you want to pass is
resale okay so that's looks pretty good
and this resale function will trigger
the create cell okay the result function
so that's what we have here so this is
the price we have now let's come here
and if we try to list this if you click
on this list on Marketplace okay the
data is not displaying okay we don't
have anything in the URL so let's come
here and click on one more time
okay my bad actually we have to send the
data we haven't done anything
welcome here close this one and we'll
nft details in that close one click on
the description and here we're going to
send the data okay so let's come back to
the list to Marketplace button
so here we are only redirecting to the
resale token function result token page
now we have to send the data along with
that okay so we're going to convert this
into a template literal so simply remove
this and convert that into a templated
row and here we're going to construct
the URL so in the URL we're going to
so here I have simply copy and paste the
data which I want to send so this is the
data ID and in that ID we have to show
the token ID and the token URI which is
we have inside this nft token URI so
this is the data we are sending there
so simply save it make sure you save
send the exact data as we have here
and now we will receive this data and
that would be working fine so this is
the URL we are constructing and that's
what we are receiving with this ID and
token URI which is coming from query
okay so let's come here go back to the
and here we have the nft now if we click
on this list on Marketplace you can see
we have the image images displaying and
the token UI is already passed in the
function so anybody can buy it but this
image looks really bad okay
okay so in the URL we have all the data
token URI ID URL so things are looking
close this one close this one and
okay sorry this is the image we have
copy that one and simply come to this
and actually we have to try the margin
margin block is going to be let's say
4am so we'll have some space from top
so we have some good space now let's
come here and sorry my bad the height is
going to be four not hundred so here we
have width four so now it will look good
and here they have this Perfect Image
displaying the nft so they can enter the
and they can buy the nft okay so click
on let's do one thing let's type the
three to four click on this and here we
are getting an error it says that create
sale is not a function why so let's
change this to Arrow function okay maybe
sometime you don't know what's the
problem happening you have to make this
little bit changes to find out okay
so we're going to call this resale
so let's come here we have to reload the
page and still we are getting the same
error let's come here in the nft
marketplace context and here we have to
do a couple of changes so simply take
this router cut this one and that's what
because we are already using this like
create sales router there okay so that's
why we have to cut and paste here
and here we have to do the changes okay
so here we have the ID instead of
sending the URL we have to send the ID
so we have the ID and that's what we're
going to pass here okay so we have to
pass the ID make sure you do this change
and so if we come back to the smart
contract here you can see that we have
this resale token s is in a small case
not in capital so make sure you do this
result token in small case and save it
come back to the application and let's
try one more time so 34 and again we are
having the same issue we have done a
couple of changes but still the problem
is there okay I'll try to fix this
problem in the next video okay this
video is already getting very big and I
have to fix this one because I check all
the code and still having this issue so
in the next video we'll try to fix this
problem I have to find out the what's
the problem exactly happening in the
so that's what we're going to do in the
so we have the problem right up here
but we have some issues here we have to
I have to check so let's close this for
typing okay close this one and close
close this one okay so I hope that you
guys have understood whatever we have
done so far we have done a lot of things
and the final thing is left is to add
that resale functionality and that's
what we're going to do in the next video
okay so let me find out the problem
which we are having in the code recently
I have created this Discord server okay
because many of you guys having a lot of
issues in the installations of the
packages installation writing the code
or writing the smart contract so a lot
of you guys have gave me those comment
it's very hard to answer all your
queries in the comment section because
you guys are telling me that you guys
not able to install the certain packages
you're not able to write the smart
contract facing a specific problem so in
the small line it's very hard to tell
you that what's the problem exactly you
are facing so because of that what I
have done I have created this Discord
servers where we will build this
community those who are participating in
this project will try to help each other
okay don't expect that always I'm going
to answer that answer your query okay
you have to put your query in the
Discord server we will have other
members there and they will respond to
the query if they have faced a similar
problem or if they have a better
solution okay so this is how we have to
it's very hard to answer all the
comments which you guys are giving me in
the comment section because sometimes
what happening that I get the
notification for the comment but when
I'm opening that video and to see the
comment the comment is no longer there
it's not displaying in the comment
but it's displaying in the only
notifications so I'm having those issues
as well I don't know what's the problem
they have in the YouTube comment okay so
the comments are sometimes not not
displaying and you guys think that I'm
not able to answer response to you guys
okay so make sure you join this Discord
server here I've divided in three
categories so what is for smart call
track one is for template one is for
integration and one is for API so if you
have any problem in any one of these
topics make sure you leave your query
along with the images okay snippet of
the code so we'll try to help you
hey all of you hope you guys are great
and welcome back to this full stack nft
Marketplace project video so in the last
video we had problem in our resale token
functions and this is where we left in
the last video so here I have opened the
project make sure you do that and let's
come up here so these are the function
we had written and the previously okay
so let's have a look everything and this
is the fetch token function we have here
and here we have the price so what we
can do simply comment out this price
because this time we don't want to take
the price from the URL because we're
going to take that price from the input
field okay so here we have the remove
this one and here we have the price
here we're going to wrap this entire
resale function so we can easily able to
know that what's the error happening
exactly so let's wrap this in try and
catch and we're going to cut and paste
here and here we go to console log out
the error so we'll say console.log and
we'll have the error so we'll say error
while resale and here we're going to
pass the entire error okay so that's the
result things and you can see in the
input tag we forgot to add that because
in the input tag we are not taking the
value of the input okay so we have to
take that value as well so here what
we're going to do is here we have the
price and that's the price we're going
to set here so here we're going to add
this on change function it's going to be
e and here we're going to call this set
price and in that we're going to pass
the value okay so whatever the user will
put the price that's we're going to
assign to the price okay so that's the
price we have here and let's come back
to this and here you have noticed that
the create function the create cell
function we actually not exporting here
and that's why we were getting that
error message called fine okay so that's
the function we have to export so let's
come up here and where is that function
so this is the function we have to copy
and that's we're going to export right
so because of this we were getting the
error and we do we had no and we were
not taking the price from the input
because of those two things we were
getting this error okay so that's the
setup we have now let's come here and so
far everything's looking good
so let's have a look things are looking
good and now we can come here let's go
to this simply upload nft and let's
create nft okay simply create let me
and we're going to give the description
subscribe to my channel let's give the
and simply create confirm so here we
have created the nft and as you can see
the nft is not arrived so in the next
video we're going to create that loader
okay so let's do the inspect element
before we do that let's come here and we
have to switch the account okay so this
is the nft we have created from one
account and now let's switch to other
account and let's create some more nft
okay so if we have nfft then we can
easily able to do the resale testing
okay so let's create nft so let me clear
this history otherwise it will have an
error and now reload the browser and now
so I have already created a couple of
nfts very quickly okay so these are the
nft I have created three nfts right now
I have and you can see this is the one I
have created and here we have this buy
nft function so this is the nft we are
created with the first account
so let's click on the spy and let's buy
this nft and we're going to confirm it
and here we have redirect to the author
page and here you can see the nft which
I have created with this account but if
I click on this create here you can be
able to see the nft which I have bought
just now okay so the price is 2 32 ether
okay that's a lot of money so you can
see and here you can see that the cotton
options for listing this nft to the
marketplace okay so I'm the owner of
this nft and I want to resell this okay
so let's click on this and here we
redirect to the nft page here you can
able to find the nft which you are
reselling and what we're going to do
we're going to give the price so the
amount which we want to resell is 985
ether and that's we're going to click on
this confirm head is metamask and now we
have to Simply click on this you can see
all the price click on confirm and here
finally we have relisted this nft to the
marketplace and that's the nft you can
able to find here in the author page in
the real list option okay you can see
the price which we have assigned 985 so
this is the nft which we are selling to
this Marketplace on 985 ether okay
that's the amount that's huge okay let's
come back to the search and here you
will find the same nft and here you will
find the same nfts listed here as well
so let's come up here and let's simply
change the account number two okay and
you have to clear your history otherwise
you will have a dinner so let me do it
very quickly and if I come back here and
you can see here we got the all nfts
let's come here go to this author
profile and with this account I have
created like this nftk so This nft I
have created and I haven't bought any
nft with this account so let's purchase
some nfts so let's come up here and this
is the nft I want to buy which I have
relisted in the from other account and
now I can buy this one so let's buy this
so let's buy this one and let's do the
confirm and here we have back here and
if I click on this create here you can
see we bought this nft and we paid this
so here we can easily able to change and
here you will see that the nft which you
have bought is no longer listed here
okay because you have bought it
so this is working absolutely fine now
let's come here go back to the author
and now what we're going to do is I'm
going to release this on FD to the
marketplace so the other can buy okay so
this time I'm going to set the price to
1000 ether okay that's pretty huge let's
and here you can see that the nft which
you have relisted that's displaying in
your Collectibles okay we're going to
rename this tabs okay instead of
collectible we're going to type listed
nft instead of create we're going to
type own nfts okay so it's working fine
click on this created no quantities you
have here okay so everything is working
fine so the problem we had in the last
video when we were not able to resell
the token with that because was and that
was happening because of we are not
taking we were not taking the price from
the input and we were not exporting the
functions okay so everything is working
so fine let's uh cut this one and let's
to come back to the author page and here
we're going to click on this author Tab
and here we're going to rename that okay
so let's come here where we have so here
we have the collectible so we're going
to change this to something like listed
nfts and here we're going to change this
to own nfts okay and the same thing we
have to do here we have to Simply change
this to listed and we're going to change
this to own nfts okay save it come here
and here you can see we have this listed
in empties and here we have this own nft
everything is working fine let's come
let's search and here you will find that
right now we have three nft in our
let's buy and resell couple of nfts to
check as you can see we bought this nft
now if I come here and if I try to buy
let's say come here and if I want to
realize this to the marketplace I can do
it very easily okay so I want to sell it
let's have a look it's working so
smoothly okay so this is the message
let's reload the browser and let's come
here simply close all of these open tab
and let's come back to this navigation
navbar and come up here and here we're
so here we're going to import the let's
say we have to import the use router
and here we're going to create that
okay so let's do it here so we'll say
router and this router is coming from
use router okay so we have the router
now simply copy that and we want to do a
couple of changes so here in the
navigation bar you can see we are
getting that weird behavior of reloading
because we are using this anchor tag so
we're going to replace this with the
router okay so just do simply what I'm
doing okay so what I'm going to do I'm
going to Simply remove this one I'm
going to remove this one and I'm going
to call this router okay I'm going to
call this push and I'm going to push to
that page where we where I want to
redirect to the user so the page which
you have called upload in fq again so
let's call uploader empty okay
so if we add this one so in this way
we'll do not have that real Behavior so
that's the one fix we have to do now
let's come here and if we click on this
create you can see we can simply switch
to the upload nft and there is no reload
okay and that's the same thing we're
other one okay so let's come here and
where we are here okay so we're going to
do on the logo okay so instead of logo
and in your case you might be having the
logo which I gave you okay so make sure
you do this change so let's simply come
so what we have to do here we're going
to add that on click function
and on the on click function we going to
have this router okay router push and we
want to redirect to the let's say home
page simply remove this one and remove
this one it's okay pretty good pretty
simple now if you click on this you can
see here we have redirect to the home
page and we are back on the upload page
so it's pretty good no problem we have
everything's working fine now let's come
back here to the sidebar because there
we have to make the change okay in the
sidebar as well so let's come up here
and here we are doing the same thing so
let's me fix this one very quickly
somebody I will remove this one remove
this one and here we're going to call
the router and I remember that I don't
have the router okay so let's come up
here and we have to import the router
very quickly so let's do it import and
let's uh use router and that's coming
from next router and we're going to take
and now we can utilize it so let's
scroll down here and here we're going to
call that so router dot push and we want
to push to the upload nft it's okay very
now everything is working fine you can
click and you can navigate to different
okay this one is also working fine
let's see on the mobile device
so that's how it will look you can see
this is the button we have let's click
on this and here we are so it's working
so this looks pretty good now here we
have to make the changes you can see in
the user profile we have this demo
address we want to change that as well
and we're going to add the link as well
on this my profile my item edit profile
help disconnect so we're going to
redirect that as well so let's close
this one and let's where we have that
one in the navigation and set the
navigation we have this profile card
okay so let's click on this and here we
have to do the changes so first thing we
have to do is we have to send the
account okay so here we go into here we
have the account and that's the account
we're going to send in this profile as a
send it and come back to the profile
component and here we're going to
receive it as a prop and we'll display
the actual address of the account
whoever is connected with application
and we're going to use the slice method
because we don't want to use the entire
address otherwise that will look weird
okay so I want to slide this down to
let's say let's make it nine so that's
let's make it to Lex 9.9 is not
displaying so it will start with zero
okay we'll start with let's say 10 big
let's start with 0 and 15. that looks
fine so that looks fine okay
and here we're going to provide this dot
and if we come back here now it's look
if we can increase that as well let's
it's really big let's make it to 20.
okay that looks fine let's make it to
if you guys want to increase it you can
increase from your side so let's come
here and if we simply change the account
and if you see the changes are also
taking place in the account so right now
we don't have different account here you
can see everything is happening
dynamically if you click here working
fine you can see we have a different
so what we have to do is let's scroll
down here and here we have that okay
we're going to Simply replace this one
so here we go to redirect to the author
profile is going to be the author okay
very we'll display all the information
simply change this one to also a profile
page because all the item is going to be
there in the author page and this will
become the let's say we have a page
what what is the name of the page
account okay so we want to read that to
and we have one more so here this one is
help so we're going to redact to the
okay that's the name I I think I've
us okay instead of Disconnect uh let's
and we're going to redirect to the about
so that's looking fine you can click and
you can simply redirect to the different
pages click on this one and you can see
about us so things are looking pretty
so everything's working fine working
fine now let's come here and let's have
a look so this is the tab we have and
here we're going to display all the
popular creators and this section is
going to be a very interesting and you
will learn something new in this it's
not going to be the regular component
because in this what we're going to do
is we're going to calculate the worth
of the nft for which is created by a
single user and that's what we're going
to display along with the address okay
so that's what we're going to do in the
so don't miss that part okay you will
learn that we have this demo data that's
what we're going to fix in the next
video and right now you can see we have
this hardcode value okay this hardcode
value but instead of this hardcode value
I want to display all the data which we
have in so instead of this hardcode
value I want to display the nft which is
listed for sale okay so we're going to
fix this one okay we're going to replace
right now we have this hard code let's
come back here close this one and I
believe that you guys have understood
that how you have to do it so if you
have understood pause the video and give
a try and after that you can continue
walking my Approach and your approach
might be different but the ultimate goal
should be that you have to get the
so you have to follow the same logic
okay so let's come here and go to the
index page and here we actually have
this component okay we have this title
and here we have this filter and here we
have this nft card the component and
that we have to display the data so
let's come here and here we are
displaying this random data okay
and that's all we are displaying here
okay but instead of this demo data we
have to display the actual data
so what we're going to do is let's come
search page and here we're going to do
couple of copy and paste okay simply
that's the same thing we're going to use
we actually we already have that okay
okay now we already have these setups
now let's come here we have to Simply
get this part okay use effect fetch nfts
simply copy this entire one and come
so we have this fetch nfts we have this
nft nft copies and the function we are
calling so the same thing nothing
complicated and that's the data we're
going to pass it here so the nft data
so let's pass nft data and in that we go
to send that nft data because simply
copy and come here and here we're going
to receive as a props so receive that
data and simply colors this and that's
the data we're going to render here
simply paste here so we have the data
and now you can simply comment this I'm
not remove it because you guys can have
so it's looking fine now we come back
all the nfts are displaying the images
are broken because we have to do the
setups but it's working fine okay
so now let's come here and here we're
going to change the images so instead of
this only LM we have to say images
and save it here we have the images okay
we'll come down and now we have to
display the price so I'll simply change
this one and here we're going to display
the name so data dot name save it okay
we have this problem why it's happening
okay let's come here and here we're
going to change the let's say where
and data nft dot Price save it okay
still we are not getting the price why
oh okay sorry sorry it's a element
okay so that's the change I have to do
okay simply copy this one and you have
and I believe that you guys have already
so let's replace this one and save it
and come back here and here you can see
we have the price we have the name so
things are looking pretty good and here
we have to do the changes in the token
IDs so we have the token ID as well so
you can see it's looking pretty fine we
have our Wonder Woman hey buddy we have
my nft so all the nfts are displaying
so things are looking good now let's
in the next video we're going to
complete that one let's have a look
let's come here go to the search page
and here you can see we have this one we
can easily search the woman this one is
also working fine we can search for
let's say hey it's working fine now
let's for the last one which is my and
it's working fine from here we can
and we can easily able to make the
purchase and here we can see we haven't
listed any nft from this account but we
own some Accounts at nft so this is the
nft which we have bought it click on
this and if we want to resell this let's
do that one and this time I want to sell
it no I want to create couple of new
nfts so let me do it very quickly okay
you can see this is the Nifty you have
if you click on this here you can able
to find that listed nfts this one which
you upgrade and this is the one which
we have this broken images okay so what
we can do to fix this one and if we come
on this follower and that follower is
also looking fine you can see
let's fix this one okay let's let's fix
go to these Pages go to this
so in the tab where it is so here we
have the data let's come up here and
here we have the data so instead of
sending this like array we can send this
nft okay for the timing we are sending
this way so we don't have that broken
image just simply replace this one and
comment this one and you can see my
this is looking fine okay now it's
looking good no broken things
are looking good this one is also
looking fine and let's come back to the
come back to the current wallet function
and let's add the function to connect
okay so we're going to attach the
function let's come here close all this
and right now I'm going to do only with
the metamask okay we'll do that other
so let's export this use context and
we're going to import that nft context
so let me do it very quickly and this is
coming from dot dot slash context
context and we have this nft context and
that we're going to receive that contest
what's the name which I have given to
that let's come up here and copy and
simply paste up here so we have this
context and now we're going to use this
use context okay so let's come up here
and we'll say const and here we say use
context will pass that nft Marketplace
context and the function which we want
to receive is this let's say make the
and we want to receive one more so we
want to receive this connect Vault
and simply the function we're going to
call on this okay so we're going to call
let's call on here okay simply wrap this
one and call this function here
okay so right now I'm just calling this
random same function in all the button
but we're going to have a separate
function for different button okay so
okay so that's what we have simply close
things are looking good just close all
and that's working fine we are already
connected that's why you can't see that
so let's click on this and come back to
and this is the things looking pretty
and you can see this is the Nifty now
that's out of the range and this is also
out of the range because I don't have
that much ether in this account so I can
purchase it and this is my created nft
this is my own nft and this is the like
nft and all the tabs are working fine
you can see all the functions are
looking pretty good now let's come up
and this is the section we're going to
do in the next video and trust me this
is going to be a very Dynamic one and
you will learn of something new okay
whatever you have done so far that was
okay but in this you will learn
something new because in this we're
going to calculate the entire worth of
the nft which a single user hold and
that's what we're going to display here
in this video we're going to build a
loader okay so you have noticed one
thing that when we're fetching the data
from the API or from the smart contract
it taking a little bit time so okay so I
thought let's make a dedicated video to
show you that how you can build the
loader and how you can display while
fetching the data okay so here I have
opened the project make sure you do that
and let's come up here and first thing
we have to do is to come up here in the
component section in the root directory
in the component section and here we're
going to create one folder called load
and inside the loader we're going to
create this loader.jsx and we have to
create the CSS file okay simply type
rafc and we have to create the CSS file
so that's the CSS file we have and let's
let's open this component and we have to
component.index so this is the structure
We are following so if we will go to
Import and Export from here so we'll
type let's say loader and that's coming
from the same directory okay we have
this loader and we have this loader
component and now we have to Simply copy
and we go to export down below
okay so this is the loader component we
have and simply close this one and come
up here and here we're going to do the
Imports so first thing we need the image
we're going to do the internal import we
need our CSS file so style and that's
coming from the same directory
and here we're going to build the GSX so
let's write the div and it will have a
class called style dot loader and so
that will have another div it will have
a class called style dot loader dashbox
inside that will have a another div this
will have a class called loader Dash box
image and that will have the image so
we're going to display the image so
right now let's import all the images
and that's coming from the image folder
okay so all the images which is already
provided to you guys okay so if you
haven't have the images so make sure you
visit dalton.com and go to the blog
section in the very first article you
will find all the details about this
project okay so here we have the images
now let's come up here let's go to this
image folder and actually I'm going to
Simply I have built this image okay
I'm going to make a site where I'm
simply drag and drop here so here I have
the loader and I'll simply closest one
and now we have to import the loader so
here we have that index.js so click on
this and here we're going to import the
and we'll call it let's say loader zip
okay let's call loader okay and this is
coming from the same directory okay we
have this Lotus zip and now we have to
export that so we're going to do it
right up here so this is the loaded
image we have now simply cut down and
here we're going to use that image so
image dot loader we have the image we're
going to take this all tag will provide
this loader and we have to provide the
width is going to be let's say
400 200 and height is going to be and
we're going to provide this class for
the CSS so 200 to 200 with 200 height
and we will press this object
is going to be cover so that's the image
now let's come back to the CSS and start
working on it so we'll say width is
zero Auto and we'll Target the Box we'll
say width is going to be 50 margin 0
Auto and that's looking fine we're going
to say change this to margin block okay
so block 4 Ram so we'll have some space
and this is the setup we have here now
let's close this open folder and let's
go to the pages go to this search Pages
because this is where we are displaying
the dynamic data from the smart contract
so we're going to add the loader here
first thing we have to do is to import
the loader and that is coming from
component index so let's import that
and here we have the loader simply copy
that and that's the loader we're going
to display right up here okay
so here we're going to add the dynamic
nft dot length is equal to zero okay so
if we have the nft length then we don't
want to display the loader we want to
display this data component but if we
the length is zero then we want to
display our loader simple logic okay
we'll call the loader component and
we're going to Simply cut this portion
so this is our loader is ready okay save
just looking fine save it and come up
deploy the contract and restart the
application so this is nothing something
this is nothing new to all of you guys
okay you guys already know how to do
that so let me do it very quickly
here we have the artifacts I'm going to
drag and drop the ABI of the contract
and let's restart the application
and let's open it on the browser and
here you can see here we are and here
the functions are working fine now let's
we have to type our credential unlock
and that's looking good let's come back
to the create and now we have to create
the before we create let's come back to
the search and let's see here you can
see the loader is working absolutely
so let's come back here let's bring this
down and go back to the CSS file and
here we're going to say that text align
and here we're going to add this loader
uh margin bottom 14 and top is going to
be minus 2 RAM so we'll have some little
space and we're going to add this
animation okay so I'll call this my
animation my move and it's going to be
and here we're going to create the
and on 50 percent we want to Simply
to let's say rotate 360 degree okay
and let's come down here we're going to
Target the image and we're going to say
and that's the only CSS we have to write
if we come back here you can see it's in
the center and it's working fine it's
spinning okay it's we don't have any
data that's why you can see this loader
so that's looking fine let's come back
and let's do the inspect element and
it's working fine let's go back to this
and let's try to create an nft
so before we do that let's clear the
entire history of the application
metamax so let's create a nft
click on this and let me fill out the
details so we need to fill out the name
we have to dig the description and we
have to give the price to 12 hit enter
and let's simply confirm the transaction
so here you can see we are redirect to
the search page and if I scroll here we
have the reader router and you can see
it's working fine loader and just wait
loading loading loading and let's do the
console log why it's taking too much
it's okay and let's come here let's
create one more okay it's taking too
much time so let's give it a couple of
so let's create one more and click on
cut this one and click at this here we
have the metamask and let's do the
and here we have the loader loading
error while fetching the data so simply
reload the browser and just wait
okay you have noticed that we are
getting an error so we have no function
to Cache the error so we're going to
create a global system which handle all
the error in our application and that's
what we're going to do in the next video
okay so right now just have a look so
here we have this loader working fine
and here finally the data arrive you can
see we have the data and the loader is
gone so it's looking fine if you click
on this you can see this is the Nifty
you have created and you this is the OWN
let's come here go back to the search
and we have the nft now we come back to
the create and let's create one more nft
okay let's give the price give the
description give the price to two
click on confirm transaction
and here we have react it's loading
so just wait it will take a little bit
of time so this data is coming from ipfs
or from the smart contract so it always
will take a little bit time okay so if
it's taking too much time make sure you
deliver the browser it will work so you
can see we have the data and it's
let's come back to the home page and you
can notice one thing here we don't have
that loader okay so here we are also
displaying that that listed nft so we're
going to add the loader here as well
so let's come back to the code and
simply close this one and go back to the
index page and here we're going to
so play load the loader and what I name
her load the loader and import the load
so simply copy that one and that's the
loader we're going to use it here so
we're going to make that Dynamic blocks
we'll say nft dot length F0 then we want
otherwise we want to display the actual
components so play cut and paste here
and this would be working fine you can
see we have the data it's arrived so the
load is not displaying anymore
reload the browser and let's have a look
the data is here so you can't see that
now let's come up here to check this
let's come back and go to this nft and
so simply come down click on this
confirm and here you are redirect to the
search page the loader is working fine
now let's come back to the home page and
let's scroll down and here you can see
the loader is working fine so just wait
the data would arrive it will take and
working fine everything is working fine
and you can see the moment I'm clicking
card we are not able to redirect to the
nft detail page okay so we have to add
so it's not working we have to add the
event let's come back here and let's go
and here we have to wrap this entire
component into a link tag okay so let's
come up here we're going to take this
which is coming from next.js okay length
and that's what we're going to wrap it
close this one and simply cut this part
and here we're going to provide the href
let's say what is the name we have
NF slash and empty details and we want
to send the entire data which we have
inside this element El okay in this we
have the entire data of this nft save it
and this will work so now if you click
on this here you have redirected to the
detailed page and simply close this one
and here you will find everything is
working fine so all the detail
you can come down and you can simply
click on this and you will redirect to
here okay things are looking pretty good
and this component is very usable you
can use wherever you want okay so all
you have to do is to plug this component
and you can use in every single portion
of your application so I hope that now
you know that how you can create loader
in react or in application like this
while fetching the data so let's come
back to the code One More close all this
thing and let's close this one and
that's the thing I want to show you
Let's uh come back to the application so
and this video is going to be a very
Advanced ones because in this video
we're going to display the data of the
creators nft creators not only that
we're going to calculate the entire
worth of their nfts and display and
we're going to build a robust systems
and display that who are the exactly top
creators of nft on this Marketplace okay
so that's what we're going to do okay so
here I have opened the project make sure
you do that the first thing we have to
do is to create a folder and make sure
that you create this folder in a root
directory so click on this and create a
folder and we'll call it let's say
let's say top creators okay that's the
creators and in that we're going to
create a file and this file will call it
top creator.js okay it's a Javascript
and in this we're going to build the
and what this system will do and this
system is actually a part of data
modeling that how you can structure the
data okay and that's a very vast topic
okay so if you want to become a pro
developer you have to know that how you
have to design a proper data modeling
okay so the logic here what we're going
to build is we have the all nfts and we
have the data we have the information
about the users who created that nft and
the price of that nft okay so one user
can create multiple nft okay so the
entire logic is going to be like this
that one user if a user created 10 nfts
and each nft cost 10 okay sorry 10 ether
so all together that particular user
have created 50 ethers of nfts okay so
we're going to calculate the entire
worth of nft which is created by a
single user okay single Creator so
that's the entire system we're going to
build and this is a part of a data data
structure okay so I hope you will learn
something new in this so let's start
working on it so we're going to build a
function we'll we'll export it and we'll
call it const and we're going to call
this function to get Toppers get top
creators and this will receive an array
this will receive an array of creators
we'll take this const and it will call
final creators empty array and here
we're going to take this const and we'll
say final result and here we're going to
use the special function which is a
reduce okay so if you want to know more
about this reduce function you can
simply go to MDM and you can find it out
so we'll call this reduce and it needs a
callback function so in this we're going
to pass this index and we're going to
pass the current value okay current
value so we have the current value and
it's going to be a narrow function and
in this what we're going to do is we're
going to build a system we'll take this
we're going to pass this current value
and equal to empty array okay once we
have that we're going to post that
entire data to this current value okay
let's come down we're going to say
simply come down here and it's going to
now here we're going to take this object
dot entries and in that we're going to
take this final result we're going to
Simply call this for each method and
it's read the Callback functions we'll
call it item it's going to be an array
function and that we're going to take
this Con seller and it's going to be a
first okay we'll take another one we
call total so the total sum of the nfts
we have that simply come down we're
going to Loop over it okay so we'll say
let's say new item okay let's call a new
this new item will have this number and
that we're going to take this new item
dot price okay we can own we are only
because this nft array has a all all
sort of properties like details about
the honor about the images but we are
only focusing on the price okay so we
have the price on that we're going to
call this reduce method and it's need a
callback function and then we're going
to pass the previous value okay
so when this Loop will run it will
remember the previous value and it will
add to the coming value okay so we'll
have the previous value and here we're
going to say current value and we're
going to sum up this together okay so
simply come here and we're going to take
previous Value Plus current value and
we're going to take this index as a zero
okay so when the loop will start for the
very first time it would be a zero but
as it goes on and on the data would be
keep updating okay so I'm going this way
or okay volume providing the value or
you can do do one thing you can take it
as a variable let's do that let's remove
it okay you can take it as a variable
but I'm just going in this way I'm
putting right straight up with the value
okay so zero and now we have to Simply
once we have the data we're going to
Simply return this because sorry we're
going to push this the entire data into
this final creators and simply push this
seller and we have to push this total
okay so that's the data we are pushing
into this and now we're going to Simply
in this the data we'll get we'll get the
Creator the address of the seller and we
get the total or worth of ether they
in terms of nfts okay so that's working
fine looking pretty good now let's come
here and we'll go to this index page and
here we have to send that data okay so
first we're going to import that
get topper and that's coming from the
coming from Top creators and top
creators so here we have that one now
simply copy that and we'll come here
we're going to stay creative listed
list and cons creators we're going to
call the function and we're going to
pass the entire nft data okay so we have
this in this so this is how we're going
to pass it now we're going to Simply
console log this the entire data
okay so find that I'm being less
do one thing comment this one okay so
that's working fine now here we're going
to pass the data top Creator and the top
follower okay we're going to pass that
create a data and simply copy that and
come here and here we're going to
and simply scroll down this is the
button we have and here we are
displaying okay so here we have the all
the data all the forward components
and here we're going to do that okay
we're going to replace this card array
with the actual data simply pass it and
and if we come up here and simply
comment this portion okay I just try to
keep it so just do what I'm doing okay I
know this is a quite Advanced one okay
you have to know that how you have to
deal with the algorithm how you have to
do with the data structure okay so just
follow if it not makes sense if when you
will see the reason everything will make
so that's working fine now let's come up
tab card and here we have received this
data and that's the data we are passing
up here okay so here we have this user
element.user but right now we don't have
any information about the any user
images okay so we'll just leave it like
okay before we do that let's come up
here and right now you can see
top created list we don't have anything
okay so no information is displayed the
no not this one this one we have to
click on you can see the other tabs are
working fine because they have the demo
data but the popular tab in which we
have attached that popular Crete is not
displaying okay let's come back to we're
going to fix this one and let's come
here and here we have the top creator
and actually we have we have to look at
where here we have this function and
okay let's come back to this function we
have created top created list and
I made a silly mistake in this function
okay so I will stop the recording and I
was trying to find out that what is the
problem happening so this is the problem
which I have created here so here we're
going to fix this one simply equal to
index and we're going to say current
and if you save now everything should be
working fine okay so make sure you do
this changes now let's come here and
here you can see we have the data we
two sorry two creators and they have we
have the address and we have the price
the total worth of ether they have sorry
ether they have in they have okay
so that's everything's working fine okay
so we have the seller total price
total value of nft and now if we come
here and here you can see we have the
two creators and we are displaying this
and here we're going to display the
actual data so let's come back here and
we'll simply close this one come back to
the follow Tab and go to this follower
tab card component and here we're going
so let's close all the tabs and now
let's come here so here we are
and where we go so this is the data we
have here simply remove this one
and simply click on this follower Tab
go to this follower tab Okay click on
this and here we are into you can see
how we are utilizing this component in
multiple places I know it's become very
nested but you can see in this way you
have to write very less code imagine
that you have to write the same code
over another one again for different
releases okay in the different different
but we are using this components and now
what we're going to do is simply we have
the data in here in here and we'll say
firstly we have to display the let's say
and if we have the price then we would
display the price but if we don't have
the price we have to display this zero
okay okay make sure I it's not price
it's total okay so change this to total
and here you can see we have the total
price okay so this user have created no
matter how many nft he he or she
created we're going to sum up we are
summing up all the nft value and
displaying that okay so the first create
a contain 457 ether so this is the
amount and this is the likes really
and here we're going to display the
instead of name right now we can't
display the name because we don't have
that it's better so it's better to
display the address so we'll display the
and we'll use this slice method because
we don't want to display the huge
address we want to display a part of it
so we'll call this slice method it will
start from this is zero and it will go
all the way to 9. if we save that you
can see here we have the address looking
now let's do something about the images
because we don't have the images so
let's add a condition so if we have the
background image then it's good we have
to display the background image but if
but if we don't have then we want to
display this demo so let's import the
images all the images so that's coming
and simply copy and that's maybe we're
going to call it we're going to say this
hardcore value save it here we have that
same thing we have to do is with the
let's say user user okay one so for time
being we are going this way okay
let's make it no let's bring it back to
one so that's looking fine okay we have
the address we have the calculated ether
of the calculated ether and that's
so if we come here if we create
let's change me the account so let's
this time we're going to create with
account number five okay fresh account
and now let's just create it quickly
um Let me give the name and this time we
are calling the price 231 sorry 321 okay
so just keep that price in mind and now
and you can see this one is working fine
here we come back here in the in the
home page and you can see the data
and here we have the account ads okay
created the nft okay so it's working
now let's come here and close all this
and come up here and we're going to add
the condition we'll say Creator length
then we want to display this loader else
we want to display this component okay
so we are using this reorder component
and now things are looking perfect you
can see the data came and everything is
we can come here we can buy I really
like this to buy nfts and just re-list
and here you can see we are getting an
and this error is happening in our
so we're gonna fix this bug not a big
deal simply close this go back to the
author page and in the author page we
have the component here this follower
so here we have this follower component
so we have this follow component and
here we have this data but in this we
don't have the seller data okay so we're
going to create it okay so let's come
and we'll give this random text
because we don't have the address simply
simply copy and do it's working fine now
close this one and come back and reload
okay we are still getting the error I
know why we are getting the error
because we are displaying the top
down below so where we have to provide
so it's happening in tab components so
let's come here and go to this author
you can see here we have to provide that
okay so let's click on this
so here we have the array in the author
page and here we have to provide that
let's give this random address for the
paste it so looking so far so good okay
everything's working fine now save it
come back to the application reload the
and here you can see everything is
looking fine right now we have listed
one nft to the marketplace and that's
the one you can see right up here this
is the nft we own it this is the nft
we are displaying for the time UK
and here we have the follower data okay
we can see that we have the address but
these are the demo address so that's why
they don't have any balance okay
this is working fine if you click on the
follower all the tabs are working fine
and look beautiful so everything is
functional and connected with the
and things are looking pretty good let's
come back to the home page and if you
come down here and here you can see this
this one is also working fine
so let's come back here and close all
so with that we are done with this video
hope you guys have learned something new
how to work with the data if you have
still any confusion any doubt then do
leave in the comment section I do
understand that this part is little
to keep move your head around okay so
try to watch the code once again and try
to understand that how the data is
Flowing if you have still any confusion
do leave in the comment section I'll try
in this video we're going to build a
more sophisticated system which handle
all the errors so you have noticed some
time that when we are fetching the
fetching the data from the API or from
the smart contracts it's taking some
time it's taking too much time and
because of that it's getting time out
and we are getting an error and
sometimes users are creating error while
creating nft so we need to have a system
in our application which can trigger
that error messages and display to the
user so that's the system we're going to
build in this video so hope you will
learn something new in this to how to
so here I have opened the project make
sure you do that and the first thing we
have to do is to come up here
and the components and we have to create
a folder so we'll call it error okay
here we go to build the error component
and in that we're going to create this
error.jsx and we have to create this CSS
file for error as well so let's create
this nothing new you guys already
getting familiar with this and here we
have the CSS file close this one and
come back to the error type rafc
and let's come here and here we're going
to import couple of things so
let's come here and we need to import
new state we need to use effect and use
we'll come down we're going to import
the image so this is optional but I
would like to have an image funny images
so that's why I'm displaying that and we
have to do the internal Imports so here
we're going to import the style file
and that's come from the same directory
and now let's import the images all the
images which we have inside this image
folder now let's come here we're going
to import the data from the context to
Smart contract import context and we'll
and that's coming from this context so
what is the name we have given let's
come back to the context and
this is what we have called nft
simply copy this one and come back and
paste it okay so this is our context now
we have to use that context const error
we need and we need the set
open Pro open error and here we're going
to pass this context so don't need to
worry we haven't created this
this error or set open error we're going
to create that state okay I'm just
writing out down so I can know that what
so these are the data we're going to
import from Market context nft Market
context let's build this HTML okay so
we'll type this style dot error and that
we're going to have another div it will
have a class called style Dash error box
and that we're going to have another div
it will have a class called error Dash
box info in that we're going to have the
and we'll take this old and it will have
an error where there's going to be 200
and height is also going to be 200.
nothing fancy let's come down we have to
assign a class and we'll say Style
error box info image okay and object
cover and now let's add the image image
and I remember I don't have the image so
let's come up here I have already built
that image and that's the error image
now I'm going to Simply drag and drop
you know the rules let's come here and
we're going to Simply import the image
we have the let's call it error is if
and that's simply copy and paste here so
this is how we are exporting that image
and now we can utilize it so that's the
error component is ready now we have to
display the actual error message okay
so let's pass the error right now we
don't have this data we're going to
create it let's comment down this out
and let's type this hardcore data error
so that's the entire j6 for this error
now let's come here and go to this index
component index and we have to import
okay this is a structure what we are
following and simply copy and Export
here so this is the error component
simply close this one and close this one
and go back to the nav bar here we're
going to attach this error component
so let's come here let's come up here
here we're going to import that error
components okay that's where we have it
let's close this one and let's go to
this nft Marketplace context now we have
to do all the setups build the logic in
the context because this is the file
we're going to catch all the errors
because here we are dealing with the
entire functionality of this application
so let's come up here and we're going to
the first one is going to be let's say
you state and it's going to be an error
and that's what we are receiving in our
error context a sorry error component
initially it would be empty and now we
have to take one more we'll call it open
initially it would be false okay
so these are the two states we are
that's what we have here simply copy
come here and here in the check if
wallet is connected so here we are
consoling console log here we are simply
logging out the error message in the
console but we're going to display
simply remove this one take this Dynamic
block we'll say set to true and
we'll simply remove this one we'll call
it simply cut this and paste here okay
so we're going to set that error message
so that's what we have here Simply Save
so we're going to set the true and we're
going to set the error message as well
so that's the thing you have to do and
now let's come back here and here we
have to do the same thing so simply
come here and this is going to be set
here sorry my mat not interested here
um here we going to do that simply copy
and simply paste it and here you have to
set set error so you know what you have
to do whenever you are simply console
log out there that's all places you have
to do the changes so let me do it very
quickly so let me do this one as well
take this one and we'll paste this one
we're going to say this set error and
we're going to Simply copy and paste
here and remove the spot so that's the
function for The Connect wallet you have
to do the changes here as well Etc and
this one as well now let me do it very
and here we are getting a shot of error
so because of this extra comma I'm
providing so simply come and remove this
and remove this one and close and
let's here remove it so right now all
the areas are gone so make sure you do
so things are looking good and now let's
keep continuing and changing that okay
so finally we are done with this we are
set the entire message and here we're
going to send that as well so okay we'll
so we are so make sure you do all these
changes whatever we have done and now
everything is looking fine let's come
here and simply go back to this nav bar
where it is nav bar inside the nav bar
we have this one and here we're going to
receive the data okay so let's receive
this open error that's what we're going
to utilize it let's scroll all the way
down and here we go to build a dynamic
open internet is false if you open it is
false then we don't want to display but
if it's true then we want to display
so that's pretty good if you come here
and here we are already receiving the
so here you have two options you can
either receive directly or you can send
it as a prop no problem in that okay
so that's the data we are passing here
okay and here we have this set open
error and that's what we're going to
click and we're going to call this set
open error and it's gonna be a false so
that's looking pretty good that's the
only setup we have to do here and to see
things are licking Place let's make it
to true so we'll do this true and now
we'll come back to the application and
here you can see we have this beautiful
crying baby image and the error message
and you can see we don't have an error
you can see this is the zip Emoji have
used you can use whatever you want it's
totally optional or you can simply
display a simple error message but I
like to have images so it's looking fine
now let's get start styling this one
and just working fine close all this one
and close this one and let's get back to
the close this one get back to the csys
error and first thing we have to do is
to set the background color so so on the
parent div I want to add some sort of
overlay okay so we're going to use this
variable but I remember that I don't
have that color so let's come back here
and let's create that okay let's go back
to the style file and the global CSS
style and here we're going to create
that so we'll simply replicate this one
and we're going to call it let's say
overlay and we're going to decrease the
opacity so we'll bring this Downs okay
little save it copy this one and come
and here we're going to say width is
going to be 100 and this will hide be
position is going to be fixed and Tau Z
index is going to be and top is going to
be zero and cursor pointer so whenever
someone will click on this overlay and
will turn the stage of the open error to
false okay and we'll close that pop-up
so welcome down we'll Target the error
box and we will have the top is 25
percent and will have the let's say left
is going to be 30 percent will have the
position is going to be absolute
background color is going to be fair and
in this we're going to display what
color we're going to display this main
BG color copy and simply paste here come
back here we're going to say padding is
going to be 2 RAM and 5 Ram we'll take
this border radius one Pixis and we'll
have this box Shadow and we're going to
use this custom box Shadow so play copy
this one and simply paste it so that's
the Box Shadow we have we'll say text
line Center and we'll have width to 40
percent now if we save it we'll come
down here we'll tag the let's say box
info p and will increase the font size
to 1.3 RAM and let's say cursor is going
color is going to be our icon color
simply copy and simply copy and paste
here we come it will take the media
query and we'll say on Max with 35 em we
want to Simply change couple of things
so top is going to be let's say five
is going to be five percent that is
going to be 90 and height is going to be
let's say 90 percent so this is the
setup for the mobile device looking fine
and let's say padding is going to be 2
RAM not more than that if we come here
save it and if we come here you can see
it's looking pretty good it's right it's
and looking fine you can do you can do
whatever you want with this okay so it's
totally up to you and you can see we
have this overlay but when we are
clicking on this the events is not
taking place okay so we have some
so the close it's not closing on click
let's come back here and let's close
this one and close this one and come go
where we are so here we are on the error
so here we are setting it to false and
we have this click function but it's not
okay not a big deal so first thing we
we have to get back where we are
displaying the components so let's go
uh nav bar and inside that nav bar we
have here so okay sorry my bad we have
to Simply remove this one and now it
close this one right now we don't have
it it's looking fine and to see things
are working or not let's come here and
we want to create an nft without
filling out all the details okay so
let's click on this upload function and
you can see we it's triggering up okay
so we have this hardcode value what we
can do is it's working fine you can see
it's working fine now let's come here
and instead of this hardcore value we
want to display the actual error message
so let's come here and here we go into
simply remove this portion and we're
going to make it active this one save it
and that's what we are getting here if
you click on this here you can see data
is missing you can add some fancy text I
just added this simple data is missing
so that's looking fine everything is
now when now whatever error will happen
in this entire application this pop-up
will trigger and it is and and it will
display the error message now let's
click on this nft and let's create
okay let's create this beautiful nft my
nft and let's give me give the
I believe that you guys are enjoying
this project if you have still any
questions any query do leave in the
comment section okay do live it
and here we are let's create that nft
and here we are redirect our loader is
also working fine which we have built in
the last video If you haven't watched
make sure you watch it and it's loading
and let's do the inspect element and see
how what you can see here we have and
and this is the entire nft we have
created so far and we have created one
if you click on this you are this is the
nft which we have created from this
and you can see here we have one more
it's good that this error is happening
so I can show you all the things so we
have this problem in our let's say
in our search page we have this problem
okay you can see we are getting the
message error while fetching nfts
so that's the problem we are having so
I'm back to the code and let's close
and now we have to go back to the search
page and let's come up here and here we
okay so we're going to wrap this
function fetch nft into a try and cat so
so that's the data we have here we're
going to call this error and we're going
to say try and catch we're going to cut
and here we're going to call this it's
set error not only error set error
simply copy and then we have to set the
error message so we'll say that
browser the reason why I'm adding this
particular message because this is the
error is not happening in our code this
it is happening from when we are
fetching the data from the contract from
the ipfs so it's taking too much time on
such scenario we're going to have this
error so we'll allow the user to reload
the browser we'll tell the user to
reload the browser so every can start
from fresh okay so that's the message we
have and now things are looking good
okay so that's the change you have to do
now let's simply come here and it's
loading and here finally the data arrive
things are looking fine you can click
and you can navigate wherever you want
you can click on this and you can see
that how many you have created how many
and following followers let's come back
to the code uh home page and let's
scroll down you can see the top creators
we have these three creators with total
and this is the data we are displaying
now let's buy this nft I really like to
buy and sell an empty okay so let's come
two entry here we have bought this one
okay you can see this is the nft we have
bought if we click on here we can
re-list this nft let's re-list it let's
type the price to let's say two three
listed in P section and you can see the
if you come back to the home here you
can see in the follow section that
popular nft creators and you can see
this data is also get updated okay
now he has this much ether of nfts
it's looking fine and this data is also
so you can see all the data is
displaying beautiful let's come here and
that's okay let's come down and
close this one with this finally we are
done with this entire project we have
built our smart contract we have built
out for an application we have connected
the smart contract with the funded
we're going to start building the API
okay we're going to use the mongodb
as a backend server okay so we're going
to use mongodb and we're going to build
a more robust API for this application
and you have seen that there is a lot of
data is missing for the nft so in the
nft details page we have a lot of data
and the smart contract we have written
is very minimum we're going to make it
more advanced and mass contract which
can handle everything okay so this
application this this in that entire nft
Marketplace will have two version one
version which is totally controlled by
the smart contract and that we don't
need to have any backend API server that
entire thing would be controlled by the
smart contract in terms of liking
follower displaying the dynamic data
selling and transaction every single
data would be controlled by the smart
contract and it there would be another
version where we're going to make the
for this particular application okay so
we're going to re-modify the smart
contract whatever we have built because
this smart contract is pretty simple
we're going to make it more advanced
which can suit this application so
that's the only thing I want to cover
hope you guys have enjoyed and whatever
we have worked so far you have coded
along with me if you have still any
confusion any doubt do leave in the
comment section join the Discord server
if you have any error post your queries
there post the error the user the member
of the Discord server will help you if I
will get a chance I will help you too
okay so be a part of this community help
each other if you know anything if you
have any idea do leave the ideas in
there so we're going to include those
functionality those project in this
amazing Marketplace okay so that's the
only thing I want to cover hope you guys
have enjoyed this project if you really
enjoy this project do hit like And
subscribe that will motivate me a lot
and I would come back motivate me a lot
and that's the only thing I want to tell
you and from the next video or maybe
from the next to next video we'll start
building the API backend part of this
application so let's move to that have a