Here are the steps – 1. const [formData, setFormData]=useState({}) 2. Add onChange and onclick – <FileInput type=’file’ accept=’image/*’ onChange={(e)=>setFile(e.target.files[0])}/> <Button type=’button’ gradientDuoTone=’purpleToBlue’ size=’sm’ …

Here are the steps – 1. Create a route “post.route.js”- import express from ‘express’ import {verifyToken} from ‘../utils/verifyUser.js’ import { create } …

Here are the Steps – 1 – Add a property in the user model – isAdmin:{ type:Boolean, default:false }, 2. In mongoDb …

Here are The Steps – Step 1 – Create a route – router.post(‘/signout’, signOut) Step 2 –  Create a signOut Controller – …

Here are the steps – Step 1 –   const [showModal, setShowModal]=useState(false); Step 2 – Add onClick – <span className=’ cursor-pointer’ onClick={()=>setShowModal(true)}>Delete Account</span> …

Here are the Steps – 1. Create a route – router.delete(‘/delete/:userId’, verifyToken, deleteUser)   2. Create a user delete controller – export …

Here are the Steps: – Add route – router.put(‘/update/:userId’, verifyToken, updateUser); Install a package – npm i cookie-parser Import cookie parser in …

Here is complete code – DeshProfile.jsx: import React, { useEffect, useRef, useState } from ‘react’ import { Alert, Button, TextInput } from …

Here are the steps: – Add a H1 Heading. Add Profile Image. Add Input fields. Add a button. Add another two button …

Here are the Steps – 1.  Create Component – DashSidebar.jsx: import {Sidebar} from ‘flowbite-react’ import { useEffect, useState } from ‘react’; import …