1
0
mirror of https://github.com/uetchy/namae.git synced 2025-08-20 18:08:11 +09:00

feat: setup test for web

This commit is contained in:
2019-08-14 18:46:57 +09:00
parent c2a51aee2a
commit 03d76805af
12 changed files with 960 additions and 842 deletions

22
web/src/util/suspense.js Normal file
View File

@@ -0,0 +1,22 @@
import React, { Suspense } from 'react'
import styled from 'styled-components'
import BarLoader from 'react-spinners/BarLoader'
export function FullScreenSuspense({ children }) {
return <Suspense fallback={<Fallback />}>{children}</Suspense>
}
const Container = styled.div`
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
`
const Fallback = () => (
<Container>
<BarLoader />
</Container>
)