Create a page where user will land after clicking on email link. That’s where you need to grab token from route params.

Use useParams hook to grab route params

// pages/auth/AccountActivate.js
import { useParams } from "react-router-dom";
import { useAuth } from "../../context/auth";

export default function AccountActivate() {

  const { token } = useParams();

  return (
      className="display-1 d-flex justify-content-center align-items-center vh-100"
      style={{ marginTop: "-5%" }}
      Please wait...

Import in App.js

import AccountActivate from "./pages/auth/AccountActivate";

  element={<AccountActivate />}