feat: refactoring, soem work on forms
This commit is contained in:
@@ -7,7 +7,6 @@ const loggedOutLinks = [
|
||||
const loggedInLinks = [
|
||||
{ href: "/", label: "Home" },
|
||||
{ href: "/dashboard", label: "Dashboard" },
|
||||
{ href: "/sign-out", label: "Sign out" },
|
||||
];
|
||||
|
||||
export interface Props {
|
||||
@@ -29,6 +28,13 @@ export default function Header(props: Props) {
|
||||
<a href={l.href}>{l.label}</a>
|
||||
</li>
|
||||
))}
|
||||
{props.loggedIn && (
|
||||
<li>
|
||||
<form method="post" action="/sign-out">
|
||||
<button type="submit">Sign out</button>
|
||||
</form>
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user