File tree Expand file tree Collapse file tree
web/src/app/[domain]/askgh Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ export const env = createEnv({
196196 // @NOTE : Take care to update actions.ts when changing the name of this.
197197 EXPERIMENT_SELF_SERVE_REPO_INDEXING_GITHUB_TOKEN : z . string ( ) . optional ( ) ,
198198 EXPERIMENT_EE_PERMISSION_SYNC_ENABLED : booleanSchema . default ( 'false' ) ,
199+ EXPERIMENT_ASK_GH_ENABLED : booleanSchema . default ( 'false' ) ,
199200
200201 SOURCEBOT_ENCRYPTION_KEY : z . string ( ) ,
201202 SOURCEBOT_INSTALL_ID : z . string ( ) . default ( "unknown" ) ,
Original file line number Diff line number Diff line change 1+ import { redirect } from "next/navigation" ;
2+ import { env } from "@sourcebot/shared" ;
3+
4+ export default function AskGHLayout ( {
5+ children,
6+ params,
7+ } : {
8+ children : React . ReactNode ;
9+ params : { domain : string } ;
10+ } ) {
11+ if ( env . EXPERIMENT_ASK_GH_ENABLED !== 'true' ) {
12+ redirect ( `/${ params . domain } ` ) ;
13+ }
14+
15+ return < > { children } </ > ;
16+ }
You can’t perform that action at this time.
0 commit comments