Skip to content
1 change: 1 addition & 0 deletions apps/client/src/assets/client_thumb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 11 additions & 6 deletions apps/client/src/shared/components/cardEditModal/CardEditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { buildUtcIso } from '@shared/utils/datetime';
import { updateDate, updateTime } from '@shared/utils/formatDateTime';
import { useQueryClient } from '@tanstack/react-query';
import { useEffect, useState } from 'react';
import noImage from '@assets/client_thumb.svg';

export interface CardEditModalProps {
onClose: () => void;
Expand All @@ -33,7 +34,7 @@ export default function CardEditModal({
onClose,
prevData,
}: CardEditModalProps) {
const { meta } = usePageMeta(prevData.url);
const { meta, loading } = usePageMeta(prevData.url);
const { data: category } = useGetDashboardCategories();
const { mutate: editArticle } = usePutEditArticle();
const queryClient = useQueryClient();
Expand Down Expand Up @@ -177,11 +178,15 @@ export default function CardEditModal({
</button>
</header>

<InfoBox
title={meta.title}
source={meta.description}
imgUrl={meta.imgUrl}
/>
{loading ? (
<div className="bg-gray100 h-[6.8rem] w-[full] animate-pulse rounded-[4px]" />
) : (
<InfoBox
title={meta.title}
source={meta.description}
imgUrl={meta.imgUrl || noImage}
/>
)}

<section className="flex flex-col gap-[0.8rem]">
<p className="caption1-sb text-font-black-1">카테고리</p>
Expand Down
28 changes: 15 additions & 13 deletions apps/client/src/shared/components/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function Sidebar() {
const { data: categories } = useGetDashboardCategories();
const { mutate: patchCategory } = usePutCategory();
const { mutate: createCategory } = usePostCategory();
const { data, isPending, isError } = useGetArcons();
const { data, isPending } = useGetArcons();
const { mutate: deleteCategory } = useDeleteCategory();

const {
Expand Down Expand Up @@ -120,9 +120,7 @@ export function Sidebar() {
setToastIsOpen(false);
}, [popup]);

if (isPending) return <div></div>;
if (isError) return <div></div>;
const acornCount = data.acornCount;
const acornCount = data?.acornCount ?? 0;
const MAX_CATEGORIES = 10;
const categoryCount = categories?.categories?.length ?? 0;
const canCreateMore = categoryCount < MAX_CATEGORIES;
Expand Down Expand Up @@ -206,15 +204,19 @@ export function Sidebar() {
</div>

<footer className="pb-[2.8rem] pt-[1.2rem]">
<MyLevelItem
acorns={acornCount}
isActive={activeTab === 'level'}
onClick={() => {
setSelectedCategoryId(null);
closeMenu();
goLevel();
}}
/>
{isPending ? (
<div className="h-[6.2rem] w-full animate-pulse rounded-[0.4rem] border bg-gray-100 p-[0.8rem]" />
) : (
<MyLevelItem
acorns={acornCount}
isActive={activeTab === 'level'}
onClick={() => {
setSelectedCategoryId(null);
closeMenu();
goLevel();
}}
/>
)}
</footer>
</div>

Expand Down
15 changes: 10 additions & 5 deletions apps/extension/src/pages/MainPop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
} else {
setImgUrl(initialImgUrl);
}
}, [initialImgUrl]);

Check warning on line 86 in apps/extension/src/pages/MainPop.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'defaultImageUrl'. Either include it or remove the dependency array

// 아티클 팝업 정보들 상태
const [toastIsOpen, setToastIsOpen] = useState(false);
Expand Down Expand Up @@ -190,6 +190,7 @@
time: isRemindOn ? currentTime : time,
createdAt: new Date().toISOString(),
};

if (type === 'add') {
save({
url,
Expand Down Expand Up @@ -279,11 +280,15 @@
/>
</div>

<InfoBox
title={title || '제목 로딩 중...'}
source={description || '불러오는 중입니다'}
imgUrl={initialImgUrl || defaultImageUrl}
/>
{loading ? (
<div className="bg-gray100 h-[6.8rem] w-[full] animate-pulse rounded-[4px]" />
) : (
<InfoBox
title={title}
source={description}
imgUrl={initialImgUrl || defaultImageUrl}
/>
)}

<div>
<p className="caption1-sb mb-[0.4rem]">카테고리</p>
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/src/components/badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const BadgeTxtStyleVariants = cva('sub3-b', {
});

const BadgeStyleVariants = cva(
'text-white-bg sub5-sb rounded-[0.4rem] px-[0.8rem] py-[0.4rem]',
'text-white-bg sub5-sb rounded-[0.4rem] w-[2.5rem] h-[2.8rem] flex items-center justify-center',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

고정 폭으로 인해 다자리 수 카운트가 잘리거나 겹칠 수 있습니다. min-w + padding으로 전환 제안

w-[2.5rem]100, 999 같은 3자리 이상에서 오버플로우/겹침 위험이 큽니다. 고정 폭 대신 최소 폭과 내부 여백으로 대응하세요.

-  'text-white-bg sub5-sb rounded-[0.4rem] w-[2.5rem] h:[2.8rem] flex items-center justify-center',
+  'text-white-bg sub5-sb rounded-[0.4rem] min-w-[2.8rem] h-[2.8rem] px-[0.4rem] flex items-center justify-center',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'text-white-bg sub5-sb rounded-[0.4rem] w-[2.5rem] h-[2.8rem] flex items-center justify-center',
'text-white-bg sub5-sb rounded-[0.4rem] min-w-[2.8rem] h-[2.8rem] px-[0.4rem] flex items-center justify-center',
🤖 Prompt for AI Agents
In packages/design-system/src/components/badge/Badge.tsx around line 22, the
fixed width class w-[2.5rem] causes multi-digit counts to overflow or overlap;
change it to use a minimum width (e.g., min-w-[2.5rem]) and add horizontal
padding (e.g., px-2) so the badge can grow for longer numbers, and replace or
supplement the fixed height with min-h or vertical padding (py-1) to preserve
vertical centering while keeping the existing flex centering and rounded styles.

{
variants: {
active: {
Expand Down
Loading