My function currently is creating multiple buttons with the map function when i'm trying to just map the URL of the ID. how do I change this?
<NavBtn>
{data.map((user) => (
<div key={user._id}>
<NavBtnLink to={`/account/${user._id}`}></NavBtnLink>
</div>
))}
</NavBtn>
What's the value of data? It's probably got more than one user in. Map transforms every value of an array to another value.
If you just wanted the first user you could do:
<NavBtn>
{data.find(element => element).map((user) => (
<div key={user._id}>
<NavBtnLink to={`/account/${user._id}`}></NavBtnLink>
</div>
))}
</NavBtn>