mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-27 16:10:30 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user