mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Updates for cloud mode.
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled
This commit is contained in:
parent
dc1736458b
commit
f40e1b44f3
51 changed files with 251 additions and 173 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue