-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add down time feature flag (#1342)
- Loading branch information
1 parent
e772be6
commit a51a91f
Showing
4 changed files
with
50 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
@react.component | ||
let make = () => { | ||
<AuthInfoProvider> | ||
<AuthWrapper> | ||
<GlobalProvider> | ||
<UserInfoProvider> | ||
<HyperSwitchApp /> | ||
</UserInfoProvider> | ||
</GlobalProvider> | ||
</AuthWrapper> | ||
</AuthInfoProvider> | ||
open HyperswitchAtom | ||
let {downTime} = featureFlagAtom->Recoil.useRecoilValueFromAtom | ||
<> | ||
<RenderIf condition={downTime}> | ||
<UnderMaintenance /> | ||
</RenderIf> | ||
<RenderIf condition={!downTime}> | ||
<AuthInfoProvider> | ||
<AuthWrapper> | ||
<GlobalProvider> | ||
<UserInfoProvider> | ||
<HyperSwitchApp /> | ||
</UserInfoProvider> | ||
</GlobalProvider> | ||
</AuthWrapper> | ||
</AuthInfoProvider> | ||
</RenderIf> | ||
</> | ||
} |
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 @@ | ||
@react.component | ||
let make = () => { | ||
open HeadlessUI | ||
<> | ||
<Transition | ||
\"as"="span" | ||
enter={"transition ease-out duration-300"} | ||
enterFrom="opacity-0 translate-y-1" | ||
enterTo="opacity-100 translate-y-0" | ||
leave={"transition ease-in duration-300"} | ||
leaveFrom="opacity-100 translate-y-0" | ||
leaveTo="opacity-0 translate-y-1" | ||
show={true}> | ||
<div | ||
className={`flex flex-row px-4 py-2 md:gap-8 gap-4 rounded whitespace-nowrap text-fs-13 bg-yellow-200 border-yellow-200 font-semibold justify-center`}> | ||
<div className="flex gap-2"> | ||
<div className="flex text-gray-500 items-center"> | ||
{`Hyperswitch Control Center is under maintenance`->React.string} | ||
</div> | ||
</div> | ||
</div> | ||
</Transition> | ||
<NoDataFound | ||
message="Hyperswitch Control Center is under maintenance will be back in an hour" | ||
renderType=LoadError | ||
/> | ||
</> | ||
} |
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