Syntax Error using <nav>
Unanswered
Baldfaced hornet posted this in #help-forum
Baldfaced hornetOP
import React from 'react';
import Link from "next/link";
import Image from 'next/image'
const Navbar = () => {
return (
<nav className="flexBetween navbar">
<div className="flex-1 flexStart gap-10">
<Link href="/">
<Image
src="/logo.svg"
width={115}
height{43}
alt="Reef Trader"
/>
</Link>
<ul className="">
</ul>
</div>
</nav>
)
}
export default Navbar;import './globals.css';
import Navbar from "@/components/Navbar";
import Footer from "@/components/Footer";
import React from "react";
export const metadata = {
title: 'Reef Trader',
description: 'Reef Trader is your go-to online marketplace for all things saltwater hobby-related. Buy and sell coral, fish,' +
' equipment, and more. Join frag swaps, connect with your local community, and enjoy secure transactions. Dive into the Reef Trader community today.',
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>
<Navbar />
<main>
{children}
</main>
<Footer />
</body>
</html>
)
}5 Replies
Baldfaced hornetOP
I believe it has something to do with the <Image> tag as commenting this out allows the code to compile
Baldfaced hornetOP
Baldfaced hornetOP
I was missing an "=" on my height={43} for the image tag.
/closed