I need to mask url in reactjs to hide the id

661 Views Asked by At

I have the following problem, I need to hide or mask the id that appears in the URL with another name, for example: http://localhost:3000/client/1 if the user changes the "1" to a "2" he can access the data of the ID "2", I was thinking of hiding the ID or just showing any other word example: http://localhost:3000/client/ myID, that way the user will not know what to modify, I will leave the code that I currently have

const { tableNumber } = useParams();          
<Link as={"cambiarID"} to={`/client/${tableNumber}`}>
   <Button className="botonHome" positive icon onClick={goToCart}>
     <Icon name="home"  /> | Categorias
   </Button>
</Link>

tableNumber is the ID number - any help is appreciated

0

There are 0 best solutions below