Skip to content

Commit

Permalink
fix / remove isStripeTestMode in OrganizationSidebar and push to prod
Browse files Browse the repository at this point in the history
  • Loading branch information
psiddharthdesign committed Aug 20, 2024
1 parent 44e5970 commit 42b0e81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ import { DesktopSidebarFallback } from '@/components/SidebarComponents/SidebarFa
import { SwitcherAndToggle } from '@/components/SidebarComponents/SidebarLogo';
import { FreeTrialComponent } from '@/components/SubscriptionCards';
import { Skeleton } from '@/components/ui/skeleton';
import { getIsStripeTestMode } from '@/utils/server/stripe-utils';
import { differenceInDays } from 'date-fns';
import { Activity, FileText, Home, Layers, MessageCircle, Users } from 'lucide-react';


const isStripeTestMode = getIsStripeTestMode()

async function OrganizationSubscriptionSidebarCard({
organizationId,
}: {
Expand Down Expand Up @@ -45,7 +41,6 @@ async function OrganizationSubscriptionSidebarCard({
isOrganizationAdmin={isOrganizationAdmin}
organizationId={organizationId}
activeProducts={activeProducts}
defaultOpen={isStripeTestMode}
/>
</>
}
Expand Down
5 changes: 2 additions & 3 deletions src/components/FreeTrialDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ type FreeTrialDialogProps = {
organizationId: string
activeProducts: UnwrapPromise<ReturnType<typeof getActiveProductsWithPrices>>
isOrganizationAdmin: boolean,
defaultOpen?: boolean
}
export function FreeTrialDialog({ organizationId, activeProducts, isOrganizationAdmin, defaultOpen = false }: FreeTrialDialogProps) {
export function FreeTrialDialog({ organizationId, activeProducts, isOrganizationAdmin }: FreeTrialDialogProps) {
// this should be true
const [open, setOpen] = useState(defaultOpen)
const [open, setOpen] = useState(true)
// supabase cannot sort by foreign table, so we do it here
const productsSortedByPrice = getProductsSortedByPrice(activeProducts);

Expand Down

0 comments on commit 42b0e81

Please sign in to comment.