@@ -34,7 +34,13 @@ import {
34
34
initWasm ,
35
35
} from "@/utils/wasm" ;
36
36
import isEqual from "lodash/isEqual" ;
37
- import { MoonIcon , ShareIcon , SunIcon , SunMoonIcon } from "lucide-react" ;
37
+ import {
38
+ ExternalLinkIcon ,
39
+ MoonIcon ,
40
+ ShareIcon ,
41
+ SunIcon ,
42
+ SunMoonIcon ,
43
+ } from "lucide-react" ;
38
44
import { type FC , useEffect , useMemo , useRef , useState } from "react" ;
39
45
import { useDebouncedValue } from "./hooks/debounce" ;
40
46
@@ -45,9 +51,7 @@ export const App = () => {
45
51
}
46
52
return "loading" ;
47
53
} ) ;
48
- const [ code , setCode ] = useState (
49
- window . CODE ?? defaultCode ,
50
- ) ;
54
+ const [ code , setCode ] = useState ( window . CODE ?? defaultCode ) ;
51
55
const [ debouncedCode , isDebouncing ] = useDebouncedValue ( code , 1000 ) ;
52
56
const [ parameterValues , setParameterValues ] = useState <
53
57
Record < string , string >
@@ -313,11 +317,12 @@ const ExampleSelector: FC = () => {
313
317
314
318
< DropdownMenuPortal >
315
319
< DropdownMenuContent >
316
- { Object . entries ( examples ) . map ( ( [ slug , title ] ) => {
320
+ { Object . entries ( examples ) . map ( ( [ slug , title ] ) => {
317
321
const href = `${ window . location . origin } /parameters/example/${ slug } ` ;
318
322
return (
319
323
< DropdownMenuItem key = { slug } asChild = { true } >
320
324
< a href = { href } target = "_blank" rel = "noreferrer" >
325
+ < ExternalLinkIcon />
321
326
{ title }
322
327
</ a >
323
328
</ DropdownMenuItem >
0 commit comments