File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed
Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { GetRoadmapItemsResult } from '@/lib/RoadmapService';
44import { AgentsmithServices } from '@/lib/AgentsmithServices' ;
55import { AuthProvider } from '@/providers/auth' ;
66import { Suspense } from 'react' ;
7+ import { IS_WAITLIST_REDIRECT_ENABLED } from '@/app/constants' ;
78
89export const revalidate = 43200 ;
910
@@ -22,7 +23,10 @@ export default async function RoadmapServerPage() {
2223 return (
2324 < Suspense >
2425 < AuthProvider >
25- < RoadmapPage initialRoadmapItems = { initialRoadmapItems } />
26+ < RoadmapPage
27+ initialRoadmapItems = { initialRoadmapItems }
28+ isWaitlistRedirectEnabled = { IS_WAITLIST_REDIRECT_ENABLED }
29+ />
2630 </ AuthProvider >
2731 </ Suspense >
2832 ) ;
Original file line number Diff line number Diff line change @@ -5,19 +5,19 @@ import { toast } from 'sonner';
55import { useAuth } from '@/providers/auth' ;
66import { routes } from '@/utils/routes' ;
77import { cn } from '@/utils/shadcn' ;
8- import { IS_WAITLIST_REDIRECT_ENABLED } from '@/app/constants' ;
98
109type RoadmapProposeCtaProps = {
1110 setIsProposeModalOpen : ( isOpen : boolean ) => void ;
11+ isWaitlistRedirectEnabled : boolean ;
1212 className ?: string ;
1313} ;
1414
1515export const RoadmapProposeCta = ( props : RoadmapProposeCtaProps ) => {
16- const { setIsProposeModalOpen, className } = props ;
16+ const { setIsProposeModalOpen, className, isWaitlistRedirectEnabled } = props ;
1717 const { isLoading, agentsmithUser } = useAuth ( ) ;
1818
1919 const currentUserId = agentsmithUser ?. id ;
20- const isWaitlisted = agentsmithUser ?. studio_access === false && IS_WAITLIST_REDIRECT_ENABLED ;
20+ const isWaitlisted = agentsmithUser ?. studio_access === false && isWaitlistRedirectEnabled ;
2121
2222 return isLoading ? (
2323 < Button disabled className = { cn ( 'gap-0' , className ) } >
Original file line number Diff line number Diff line change @@ -36,10 +36,11 @@ type FilterStatus = 'ALL' | RoadmapStatus;
3636
3737type RoadmapPageProps = {
3838 initialRoadmapItems : GetRoadmapItemsResult ;
39+ isWaitlistRedirectEnabled : boolean ;
3940} ;
4041
4142export const RoadmapPage = ( props : RoadmapPageProps ) => {
42- const { initialRoadmapItems } = props ;
43+ const { initialRoadmapItems, isWaitlistRedirectEnabled } = props ;
4344 const { agentsmithUser, isLoading : isAuthLoading } = useAuth ( ) ;
4445 const searchParams = useSearchParams ( ) ;
4546
@@ -230,7 +231,10 @@ export const RoadmapPage = (props: RoadmapPageProps) => {
230231 </ p >
231232 </ div >
232233
233- < RoadmapProposeCta setIsProposeModalOpen = { setIsProposeModalOpen } />
234+ < RoadmapProposeCta
235+ setIsProposeModalOpen = { setIsProposeModalOpen }
236+ isWaitlistRedirectEnabled = { isWaitlistRedirectEnabled }
237+ />
234238 </ div >
235239
236240 < div className = "flex flex-col lg:flex-row justify-between items-start md:items-center gap-4 mb-8 rounded-md" >
@@ -304,7 +308,10 @@ export const RoadmapPage = (props: RoadmapPageProps) => {
304308 < p className = "text-muted-foreground mb-6" >
305309 Try adjusting your filters or suggest a new feature.
306310 </ p >
307- < RoadmapProposeCta setIsProposeModalOpen = { setIsProposeModalOpen } />
311+ < RoadmapProposeCta
312+ setIsProposeModalOpen = { setIsProposeModalOpen }
313+ isWaitlistRedirectEnabled = { isWaitlistRedirectEnabled }
314+ />
308315 </ div >
309316 ) }
310317
You can’t perform that action at this time.
0 commit comments