コミットを比較

..

2 コミット

作成者 SHA1 メッセージ 日付
みてるぞ 6dedf4148d #61 2026-03-21 19:53:54 +09:00
みてるぞ 930d020f2a #61 2026-03-21 15:41:05 +09:00
3個のファイルの変更17行の追加15行の削除
+6
ファイルの表示
@@ -6,6 +6,7 @@ import { DndContext,
useSensor, useSensor,
useSensors } from '@dnd-kit/core' useSensors } from '@dnd-kit/core'
import { restrictToWindowEdges } from '@dnd-kit/modifiers' import { restrictToWindowEdges } from '@dnd-kit/modifiers'
import { useQueryClient } from '@tanstack/react-query'
import { motion } from 'framer-motion' import { motion } from 'framer-motion'
import { useEffect, useMemo, useRef, useState } from 'react' import { useEffect, useMemo, useRef, useState } from 'react'
@@ -19,6 +20,7 @@ import SidebarComponent from '@/components/layout/SidebarComponent'
import { toast } from '@/components/ui/use-toast' import { toast } from '@/components/ui/use-toast'
import { CATEGORIES, CATEGORY_NAMES } from '@/consts' import { CATEGORIES, CATEGORY_NAMES } from '@/consts'
import { apiDelete, apiGet, apiPatch, apiPost } from '@/lib/api' import { apiDelete, apiGet, apiPatch, apiPost } from '@/lib/api'
import { postsKeys, tagsKeys } from '@/lib/queryKeys'
import { dateString, originalCreatedAtString } from '@/lib/utils' import { dateString, originalCreatedAtString } from '@/lib/utils'
import type { DragEndEvent } from '@dnd-kit/core' import type { DragEndEvent } from '@dnd-kit/core'
@@ -152,6 +154,8 @@ type Props = { post: Post; sp?: boolean }
export default (({ post, sp }: Props) => { export default (({ post, sp }: Props) => {
sp = Boolean (sp) sp = Boolean (sp)
const qc = useQueryClient ()
const baseTags = useMemo<TagByCategory> (() => { const baseTags = useMemo<TagByCategory> (() => {
const tagsTmp = { } as TagByCategory const tagsTmp = { } as TagByCategory
@@ -181,6 +185,8 @@ export default (({ post, sp }: Props) => {
const reloadTags = async (): Promise<void> => { const reloadTags = async (): Promise<void> => {
setTags (buildTagByCategory (await apiGet<Post> (`/posts/${ post.id }`))) setTags (buildTagByCategory (await apiGet<Post> (`/posts/${ post.id }`)))
qc.invalidateQueries ({ queryKey: postsKeys.root })
qc.invalidateQueries ({ queryKey: tagsKeys.root })
} }
const onDragEnd = async (e: DragEndEvent) => { const onDragEnd = async (e: DragEndEvent) => {
+4 -8
ファイルの表示
@@ -104,14 +104,10 @@ export default (({ posts, onClick }: Props) => {
{tagsVsbl && ( {tagsVsbl && (
<motion.div <motion.div
key="sptags" key="sptags"
className="md:hidden mt-4" className="md:hidden overflow-hidden"
variants={{ hidden: { clipPath: 'inset(0 0 100% 0)', initial={{ height: 0 }}
height: 0 }, animate={{ height: 'auto' }}
visible: { clipPath: 'inset(0 0 0% 0)', exit={{ height: 0 }}
height: 'auto'} }}
initial="hidden"
animate="visible"
exit="hidden"
transition={{ duration: .2, ease: 'easeOut' }}> transition={{ duration: .2, ease: 'easeOut' }}>
{posts.length > 0 && TagBlock} {posts.length > 0 && TagBlock}
</motion.div>)} </motion.div>)}
+7 -7
ファイルの表示
@@ -133,13 +133,13 @@ export type Tag = {
matchedAlias?: string | null } matchedAlias?: string | null }
export type Theatre = { export type Theatre = {
id: number id: number
name: string | null name: string | null
opensAt: string opensAt: string
closesAt: string | null closesAt: string | null
createdByUser: { id: number; name: string } createdByUser: { id: number; name: string }
createdAt: string createdAt: string
updatedAt: string } updatedAt: string }
export type User = { export type User = {
id: number id: number