feat: 동영상 게시글 수정

This commit is contained in:
2025-05-15 18:06:30 +09:00
parent 464e61f0c7
commit 846194e0ed
3 changed files with 15 additions and 12 deletions
@@ -31,7 +31,8 @@ export const createColumns = (
/>
),
cell: ({ row, table }) => {
const { atflCd, pstNo, pstTtl, inqNocs, rgtrNm, regDt } = row.original;
const { atflCd, pstNo, pstTtl, pstCn, inqNocs, rgtrNm, regDt } =
row.original;
const bbsTypeCd = table.options.meta?.bbsTypeCd;
if (bbsTypeCd === "BBSIMAGE") {
@@ -99,6 +100,9 @@ export const createColumns = (
{pstTtl}
</span>
</div>
<p className="line-clamp-3 overflow-hidden text-[1.2rem] text-label">
{pstCn}
</p>
<div className="flex flex-col">
<span className="text-[1.4rem] font-bold text-label">
{rgtrNm}
@@ -135,7 +139,7 @@ const ThumbImage = ({
}: ThumbImageProps) => {
const prevImage = thumbRefs.current.get(pstNo);
const { data: imageUrl, isLoading } = useQuery({
const { data, isLoading } = useQuery({
queryKey: [ENDPOINT.ATTACH_SERVICE.IMAGES, atflCd],
queryFn: () => {
if (bbsTypeCd === "BBSIMAGE") {
@@ -151,6 +155,8 @@ const ThumbImage = ({
enabled: !prevImage && !!atflCd,
});
const imageUrl = prevImage ?? data;
if (isLoading)
return (
<div className="h-[16rem] w-full">