-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: backoffice feature flag wrapper component
- Loading branch information
1 parent
c50dcdd
commit 334c41f
Showing
2 changed files
with
23 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type BackOfficeWrapperProps = { | ||
children: React.ReactNode; | ||
}; | ||
|
||
export default function BackOfficeWrapper({ | ||
children, | ||
}: BackOfficeWrapperProps) { | ||
if (process.env.NEXT_PUBLIC_BACKOFFICE_FEATURE_FLAG === "true") { | ||
return <>{children}</>; | ||
} | ||
|
||
return null; | ||
} |
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,10 +1,14 @@ | ||
import BackOfficeWrapper from "@components/FeatureFlags/BackOfficeWrapper"; | ||
|
||
export default function JoinUs(props) { | ||
return ( | ||
<a | ||
href="https://sei23.eventbrite.pt" | ||
className={`flex h-28 w-28 flex-shrink-0 rotate-15 transform items-center justify-center font-ibold text-xl text-${props.fgColor} bg-${props.button} translate-x-0 select-none rounded-full`} | ||
> | ||
Join us 👋 | ||
</a> | ||
<BackOfficeWrapper> | ||
<a | ||
href="https://sei23.eventbrite.pt" | ||
className={`flex h-28 w-28 flex-shrink-0 rotate-15 transform items-center justify-center font-ibold text-xl text-${props.fgColor} bg-${props.button} translate-x-0 select-none rounded-full`} | ||
> | ||
Join us 👋 | ||
</a> | ||
</BackOfficeWrapper> | ||
); | ||
} |