File tree 1 file changed +7
-1
lines changed
site/src/pages/StarterTemplatesPage
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,14 @@ import { useOrganizationId } from "contexts/auth/useOrganizationId";
6
6
import { pageTitle } from "utils/page" ;
7
7
import { getTemplatesByTag } from "utils/starterTemplates" ;
8
8
import { StarterTemplatesPageView } from "./StarterTemplatesPageView" ;
9
+ import { TemplateExample } from "api/typesGenerated" ;
9
10
10
11
const StarterTemplatesPage : FC = ( ) => {
11
12
const organizationId = useOrganizationId ( ) ;
12
13
const templateExamplesQuery = useQuery ( templateExamples ( organizationId ) ) ;
13
14
const starterTemplatesByTag = templateExamplesQuery . data
14
- ? getTemplatesByTag ( templateExamplesQuery . data )
15
+ ? // Currently, the scratch template should not be displayed on the starter templates page.
16
+ getTemplatesByTag ( removeScratchExample ( templateExamplesQuery . data ) )
15
17
: undefined ;
16
18
17
19
return (
@@ -28,4 +30,8 @@ const StarterTemplatesPage: FC = () => {
28
30
) ;
29
31
} ;
30
32
33
+ const removeScratchExample = ( data : TemplateExample [ ] ) => {
34
+ return data . filter ( ( example ) => example . id !== "scratch" ) ;
35
+ } ;
36
+
31
37
export default StarterTemplatesPage ;
You can’t perform that action at this time.
0 commit comments