|
1 | 1 | import { useAtom, useSetAtom } from 'jotai';
|
2 |
| -import { decompressFromEncodedURIComponent } from 'lz-string'; |
3 | 2 | import { Suspense, useEffect, useRef } from 'react';
|
4 | 3 | import { currentExampleAtom } from '../utils/examples/currentExampleAtom';
|
5 |
| -import { PLAYGROUND_KEY, examples } from '../utils/examples/exampleContent'; |
| 4 | +import { examples } from '../utils/examples/exampleContent'; |
6 | 5 | import { ExampleNotFound } from './ExampleNotFound';
|
7 | 6 | import { ExampleView } from './ExampleView';
|
8 | 7 |
|
@@ -41,31 +40,31 @@ function ExamplePage() {
|
41 | 40 | return <RedirectToFlagship />;
|
42 | 41 | }
|
43 | 42 |
|
44 |
| - if (currentExample === PLAYGROUND_KEY) { |
45 |
| - setCurrentExample( |
46 |
| - `${PLAYGROUND_KEY}${localStorage.getItem(PLAYGROUND_KEY) ?? ''}`, |
47 |
| - ); |
48 |
| - } |
| 43 | + // if (currentExample === PLAYGROUND_KEY) { |
| 44 | + // setCurrentExample( |
| 45 | + // `${PLAYGROUND_KEY}${localStorage.getItem(PLAYGROUND_KEY) ?? ''}`, |
| 46 | + // ); |
| 47 | + // } |
49 | 48 |
|
50 |
| - if (currentExample.startsWith(PLAYGROUND_KEY)) { |
51 |
| - return ( |
52 |
| - <ExampleView |
53 |
| - key={PLAYGROUND_KEY} |
54 |
| - example={{ |
55 |
| - key: PLAYGROUND_KEY, |
56 |
| - code: |
57 |
| - decompressFromEncodedURIComponent( |
58 |
| - currentExample.slice(PLAYGROUND_KEY.length), |
59 |
| - ) ?? '', |
60 |
| - metadata: { |
61 |
| - title: 'Playground', |
62 |
| - category: '', |
63 |
| - }, |
64 |
| - }} |
65 |
| - isPlayground={true} |
66 |
| - /> |
67 |
| - ); |
68 |
| - } |
| 49 | + // if (currentExample.startsWith(PLAYGROUND_KEY)) { |
| 50 | + // return ( |
| 51 | + // <ExampleView |
| 52 | + // key={PLAYGROUND_KEY} |
| 53 | + // example={{ |
| 54 | + // key: PLAYGROUND_KEY, |
| 55 | + // code: |
| 56 | + // decompressFromEncodedURIComponent( |
| 57 | + // currentExample.slice(PLAYGROUND_KEY.length), |
| 58 | + // ) ?? '', |
| 59 | + // metadata: { |
| 60 | + // title: 'Playground', |
| 61 | + // category: '', |
| 62 | + // }, |
| 63 | + // }} |
| 64 | + // isPlayground={true} |
| 65 | + // /> |
| 66 | + // ); |
| 67 | + // } |
69 | 68 |
|
70 | 69 | if (currentExample in examples) {
|
71 | 70 | return (
|
|
0 commit comments