#Expected server HTML to contain a matching <table> in <body>

2 messages · Page 1 of 1 (latest)

small oyster
#

I am a little confused by this error message. What should I do?

This is my table-component:

export default function Table({ headings, rows }) {
    return (
        <table>
            <tr>{headings}</tr>
            {rows.map((row) => {
                return (
                    <tr>
                        {row.map((data) => (
                            <td>{data}</td>
                        ))}
                    </tr>
                )
            })}
        </table>
    )
}

Here I load it:

export default async function ControlPanel() {
    const currentUser = await getCurrentUser()
    const links = await getLinks({ user: currentUser })

    const tableHeadings = ['Titel', 'URL-Segment', 'Beschreibung', 'Längengrad', 'Breitengrad', 'Beginn', 'Ende']
    const tableRows = links.map((link) => {
        return [link.name, link.slug, link.description, link.latitude, link.longitude, link.startingAt, link.endingAt]
    })

    return (
        <>
            <Table headings={tableHeadings} rows={tableRows} />
        </>
    )
}
green briarBOT
#

🔎 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)