chore: cleanup redeemCodeEnabled flag (#44563)

This commit is contained in:
K-Dog (Kevin) authored and GitHub committed 2026-04-06 09:09:30 +00:00
1 parent 421eaedd50
commit 5ca6182d1e
2 files changed
+2 -9

No files matched your search

@@ -1,7 +1,6 @@
import HCaptcha from '@hcaptcha/react-hcaptcha'
import { zodResolver } from '@hookform/resolvers/zod'
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { useFlag } from 'common'
import { Calendar, PartyPopper } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
@@ -53,7 +52,6 @@ export const CreditCodeRedemption = ({
onClose?: () => void
}) => {
const router = useRouter()
const redeemCodeEnabled = useFlag('redeemCodeEnabled')
const [codeRedemptionModalVisible, setCodeRedemptionModalVisible] = useState(
modalVisible || false
)
@@ -147,8 +145,6 @@ export const CreditCodeRedemption = ({
}
}, [codeRedemptionModalVisible, initHcaptchaRef])
if (!redeemCodeEnabled) return null
return (
<Dialog open={codeRedemptionModalVisible} onOpenChange={onCodeRedemptionDialogVisibilityChange}>
{!modalVisible && (
+2 -5
View File
@@ -1,4 +1,4 @@
import { FeatureFlagContext, useFlag } from 'common'
import { FeatureFlagContext } from 'common'
import Link from 'next/link'
import { useContext, useState } from 'react'
import { Button } from 'ui'
@@ -19,7 +19,6 @@ import { useProfile } from '@/lib/profile'
import type { NextPageWithLayout } from '@/types'
const RedeemCreditsContent = () => {
const redeemCodeEnabled = useFlag('redeemCodeEnabled')
const { isLoading: isLoadingProfile } = useProfile()
const { hasLoaded } = useContext(FeatureFlagContext)
@@ -72,7 +71,7 @@ const RedeemCreditsContent = () => {
<ShimmeringLoader className="w-full h-[70px]" />
<ShimmeringLoader className="w-full h-[70px]" />
</>
) : redeemCodeEnabled ? (
) : (
organizations?.map((org) => (
<OrganizationCard
key={org.id}
@@ -81,8 +80,6 @@ const RedeemCreditsContent = () => {
onClick={() => setSelectedOrg(org.slug)}
/>
))
) : (
<Admonition type="note" title="Code redemption coming soon" />
)}
</div>