Skip to content

Commit f76124f

Browse files
committed
feat: experimental team in flags
1 parent 979757b commit f76124f

File tree

1 file changed

+14
-22
lines changed
  • apps/dashboard/app/(main)/websites/[id]/flags

1 file changed

+14
-22
lines changed

apps/dashboard/app/(main)/websites/[id]/flags/page.tsx

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { FlagIcon } from '@phosphor-icons/react';
55
import { useAtom } from 'jotai';
66
import { useParams } from 'next/navigation';
77
import { Suspense, useCallback, useState } from 'react';
8+
import { Badge } from '@/components/ui/badge';
89
import { Card, CardContent } from '@/components/ui/card';
910
import { useWebsite } from '@/hooks/use-websites';
1011
import { trpc } from '@/lib/trpc';
@@ -143,30 +144,21 @@ export default function FlagsPage() {
143144
websiteId={websiteId}
144145
websiteName={website?.name || undefined}
145146
/>
146-
147147
{isExperimentEnabled && (
148-
<Card className="border bg-primary/10">
149-
<CardContent className="flex items-center justify-between gap-3 p-4">
150-
<div className="flex items-center gap-3">
151-
<FlagIcon
152-
className="h-5 w-5 text-primary"
153-
size={16}
154-
weight="duotone"
155-
/>
156-
<div>
157-
<p className="font-medium text-foreground text-sm">
158-
You found a hidden feature!
159-
</p>
160-
<p className="text-muted-foreground text-xs">
161-
Only 50% of users can see this, you're one of them! (This is a
162-
feature flag:)
163-
</p>
164-
</div>
165-
</div>
166-
</CardContent>
167-
</Card>
148+
<div className="flex items-center gap-2">
149+
<FlagIcon
150+
className="h-5 w-5 text-primary"
151+
color={isExperimentEnabled ? 'red' : 'blue'}
152+
size={16}
153+
weight="fill"
154+
/>
155+
{isExperimentEnabled ? (
156+
<Badge className="bg-red-500">Red Team</Badge>
157+
) : (
158+
<Badge className="bg-blue-500">Blue Team</Badge>
159+
)}
160+
</div>
168161
)}
169-
170162
<Suspense fallback={<FlagsListSkeleton />}>
171163
<FlagsList
172164
flags={flags || []}

0 commit comments

Comments
 (0)