skip to Main Content

Javascript – Uncaught Error: Could not find a matching route when redirecting to /login page after logout

I'm trying to implement JWT in my project and an article provides a nice solution: https://dev.to/sanjayttg/jwt-authentication-in-react-with-react-router-1d03. Routes.jsx import { RouterProvider, createBrowserRouter } from "react-router-dom"; import { useAuth } from "../provider/authProvider"; import { ProtectedRoute } from "./ProtectedRoute"; import Login from "../pages/Login";…

VIEW QUESTION

Javascript – Data display on second click

import React from "react"; import Button from "./Button"; import Section from "./Section"; import { Dragendrop } from "./Dragendrop"; export const RightBox = () => { const [fileData, setFileData] = React.useState(); const [data, setData] = React.useState(null); const [recieverAddress, setReceiverAddress] = React.useState("");…

VIEW QUESTION

Javascript – boundingBoxCollection length is 0

const { selectedButton } = this.state; var boundingBoxCollection = []; console.log(boundingBoxCollection.length); var boundingBoxes = document.querySelectorAll('.cropper-face'); console.log("I am ice"+boundingBoxes.length); if(boundingBoxes.length > 0){ boundingBoxes.forEach(elem => { if(!boundingBoxCollection.includes(elem)){ boundingBoxCollection.push(elem); } }); } my boundingBoxCollection is not updated fix this, I want my array…

VIEW QUESTION
Back To Top
Search