This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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 (' '),
|
||||
|
||||
Reference in New Issue
Block a user