File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
apps/dashboard/src/app/team/[team_slug]/(team)/~/engine/(general) Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ import { redirect } from "next/navigation" ;
12import { getAuthToken } from "../../../../../../api/lib/getAuthToken" ;
23import { loginRedirect } from "../../../../../../login/loginRedirect" ;
34import { getEngineInstances } from "../_utils/getEngineInstances" ;
@@ -10,8 +11,21 @@ export default async function Page(props: {
1011 params : Promise < {
1112 team_slug : string ;
1213 } > ;
14+ searchParams : Promise < {
15+ importUrl ?: string ;
16+ } > ;
1317} ) {
14- const params = await props . params ;
18+ const [ params , searchParams ] = await Promise . all ( [
19+ props . params ,
20+ props . searchParams ,
21+ ] ) ;
22+
23+ if ( searchParams . importUrl ) {
24+ redirect (
25+ `/team/${ params . team_slug } /~/engine/import?importUrl=${ searchParams . importUrl } ` ,
26+ ) ;
27+ }
28+
1529 const authToken = await getAuthToken ( ) ;
1630
1731 if ( ! authToken ) {
You can’t perform that action at this time.
0 commit comments