Skip to content

Commit 03737cf

Browse files
committed
Fix TemplateType
1 parent d1e68eb commit 03737cf

File tree

1 file changed

+6
-2
lines changed
  • packages/app/src/app/components/CreateNewSandbox/CreateSandbox/TemplateList

1 file changed

+6
-2
lines changed

packages/app/src/app/components/CreateNewSandbox/CreateSandbox/TemplateList/TemplateList.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import React from 'react';
22
import { TemplateFragment } from 'app/graphql/types';
33
import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator';
4-
import getTemplateDefinition from '@codesandbox/common/lib/templates';
4+
import getTemplateDefinition, {
5+
TemplateType,
6+
} from '@codesandbox/common/lib/templates';
57
import { useOvermind } from 'app/overmind';
68
import { useKey } from 'react-use';
79
import { isMac } from '@codesandbox/common/lib/utils/platform';
@@ -53,7 +55,9 @@ export const TemplateList = ({
5355
openInNewWindow = false
5456
) => {
5557
// We can't fork a sandbox that's server and if you're signed in, so then we just go to it
56-
const templateDefinition = getTemplateDefinition(sandbox.source.template);
58+
const templateDefinition = getTemplateDefinition(
59+
sandbox.source.template as TemplateType
60+
);
5761
const cannotFork = templateDefinition.isServer && !state.isLoggedIn;
5862

5963
if (forkOnOpen && !cannotFork) {

0 commit comments

Comments
 (0)