File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
examples/nextjs-import-airbyte-github-export-seafowl/pages/[github_namespace] Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ import { useMemo } from "react";
1212const useImportedRepoFromURL = ( ) => {
1313 const { query } = useRouter ( ) ;
1414
15- console . log ( "query:" , query ) ;
16-
1715 const queryParams = useMemo (
1816 ( ) =>
1917 (
@@ -23,16 +21,16 @@ const useImportedRepoFromURL = () => {
2321 [ "splitgraphNamespace" , "splitgraphNamespace" ] ,
2422 [ "splitgraphRepository" , "splitgraphRepository" ] ,
2523 ] as [ string , keyof ImportedRepository ] [ ]
26- ) . reduce ( ( acc , [ queryParam , repoKey ] ) => {
24+ ) . reduce ( ( parsedQueryParams , [ queryParam , repoKey ] ) => {
2725 if ( ! query [ queryParam ] || Array . isArray ( query [ queryParam ] ) ) {
2826 // throw new Error(
2927 // `Invalid query params: unexpected type of ${queryParam}: ${query[queryParam]}}`
3028 // );
31- return acc ;
29+ return parsedQueryParams ;
3230 }
3331
3432 return {
35- ...acc ,
33+ ...parsedQueryParams ,
3634 [ repoKey ] : query [ queryParam ] as string ,
3735 } ;
3836 } , { } as ImportedRepository ) ,
You can’t perform that action at this time.
0 commit comments