This commit is contained in:
2026-05-01 05:06:41 +09:00
parent 9b1df20ab5
commit 674ac32817
3 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -36,7 +36,8 @@ export default (({ post, onSave }: Props) => {
useState<string | null> (post.originalCreatedBefore)
const [originalCreatedFrom, setOriginalCreatedFrom] =
useState<string | null> (post.originalCreatedFrom)
const [parentPostIds, setParentPostIds] = useState (post.parentPosts!.map (p => p.id).join (' '))
const [parentPostIds, setParentPostIds] =
useState ((post.parentPosts ?? []).map (p => p.id).join (' '))
const [tags, setTags] = useState<string> ('')
const [title, setTitle] = useState (post.title)
+2 -2
View File
@@ -42,8 +42,8 @@ export default (({ posts, onClick }: Props) => {
layoutId={layoutId}
className={cn ('w-full h-full overflow-hidden rounded-xl shadow',
'transform-gpu will-change-transform',
(post.childPosts ?? []).length > 0 && 'outline-4 border-green-500',
(post.parentPosts ?? []).length > 0 && 'outline-4 border-yellow-500')}
(post.childPosts ?? []).length > 0 && 'outline-4 outline-green-500',
(post.parentPosts ?? []).length > 0 && 'ring-4 ring-yellow-500')}
whileHover={{ scale: 1.02 }}
onLayoutAnimationStart={() => {
if (!(cardRef.current))
+1 -1
View File
@@ -253,7 +253,7 @@ export default (() => {
.filter (t => t.slice (0, 5) !== 'nico:')
.join (' '),
parent_post_ids:
change.parentPosts
(change.parentPosts ?? [])
.filter (p => p.type !== 'removed')
.map (p => p.id)
.join (' '),