From dc34c6d3b3381a8bb44491d8b0296bcacc8ab95a Mon Sep 17 00:00:00 2001 From: Daishi Kato Date: Mon, 12 Feb 2024 10:17:03 +0900 Subject: [PATCH] fix livecodes template (#2392) * fix livecodes template * Update .livecodes/react.json * short sha --- .livecodes/react.json | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.livecodes/react.json b/.livecodes/react.json index a3998636b7..ecc9772295 100644 --- a/.livecodes/react.json +++ b/.livecodes/react.json @@ -13,12 +13,15 @@ "language": "jsx", "content": "import { StrictMode, Suspense } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { atom, useAtom } from 'jotai';\n\nconst countAtom = atom(0);\n\nconst Counter = () => {\n const [count, setCount] = useAtom(countAtom);\n const inc = () => setCount((c) => c + 1);\n return (\n <>\n {count} \n \n );\n};\n\nconst App = () => (\n \n
\n

Hello Jotai

\n

Enjoy coding!

\n \n
\n
\n);\n\nconst rootElement = document.getElementById('root');\nconst root = createRoot(rootElement);\n\nroot.render(\n \n \n \n);\n" }, - "imports": { - "jotai": "{{LC::TO_DATA_URL(./dist/esm/index.mjs)}}", - "jotai/vanilla": "{{LC::TO_DATA_URL(./dist/esm/vanilla.mjs)}}", - "jotai/utils": "{{LC::TO_DATA_URL(./dist/esm/utils.mjs)}}", - "jotai/react": "{{LC::TO_DATA_URL(./dist/esm/react.mjs)}}", - "jotai/vanilla/utils": "{{LC::TO_DATA_URL(./dist/esm/vanilla/utils.mjs)}}", - "jotai/react/utils": "{{LC::TO_DATA_URL(./dist/esm/react/utils.mjs)}}" + "customSettings": { + "jotai commit sha": "{{LC::SHORT_SHA}}", + "imports": { + "jotai": "{{LC::TO_DATA_URL(./dist/esm/index.mjs)}}", + "jotai/vanilla": "{{LC::TO_DATA_URL(./dist/esm/vanilla.mjs)}}", + "jotai/utils": "{{LC::TO_DATA_URL(./dist/esm/utils.mjs)}}", + "jotai/react": "{{LC::TO_DATA_URL(./dist/esm/react.mjs)}}", + "jotai/vanilla/utils": "{{LC::TO_DATA_URL(./dist/esm/vanilla/utils.mjs)}}", + "jotai/react/utils": "{{LC::TO_DATA_URL(./dist/esm/react/utils.mjs)}}" + } } }