forked from Alex/Pterodactyl-Panel
Fix suspense spinner to make it indistinguishable from other loading
This commit is contained in:
parent
db7f3e5fc0
commit
cbdede75a7
@ -34,7 +34,7 @@ const Spinner = ({ centered, ...props }: Props) => (
|
||||
centered ?
|
||||
<div
|
||||
css={[
|
||||
tw`flex justify-center`,
|
||||
tw`flex justify-center items-center`,
|
||||
props.size === 'large' ? tw`m-20` : tw`m-6`,
|
||||
]}
|
||||
>
|
||||
|
@ -1,15 +1,8 @@
|
||||
import React, { Suspense } from 'react';
|
||||
import Spinner from '@/components/elements/Spinner';
|
||||
import tw from 'twin.macro';
|
||||
|
||||
const SuspenseSpinner = ({ children }: { children?: React.ReactNode }) => (
|
||||
<Suspense
|
||||
fallback={
|
||||
<div css={tw`mx-4 w-3/4 mr-4 flex items-center justify-center`}>
|
||||
<Spinner centered/>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
const SuspenseSpinner: React.FC = ({ children }) => (
|
||||
<Suspense fallback={<Spinner size={'large'} centered/>}>
|
||||
{children}
|
||||
</Suspense>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user