Updates for cloud mode.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user