-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3cee88a
commit e1f9cbc
Showing
6 changed files
with
91 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,4 +84,5 @@ export { | |
export { | ||
B3PageMask, | ||
showPageMask, | ||
} from './pageMask/B3PageMask' | ||
Loading, | ||
} from './loadding' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { | ||
useContext, | ||
} from 'react' | ||
|
||
import { | ||
GlobaledContext, | ||
} from '@/shared/global' | ||
|
||
import { | ||
DispatchProps, | ||
} from '@/shared/global/context/config' | ||
|
||
import Loading from './Loading' | ||
|
||
export const B3PageMask = () => { | ||
const { | ||
state: { | ||
showPageMask, | ||
}, | ||
} = useContext(GlobaledContext) | ||
|
||
return ( | ||
<> | ||
{ | ||
showPageMask && ( | ||
<Loading /> | ||
) | ||
} | ||
</> | ||
) | ||
} | ||
|
||
export const showPageMask = (dispatch: DispatchProps, isShow: boolean) => { | ||
dispatch({ | ||
type: 'common', | ||
payload: { | ||
showPageMask: isShow, | ||
}, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { | ||
Box, | ||
Typography, | ||
} from '@mui/material' | ||
|
||
const Loading = () => ( | ||
<Box | ||
sx={{ | ||
width: '100%', | ||
height: '100%', | ||
position: 'fixed', | ||
top: 0, | ||
left: 0, | ||
backgroundColor: '#fef9f5', | ||
zIndex: 120000, | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}} | ||
> | ||
<Typography | ||
sx={{ | ||
position: 'absolute', | ||
top: '50%', | ||
left: '50%', | ||
transform: 'translate(-50%, -50%)', | ||
color: 'black', | ||
}} | ||
> | ||
Loading... | ||
</Typography> | ||
</Box> | ||
) | ||
|
||
export default Loading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Loading from './Loading' | ||
|
||
export { | ||
B3PageMask, | ||
showPageMask, | ||
} from './B3PageMask' | ||
|
||
export { | ||
Loading, | ||
} |
This file was deleted.
Oops, something went wrong.