Merge pull request #366 from LAION-AI/156-fix-header-link

Change the header logo link based on signed in status
This commit is contained in:
AbdBarho
2023-01-04 10:23:49 +01:00
committed by GitHub
+4 -1
View File
@@ -21,6 +21,9 @@ function AccountButton() {
}
export function Header(props) {
const { data: session } = useSession();
const homeURL = session ? "/dashboard" : "/";
const { colorMode } = useColorMode();
const borderClass = props.transparent
? ""
@@ -31,7 +34,7 @@ export function Header(props) {
<nav className={`oa-basic-theme ${borderClass}`}>
<Box className="relative z-10 flex justify-between px-4 py-4">
<div className="relative z-10 flex items-center gap-10">
<Link href="/" aria-label="Home" className="flex items-center">
<Link href={homeURL} aria-label="Home" className="flex items-center">
<Image src="/images/logos/logo.svg" className="mx-auto object-fill" width="50" height="50" alt="logo" />
<Text fontFamily="inter" fontSize="2xl" fontWeight="bold" className="ml-3">
Open Assistant