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:
parent
a495ab00ba
commit
ac5d846c44
2 changed files with 9 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
|||
width: auto;
|
||||
height: 28px;
|
||||
color: var(--color-text);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.line {
|
||||
|
|
|
@ -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 && (
|
||||
<>
|
||||
|
|
Loading…
Add table
Reference in a new issue