Skip to content

Commit

Permalink
feat: add ability to close our application 🔒 (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiAbdou authored May 14, 2024
1 parent 915d246 commit 2a336c9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function FeatureFlagsTable() {
},
{
displayName: 'Name',
size: '160',
size: '200',
render: (flag) => {
return (
// TODO: Move styling to design system.
Expand Down
25 changes: 23 additions & 2 deletions apps/member-profile/app/routes/_public.apply.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import { Outlet } from '@remix-run/react';
import { json } from '@remix-run/node';
import { Outlet, useLoaderData } from '@remix-run/react';

import { Public, Text } from '@oyster/ui';

import { isFeatureFlagEnabled } from '@/member-profile.server';

export async function loader() {
const isApplicationOpen = await isFeatureFlagEnabled('family_application');

return json({
isApplicationOpen,
});
}

export default function ApplicationLayout() {
const { isApplicationOpen } = useLoaderData<typeof loader>();

return (
<Public.Content layout="lg">
<img
Expand All @@ -16,7 +29,15 @@ export default function ApplicationLayout() {
The ColorStack Family Application
</Text>

<Outlet />
{isApplicationOpen ? (
<Outlet />
) : (
<Text>
Unfortunately, our application is temporarily closed as we review
exising applications. Please check back in the upcoming days/weeks for
the opportunity to apply to ColorStack!
</Text>
)}
</Public.Content>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { z } from 'zod';

import { BooleanInput, Entity } from '@oyster/types';

export type FeatureFlagName = '';
export type FeatureFlagName = 'family_application';

// Domain

Expand Down

0 comments on commit 2a336c9

Please sign in to comment.