diff options
Diffstat (limited to 'vhosts/blog/nuldoc-src')
| -rw-r--r-- | vhosts/blog/nuldoc-src/jsx/types.d.ts | 9 | ||||
| -rw-r--r-- | vhosts/blog/nuldoc-src/pages/PostListPage.tsx | 2 | ||||
| -rw-r--r-- | vhosts/blog/nuldoc-src/pages/SlideListPage.tsx | 2 | ||||
| -rw-r--r-- | vhosts/blog/nuldoc-src/pages/SlidePage.tsx | 4 | ||||
| -rw-r--r-- | vhosts/blog/nuldoc-src/pages/TagPage.tsx | 4 |
5 files changed, 14 insertions, 7 deletions
diff --git a/vhosts/blog/nuldoc-src/jsx/types.d.ts b/vhosts/blog/nuldoc-src/jsx/types.d.ts index e47d7ffe..cbf68a4c 100644 --- a/vhosts/blog/nuldoc-src/jsx/types.d.ts +++ b/vhosts/blog/nuldoc-src/jsx/types.d.ts @@ -10,6 +10,8 @@ interface IntrinsicElementType { children?: JSXNode; className?: string; id?: string; + // My JSX runtime does not use key. It is only for linter that complains about missing key. + key?: string; } declare global { @@ -39,7 +41,7 @@ declare global { }; article: IntrinsicElementType; body: IntrinsicElementType; - button: IntrinsicElementType; + button: IntrinsicElementType & { type: string }; canvas: { id?: string; "data-slide-link"?: string }; div: IntrinsicElementType; footer: IntrinsicElementType; @@ -72,5 +74,10 @@ declare global { interface ElementChildrenAttribute { children: unknown; } + + type LibraryManagedAttributes<_F, P> = P & { + // My JSX runtime does not use key. It is only for linter that complains about missing key. + key?: string; + }; } } diff --git a/vhosts/blog/nuldoc-src/pages/PostListPage.tsx b/vhosts/blog/nuldoc-src/pages/PostListPage.tsx index 3fcfbf1f..c1c5214c 100644 --- a/vhosts/blog/nuldoc-src/pages/PostListPage.tsx +++ b/vhosts/blog/nuldoc-src/pages/PostListPage.tsx @@ -32,7 +32,7 @@ export default function PostListPage( if (ta > tb) return -1; if (ta < tb) return 1; return 0; - }).map((post) => <PostPageEntry post={post} />)} + }).map((post) => <PostPageEntry post={post} key={post.uuid} />)} </main> <GlobalFooter config={config} /> </body> diff --git a/vhosts/blog/nuldoc-src/pages/SlideListPage.tsx b/vhosts/blog/nuldoc-src/pages/SlideListPage.tsx index 44d6afff..3d87d492 100644 --- a/vhosts/blog/nuldoc-src/pages/SlideListPage.tsx +++ b/vhosts/blog/nuldoc-src/pages/SlideListPage.tsx @@ -33,7 +33,7 @@ export default function SlideListPage( if (ta > tb) return -1; if (ta < tb) return 1; return 0; - }).map((slide) => <SlidePageEntry slide={slide} />)} + }).map((slide) => <SlidePageEntry slide={slide} key={slide.uuid} />)} </main> <GlobalFooter config={config} /> </body> diff --git a/vhosts/blog/nuldoc-src/pages/SlidePage.tsx b/vhosts/blog/nuldoc-src/pages/SlidePage.tsx index 6d167036..60292e58 100644 --- a/vhosts/blog/nuldoc-src/pages/SlidePage.tsx +++ b/vhosts/blog/nuldoc-src/pages/SlidePage.tsx @@ -52,8 +52,8 @@ export default function SlidePage( </section> <canvas id="slide" data-slide-link={slide.slideLink} /> <div> - <button id="prev">Prev</button> - <button id="next">Next</button> + <button id="prev" type="button">Prev</button> + <button id="next" type="button">Next</button> </div> <StaticScript fileName="/slide.js" diff --git a/vhosts/blog/nuldoc-src/pages/TagPage.tsx b/vhosts/blog/nuldoc-src/pages/TagPage.tsx index 568dfaa6..02c484af 100644 --- a/vhosts/blog/nuldoc-src/pages/TagPage.tsx +++ b/vhosts/blog/nuldoc-src/pages/TagPage.tsx @@ -32,8 +32,8 @@ export default function TagPage( </header> {pages.map((page) => "event" in page - ? <SlidePageEntry slide={page} /> - : <PostPageEntry post={page} /> + ? <SlidePageEntry slide={page} key={page.uuid} /> + : <PostPageEntry post={page} key={page.uuid} /> )} </main> <GlobalFooter config={config} /> |
