-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
508 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
import React from "react"; | ||
import Link from "next/link"; | ||
import Image from 'next/image'; | ||
import logo from "../logo.svg" | ||
import Image from "next/image"; | ||
import logo from "../logo.svg"; | ||
|
||
const Header: React.FC<{page: "index" | "semantic"}> = ({page}) => { | ||
const sidebar = page === "index" ? ( | ||
<span className="flex flex-col font-semibold flex-1 justify-start text-right"> | ||
<Link href="/semantic">Show Sources</Link> | ||
</span> | ||
) : ( | ||
<span className="flex flex-col font-semibold flex-1 justify-start text-right"> | ||
<Link href="/">Go Chat</Link> | ||
</span> | ||
); | ||
const Header: React.FC<{ page: "index" | "semantic" }> = ({ page }) => { | ||
const sidebar = | ||
page === "index" ? ( | ||
<span className="flex flex-1 flex-col justify-start text-right font-semibold"> | ||
<Link href="/semantic">Show Sources</Link> | ||
</span> | ||
) : ( | ||
<span className="flex flex-1 flex-col justify-start text-right font-semibold"> | ||
<Link href="/">Go Chat</Link> | ||
</span> | ||
); | ||
|
||
return (<div className="flex my-4"> | ||
<Image src={logo} alt="aisafety.info logo" width={36}/> | ||
<h1 className="flex-1 my-0">AI Safety Chatbot</h1> | ||
{sidebar} | ||
</div>); | ||
return ( | ||
<div className="my-4 flex"> | ||
<Image src={logo} alt="aisafety.info logo" width={36} /> | ||
<h1 className="my-0 flex-1">AI Safety Chatbot</h1> | ||
{sidebar} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Header; |
Oops, something went wrong.