File tree 2 files changed +13
-4
lines changed
2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ node_modules
2
2
.next
3
3
.tool-versions
4
4
.DS_Store
5
- public /.DS_Store
5
+ public /.DS_Store
6
+ .env
Original file line number Diff line number Diff line change 1
- import { Sandpack } from "@codesandbox/sandpack-react" ;
1
+ import dynamic from "next/dynamic" ;
2
+
3
+ const Sandpack = dynamic ( ( ) => import ( "@codesandbox/sandpack-react" ) . then ( ( mod ) => mod . Sandpack ) , {
4
+ ssr : false , // Disable server-side rendering for Sandpack
5
+ } ) ;
2
6
3
7
export default function InteractiveCode ( ) {
8
+ const token = process . env . CODESANDBOX_TOKEN ;
4
9
const code = `
5
10
import { account } from '@autonomys/auto-consensus';
6
11
import { activate, parseTokenAmount} from '@autonomys/auto-utils';
@@ -30,9 +35,12 @@ export default function InteractiveCode() {
30
35
} ,
31
36
} }
32
37
options = { {
33
- showConsole : true , // Display a live console
38
+ showConsole : true ,
34
39
editorHeight : 400 ,
35
40
} }
41
+ codeSandboxOptions = { {
42
+ authToken : token ,
43
+ } }
36
44
/>
37
45
) ;
38
- }
46
+ }
You can’t perform that action at this time.
0 commit comments