Next.js Discord

Discord Forum

Table row NextLink

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Avatar
Sloth bearOP
How am I supposed to link a table row in a SSR component. AFAIK you are not allowed to wrap a <tr> in a link

7 Replies

Avatar
what about putting a link in a <tr />?
Avatar
Sloth bearOP
this isn't valid html. my current solution is a cs-component tableRowLink with onclick
Avatar
oh sorry I misunderstood your question @Sloth bear
I wonder why you use table instead of ul/ol if you need to make your <tr /> a link?
Avatar
if you still stay using <table /> I would recommend javascript to open a link
Avatar
Sloth bearOP
@James4u (Tag me if needed) I now just wrapped the content of the td in a link and made it full size
Avatar
yeah that should also work!
I thought you have the same <td />s in that <tr />