Skip to content

Commit 0df43a6

Browse files
committed
feat: show code in demos by default
1 parent 5dce7a2 commit 0df43a6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/demo/contexts/demo/demoReducer.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { assertUnreachable } from '@site/src/utils/assert';
2-
import type { Image, Mask } from 'image-js';
3-
import type { WritableDraft } from 'immer';
4-
import { produce } from 'immer';
5-
import { useReducer } from 'react';
1+
import { assertUnreachable } from "@site/src/utils/assert";
2+
import type { Image, Mask } from "image-js";
3+
import type { WritableDraft } from "immer";
4+
import { produce } from "immer";
5+
import { useReducer } from "react";
66

7-
import type { Addon } from '../../utils/types';
8-
import type { ImageDemoInputOption } from '../importImage/importImageContext';
7+
import type { Addon } from "../../utils/types";
8+
import type { ImageDemoInputOption } from "../importImage/importImageContext";
99

1010
export type DemoAction =
1111
| {
@@ -88,7 +88,7 @@ function getInitialState(initial: DemoInitialConfig): DemoState {
8888
return {
8989
selectedImage: null,
9090
selectedDevice: null,
91-
addon: null,
91+
addon: 'code',
9292
code: initial.initialCode,
9393
noAutoRun: initial.noAutoRun || false,
9494
name: initial.name,

0 commit comments

Comments
 (0)