0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-03 22:15:32 -05:00

refactor(console): click console logo should navigate to root page (#5981)

This commit is contained in:
Charles Zhao 2024-06-03 20:15:30 +08:00 committed by GitHub
parent a495ab00ba
commit ac5d846c44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -11,6 +11,7 @@
width: auto;
height: 28px;
color: var(--color-text);
cursor: pointer;
}
.line {

View file

@ -14,6 +14,7 @@ import DynamicT from '@/ds-components/DynamicT';
import Spacer from '@/ds-components/Spacer';
import TextLink from '@/ds-components/TextLink';
import useDocumentationUrl from '@/hooks/use-documentation-url';
import useTenantPathname from '@/hooks/use-tenant-pathname';
import { onKeyDownHandler } from '@/utils/a11y';
import ContactModal from './ContactModal';
@ -32,11 +33,17 @@ type Props = {
function Topbar({ className, hideTenantSelector, hideTitle }: Props) {
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
const { navigate } = useTenantPathname();
const LogtoLogo = isCloud ? CloudLogo : Logo;
return (
<div className={classNames(styles.topbar, className)}>
<LogtoLogo className={styles.logo} />
<LogtoLogo
className={styles.logo}
onClick={() => {
navigate('/');
}}
/>
{isCloud && !hideTenantSelector && <TenantSelector />}
{!isCloud && !hideTitle && (
<>