Skip to content

Commit e95e232

Browse files
committed
Add a CodeSandBox token
1 parent ea1b566 commit e95e232

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
.next
33
.tool-versions
44
.DS_Store
5-
public/.DS_Store
5+
public/.DS_Store
6+
.env

components/autoConsensusFetchBalance.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
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+
});
26

37
export default function InteractiveCode() {
8+
const token = process.env.CODESANDBOX_TOKEN;
49
const code = `
510
import { account } from '@autonomys/auto-consensus';
611
import { activate, parseTokenAmount} from '@autonomys/auto-utils';
@@ -30,9 +35,12 @@ export default function InteractiveCode() {
3035
},
3136
}}
3237
options={{
33-
showConsole: true, // Display a live console
38+
showConsole: true,
3439
editorHeight: 400,
3540
}}
41+
codeSandboxOptions={{
42+
authToken: token,
43+
}}
3644
/>
3745
);
38-
}
46+
}

0 commit comments

Comments
 (0)