added random cybersigilism generation
This commit is contained in:
@@ -1,6 +1,23 @@
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { deletePost } from '../../lib/api';
|
||||
import { confirmDialog, notify } from '../../lib/confirm';
|
||||
import { buildCybersigil } from '../../lib/cybersigil';
|
||||
|
||||
// Per-plate sigil accent. Built post-mount (not during render) so the random
|
||||
// markup never differs between SSR and hydration. Inert/display:none off the
|
||||
// cybersigil theme; carves in on plate hover/focus via global.css.
|
||||
function PlateSigil() {
|
||||
const [html, setHtml] = useState('');
|
||||
useEffect(() => { setHtml(buildCybersigil()); }, []);
|
||||
if (!html) return null;
|
||||
return (
|
||||
<div
|
||||
className="cs-plate-sig"
|
||||
aria-hidden="true"
|
||||
dangerouslySetInnerHTML={{ __html: html }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const PAGE_SIZE = 9;
|
||||
|
||||
@@ -220,6 +237,8 @@ export default function PostList({ posts: initialPosts, isAdmin = false }: Props
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<PlateSigil />
|
||||
</article>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user