remove loading screen

This commit is contained in:
Jing Hua 2023-03-12 02:40:13 +08:00
parent b04e95b1b8
commit 7b1dae90ad
3 changed files with 5 additions and 21 deletions

View file

@ -1,9 +1,8 @@
import React, { useEffect, Suspense } from 'react'; import React, { useEffect } from 'react';
import useStore from '@store/store'; import useStore from '@store/store';
import Chat from '@components/Chat'; import Chat from '@components/Chat';
import Menu from '@components/Menu'; import Menu from '@components/Menu';
import LoadingScreen from '@components/LoadingScreen';
import useInitialiseNewChat from '@hooks/useInitialiseNewChat'; import useInitialiseNewChat from '@hooks/useInitialiseNewChat';
import { ChatInterface } from '@type/chat'; import { ChatInterface } from '@type/chat';
@ -66,12 +65,10 @@ function App() {
}, []); }, []);
return ( return (
<Suspense fallback={<LoadingScreen />}> <div className='overflow-hidden w-full h-full relative'>
<div className='overflow-hidden w-full h-full relative'> <Menu />
<Menu /> <Chat />
<Chat /> </div>
</div>
</Suspense>
); );
} }

View file

@ -1,12 +0,0 @@
import React from 'react';
import SpinnerIcon from '@icon/SpinnerIcon';
const LoadingScreen = () => {
return (
<div className='w-full h-full flex justify-center items-center bg-gray-800 text-gray-100'>
<SpinnerIcon className='inline w-12 h-12 text-gray-400 fill-green-500/60 animate-spin' />
</div>
);
};
export default LoadingScreen;

View file

@ -1 +0,0 @@
export { default } from './LoadingScreen';