francisco saraos
francisco saraos

Reputation: 11

I need to mask url in reactjs to hide the id

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

Upvotes: 0

Views: 874

Answers (0)

Related Questions