Merge pull request #10 from Aleksey-Levin/frontend/dice
feat: edit loading
This commit is contained in:
commit
d8378f3aad
3 changed files with 26 additions and 2 deletions
20
frontend/casino/src/app/components/Loading/Loading.tsx
Normal file
20
frontend/casino/src/app/components/Loading/Loading.tsx
Normal file
|
@ -0,0 +1,20 @@
|
|||
import LoadingImg from '../../../assets/Capibebra.gif'
|
||||
import { styled } from '../../../styles'
|
||||
|
||||
const LoadingStyle = styled('div', {
|
||||
width: '100vw',
|
||||
height: '100vh',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
})
|
||||
|
||||
const Loading = () => {
|
||||
return (
|
||||
<LoadingStyle>
|
||||
<img src={LoadingImg} />
|
||||
</LoadingStyle>
|
||||
)
|
||||
}
|
||||
|
||||
export default Loading
|
BIN
frontend/casino/src/assets/Capibebra.gif
Normal file
BIN
frontend/casino/src/assets/Capibebra.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
|
@ -1,10 +1,14 @@
|
|||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import { App } from './App.tsx'
|
||||
import './index.css'
|
||||
import Loading from "./app/components/Loading/Loading.tsx";
|
||||
|
||||
const App = React.lazy(() => import('./App').then(module => ({ default: module.App })))
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
<React.Suspense fallback={<Loading />}>
|
||||
<App />
|
||||
</React.Suspense>
|
||||
</React.StrictMode>,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue