changed chat renderer and layout wrapper to work with google auth
This commit is contained in:
parent
c829a6bc15
commit
a9599c5330
2 changed files with 4 additions and 2 deletions
|
|
@ -51,7 +51,8 @@ export function ChatRenderer({
|
||||||
if (typeof window === "undefined") return false;
|
if (typeof window === "undefined") return false;
|
||||||
const savedStep = localStorage.getItem(ONBOARDING_STEP_KEY);
|
const savedStep = localStorage.getItem(ONBOARDING_STEP_KEY);
|
||||||
// Show layout if settings.edited is true and if no onboarding step is saved
|
// Show layout if settings.edited is true and if no onboarding step is saved
|
||||||
return !!settings?.edited && savedStep === null;
|
const isEdited = settings?.edited ?? true;
|
||||||
|
return isEdited ? savedStep === null : false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Only fetch conversations on chat page
|
// Only fetch conversations on chat page
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,10 @@ export function LayoutWrapper({ children }: { children: React.ReactNode }) {
|
||||||
|
|
||||||
const isUnhealthy = health?.status === "unhealthy" || isError;
|
const isUnhealthy = health?.status === "unhealthy" || isError;
|
||||||
const isBannerVisible = !isHealthLoading && isUnhealthy;
|
const isBannerVisible = !isHealthLoading && isUnhealthy;
|
||||||
|
const isSettingsLoadingOrError = isSettingsLoading || !settings;
|
||||||
|
|
||||||
// Show loading state when backend isn't ready
|
// Show loading state when backend isn't ready
|
||||||
if (isLoading || isSettingsLoading || !settings) {
|
if (isLoading || (isSettingsLoadingOrError && (isNoAuthMode || isAuthenticated))) {
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen flex items-center justify-center bg-background">
|
<div className="min-h-screen flex items-center justify-center bg-background">
|
||||||
<div className="flex flex-col items-center gap-4">
|
<div className="flex flex-col items-center gap-4">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue