Don't initialize KBar when unauthed (#6328)
* Don't initialize KBar when unauthed * Don't render trigger when query is undefinedpull/6327/head^2
parent
d95bba63f4
commit
e5f0452728
|
@ -273,7 +273,7 @@ export const KBarContent = () => {
|
|||
|
||||
export const KBarTrigger = () => {
|
||||
const { query } = useKBar();
|
||||
return (
|
||||
return query ? (
|
||||
<>
|
||||
<Tooltip side="right" content={isMac ? "⌘ + K" : "CTRL + K"}>
|
||||
<button
|
||||
|
@ -284,7 +284,7 @@ export const KBarTrigger = () => {
|
|||
</button>
|
||||
</Tooltip>
|
||||
</>
|
||||
);
|
||||
) : null;
|
||||
};
|
||||
|
||||
const DisplayShortcuts = (item: shortcutArrayType) => {
|
||||
|
|
|
@ -195,8 +195,13 @@ export default function Shell(props: LayoutProps) {
|
|||
useRedirectToLoginIfUnauthenticated(props.isPublic);
|
||||
useRedirectToOnboardingIfNeeded();
|
||||
useTheme("light");
|
||||
|
||||
return (
|
||||
// don't load KBar when unauthed
|
||||
return props.isPublic ? (
|
||||
<>
|
||||
<CustomBrandingContainer />
|
||||
<Layout {...props} />
|
||||
</>
|
||||
) : (
|
||||
<KBarRoot>
|
||||
<CustomBrandingContainer />
|
||||
<Layout {...props} />
|
||||
|
|
Loading…
Reference in New Issue