From be212c3bb0dbe70174707416fdaa6909180e682d Mon Sep 17 00:00:00 2001 From: TreetopFlyer Date: Tue, 26 Apr 2022 17:10:25 -0400 Subject: [PATCH] fix random styled components error --- app.js | 61 ++++++++++++++++++++++-------------------------------- index.html | 4 +++- 2 files changed, 28 insertions(+), 37 deletions(-) diff --git a/app.js b/app.js index 270ab68..8647408 100644 --- a/app.js +++ b/app.js @@ -3,16 +3,10 @@ import 'https://js.boxcast.com/v3.min.js'; import { html } from "https://esm.sh/htm/react"; -import styled, { css, keyframes } from 'https://esm.sh/styled-components'; -import { createElement as h, useState, useEffect, useRef } from 'https://esm.sh/react'; +import styled from 'https://esm.sh/styled-components?deps=react@18'; +import { createElement as h, useState, useEffect, useRef } from 'https://esm.sh/react@18'; import { createRoot } from "https://esm.sh/react-dom/client"; -/* -import State01 from "./testdata-01.json" assert { type: "json" }; -import State02 from "./testdata-02.json" assert { type: "json" }; -import State03 from "./testdata-03.json" assert { type: "json" }; -*/ - const StyledRoot = styled.div` .Partition { @@ -160,29 +154,31 @@ const App = props => } , []); - // on new list - useEffect(()=> - { - let leading; - for(let i=0; i + { + let leading; + for(let i=0; i return html` <${StyledRoot}>
-
${ ListGet.map( (item, index) => diff --git a/index.html b/index.html index 192c493..50e7c85 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,8 @@ - + + +