Updates for cloud mode.
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled

This commit is contained in:
Mike Cao 2025-09-04 20:27:42 -07:00
parent dc1736458b
commit f40e1b44f3
51 changed files with 251 additions and 173 deletions

View file

@ -11,7 +11,7 @@ export function AdminLayout({ children }: { children: ReactNode }) {
const { formatMessage, labels } = useMessages();
const { pathname } = useNavigation();
if (!user.isAdmin) {
if (!user.isAdmin || process.env.cloudUrl) {
return null;
}

View file

@ -2,7 +2,7 @@ import { Metadata } from 'next';
import { AdminLayout } from './AdminLayout';
export default function ({ children }) {
if (process.env.cloudMode) {
if (process.env.cloudUrl) {
return null;
}

View file

@ -9,7 +9,7 @@ export function UserProvider({ userId, children }: { userId: string; children: R
const { data: user, isFetching, isLoading } = useUserQuery(userId);
if (isFetching && isLoading) {
return <Loading position="page" />;
return <Loading placement="absolute" />;
}
if (!user) {