@@ -19,7 +19,7 @@ const NotFoundPage: React.FC = () => {
1919 // Set meta for 404 page
2020 usePageMeta ( {
2121 title : generatePageTitle ( 'Page Not Found' ) ,
22- description : ' The page you\ 're looking for doesn\ 't exist or has been moved.' ,
22+ description : " The page you're looking for doesn't exist or has been moved." ,
2323 } ) ;
2424
2525 return (
@@ -56,10 +56,6 @@ export const Showcase: React.FC = () => {
5656 const pathInfo = extractIdFromPath ( location . pathname ) ;
5757 const isDetailPage = ! ! pathInfo ;
5858
59- // Check access permission for the index page
60- const searchParams = new URLSearchParams ( location . search ) ;
61- const hasAccess = searchParams . get ( 'enableShowcaseIndex' ) === '1' ;
62-
6359 // Always call hooks in the same order - move useShowcaseData before conditional returns
6460 const hookParams = pathInfo
6561 ? pathInfo . type === 'sessionId'
@@ -72,20 +68,14 @@ export const Showcase: React.FC = () => {
7268 // Set base meta tags for showcase
7369 usePageMeta ( {
7470 title : generatePageTitle ( 'Showcase' ) ,
75- description : 'Explore Agent TARS showcase demos and replays. Discover real-world examples of multimodal AI agent capabilities in action.' ,
71+ description :
72+ 'Explore Agent TARS showcase demos and replays. Discover real-world examples of multimodal AI agent capabilities in action.' ,
7673 } ) ;
7774
7875 if ( isInSSR ( ) ) {
7976 return null ;
8077 }
8178
82- // Now we can do conditional rendering after all hooks are called
83- // For detail pages, we don't need access control
84- // For index page, we need to check access permission
85- if ( ! isDetailPage && ! hasAccess ) {
86- return < NotFoundPage /> ;
87- }
88-
8979 if ( isDetailPage ) {
9080 return (
9181 < ShowcaseDetailPage
@@ -143,9 +133,9 @@ const ShowcaseListPage: React.FC<ShowcaseListPageProps> = ({
143133 const categoryName = activeCategory . charAt ( 0 ) . toUpperCase ( ) + activeCategory . slice ( 1 ) ;
144134 const title = generatePageTitle ( `${ categoryName } Showcase` ) ;
145135 const description = optimizeDescription (
146- `Explore ${ categoryName } demos and examples with Agent TARS. See real-world applications of multimodal AI in ${ activeCategory } .`
136+ `Explore ${ categoryName } demos and examples with Agent TARS. See real-world applications of multimodal AI in ${ activeCategory } .` ,
147137 ) ;
148-
138+
149139 if ( typeof document !== 'undefined' ) {
150140 document . title = title ;
151141 const metaDesc = document . querySelector ( 'meta[name="description"]' ) ;
@@ -283,20 +273,20 @@ const ShowcaseDetailPage: React.FC<ShowcaseDetailPageProps> = ({
283273 const item = items [ 0 ] ;
284274 const title = generatePageTitle ( item . title ) ;
285275 const description = optimizeDescription (
286- `${ item . description } - Explore this ${ item . category } demonstration showcasing Agent TARS capabilities.`
276+ `${ item . description } - Explore this ${ item . category } demonstration showcasing Agent TARS capabilities.` ,
287277 ) ;
288-
278+
289279 // Update meta tags dynamically
290280 if ( typeof document !== 'undefined' ) {
291281 document . title = title ;
292-
282+
293283 const setMetaContent = ( selector : string , content : string ) => {
294284 const meta = document . querySelector ( selector ) ;
295285 if ( meta ) {
296286 meta . setAttribute ( 'content' , content ) ;
297287 }
298288 } ;
299-
289+
300290 setMetaContent ( 'meta[name="description"]' , description ) ;
301291 setMetaContent ( 'meta[property="og:title"]' , title ) ;
302292 setMetaContent ( 'meta[property="og:description"]' , description ) ;
0 commit comments