#Next map

15 messages · Page 1 of 1 (latest)

edgy shuttle
#

Is this fine? bc is not working :

{links.map(({label,value})=>{
<Link className="navbar__link relative" href={value}>
a{label}
</Link>
})}

nimble solarBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

edgy shuttle
teal escarp
glass niche
#

You’re missing an explicit return, you’ll need it whenever you use the curly braces {}. Try this instead:

{links.map(({ label, value }) => (
  <Link className="navbar__link relative" href={value}> 
    {label}
  </Link>
))}
teal escarp
#

and slight formatting recommendation for both of you, you can style codeblocks
```jsx
export default function Component() {
return (
<h1>Hello 👋</h1>
)
}
```
turns into:

export default function Component() {
  return (
    <h1>Hello 👋</h1>
  )
}
edgy shuttle
#

Thanks guys, now it works!

#

I have another question, how do i redirect a user on success of a function? like redirect("/")? bc is not working

teal escarp
#

you use nextjs's useRouter and .push

edgy shuttle
#

Oh okay, i ll try that thanks

teal escarp
teal escarp
#

i meant the bot command (on message) btw - i know it isn't very normal tho

nimble solarBOT
#
✅ Success!

This question has been marked as answered! If you have any other questions, feel free to create another post

Jump to answer

[Click here](#1162045067737972756 message)