File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
site/src/pages/TemplatesPage/MultiOrgTemplatePage Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
import type { Interpolation , Theme } from "@emotion/react" ;
2
2
import type { FC } from "react" ;
3
- import { Link , useNavigate , useSearchParams } from "react-router-dom" ;
3
+ import { Link , useNavigate } from "react-router-dom" ;
4
4
import type { Template , TemplateExample } from "api/typesGenerated" ;
5
5
import { ErrorAlert } from "components/Alert/ErrorAlert" ;
6
6
import {
@@ -85,7 +85,8 @@ export const TemplatesPageView: FC<TemplatesPageViewProps> = ({
85
85
} ) => {
86
86
const navigate = useNavigate ( ) ;
87
87
const isEmpty = templates && templates . length === 0 ;
88
- const activeOrg = query ?. split ( ":" ) [ 1 ] ?? "all" ;
88
+ const q = query ?. split ( ":" ) || [ ] ;
89
+ const activeOrg = q [ 0 ] === "organization" ? query ?. split ( ":" ) [ 1 ] : "all" ;
89
90
const templatesByOrg = getTemplatesByOrg ( templates ?? [ ] ) ;
90
91
91
92
return (
You can’t perform that action at this time.
0 commit comments