Clone the Next Js project for more overview.
Follow the folowing steps to clone the Next.js project into your local environment and check the working of the code.
To get stated first clone the repository using the following command
git clone https://github.com/0mkarBhosale07/nextjs-qrcode-example.git
After cloning navigate into the project directory using the following command
cd nextjs-qrcode-example
Now install all the dependencies of the project using the following command
npm install
Make sure that this projects uses the lastest version of Next.js with TypeScript and Tailwind CSS.
Now create the .env file in the root directory of the project and add the following line to it
NEXT_PUBLIC_UPI_ID = Your UPI ID here
After adding the .env file navigate to the scr/app/page.tsx
file and change the ammount variable with your desired amount.
Also you can check the working code in src/app/components/QRCode.tsx
file.
Now start the development server using the following command
npm run dev
That's All! 😉