-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #363 from sharemindteam/hotfix/open_consult_change…
…_money Hotfix/open consult change money
- Loading branch information
Showing
9 changed files
with
78 additions
and
4 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,28 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
import { getIsServerShutdown } from 'api/get'; | ||
import { useEffect } from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
// | ||
// | ||
// | ||
const ADMIN_SERVER_QUERY_KEY = 'getIsServerShutdown'; | ||
type GetIsServerShutdownResponse = boolean; | ||
// | ||
// | ||
// | ||
function useManipulateServerDown() { | ||
const navigate = useNavigate(); | ||
|
||
const { data: isShutDown } = useQuery<GetIsServerShutdownResponse>({ | ||
queryKey: [ADMIN_SERVER_QUERY_KEY], | ||
queryFn: () => getIsServerShutdown().then((res) => res.data), | ||
}); | ||
|
||
useEffect(() => { | ||
if (isShutDown) { | ||
navigate('/service-unavailable'); | ||
} | ||
}, [isShutDown, navigate]); | ||
} | ||
|
||
export default useManipulateServerDown; |
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,21 @@ | ||
import { Flex } from 'components/Common/Flex'; | ||
import { Header } from 'components/Common/Header'; | ||
import { ReactComponent as ServerFixIcon } from '../../assets/icons/server-fix.svg'; | ||
import { Heading } from 'styles/font'; | ||
import { Green } from 'styles/color'; | ||
// | ||
// | ||
// | ||
function ServerDown() { | ||
return ( | ||
<> | ||
<Header isBuyer={false} /> | ||
<Flex height="calc(100vh - 6rem)" direction="column" gap={'1.5rem'}> | ||
<ServerFixIcon /> | ||
<Heading color={Green}>서비스 점검 중 </Heading> | ||
</Flex> | ||
</> | ||
); | ||
} | ||
|
||
export default ServerDown; |