[fix] 디렉토리 구조 변경 및 파일명칭 수정
This commit is contained in:
1 parent
c29541a365
commit
45f6a9f6ab
95 files changed
+160
-164
No files matched your search
@@ -0,0 +1,74 @@
|
||||
import ExternalLinkIcon from "@/assets/icons/external-link.svg?react";
|
||||
import CheckCircleIcon from "@/assets/report/check-circle.svg?react";
|
||||
import HelpCircleIcon from "@/assets/report/help-circle.svg?react";
|
||||
import XCircleIcon from "@/assets/report/x-circle.svg?react";
|
||||
import type { OtherChannelStatus } from "@/features/report/types/otherChannels";
|
||||
import { safeUrl } from "@/utils/safeUrl";
|
||||
|
||||
export type OtherChannelRowProps = {
|
||||
name: string;
|
||||
details: string;
|
||||
status: OtherChannelStatus;
|
||||
url?: string;
|
||||
animationDelayMs?: number;
|
||||
};
|
||||
|
||||
const statusMeta: Record<
|
||||
OtherChannelStatus,
|
||||
{ Icon: typeof CheckCircleIcon; iconClass: string; labelClass: string; label: string }
|
||||
> = {
|
||||
active: {
|
||||
Icon: CheckCircleIcon,
|
||||
iconClass: "text-[var(--color-status-good-dot)]",
|
||||
labelClass: "text-[var(--color-status-good-text)]",
|
||||
label: "활성",
|
||||
},
|
||||
inactive: {
|
||||
Icon: XCircleIcon,
|
||||
iconClass: "text-[var(--color-status-critical-dot)]",
|
||||
labelClass: "text-[var(--color-status-critical-text)]",
|
||||
label: "비활성",
|
||||
},
|
||||
unknown: {
|
||||
Icon: HelpCircleIcon,
|
||||
iconClass: "text-neutral-60",
|
||||
labelClass: "text-neutral-60",
|
||||
label: "미확인",
|
||||
},
|
||||
not_found: {
|
||||
Icon: XCircleIcon,
|
||||
iconClass: "text-[var(--color-status-critical-dot)]",
|
||||
labelClass: "text-[var(--color-status-critical-text)]",
|
||||
label: "미발견",
|
||||
},
|
||||
};
|
||||
|
||||
export function OtherChannelRow({ name, details, status, url, animationDelayMs = 0 }: OtherChannelRowProps) {
|
||||
const meta = statusMeta[status];
|
||||
const { Icon } = meta;
|
||||
|
||||
return (
|
||||
<div
|
||||
className="flex items-center gap-4 px-6 py-4 animate-fade-in-left"
|
||||
style={{ animationDelay: `${animationDelayMs}ms` }}
|
||||
>
|
||||
<Icon width={20} height={20} className={`shrink-0 ${meta.iconClass}`} aria-hidden />
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="body-14-medium text-navy-900 break-keep">{name}</p>
|
||||
<p className="body-14 text-neutral-60 break-keep">{details}</p>
|
||||
</div>
|
||||
<span className={`label-12 font-medium shrink-0 break-keep ${meta.labelClass}`}>{meta.label}</span>
|
||||
{url ? (
|
||||
<a
|
||||
href={safeUrl(url)}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-violet-700 hover:underline shrink-0 cursor-pointer [&_svg]:block"
|
||||
aria-label={`${name} 외부 링크`}
|
||||
>
|
||||
<ExternalLinkIcon width={16} height={16} aria-hidden />
|
||||
</a>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { OtherChannelRow } from "@/components/channel/OtherChannelRow";
|
||||
import type { OtherChannel } from "@/types/otherChannels";
|
||||
import { OtherChannelRow } from "@/features/report/ui/otherChannels/OtherChannelRow";
|
||||
import type { OtherChannel } from "@/features/report/types/otherChannels";
|
||||
|
||||
export type OtherChannelsListProps = {
|
||||
channels: OtherChannel[];
|
||||
|
||||
@@ -2,7 +2,7 @@ import AlertCircleIcon from "@/assets/icons/alert-circle.svg?react";
|
||||
import CheckCircleIcon from "@/assets/report/check-circle.svg?react";
|
||||
import GlobeIcon from "@/assets/report/globe.svg?react";
|
||||
import { PixelInstallCard } from "@/components/card/PixelInstallCard";
|
||||
import type { WebsiteAudit } from "@/types/otherChannels";
|
||||
import type { WebsiteAudit } from "@/features/report/types/otherChannels";
|
||||
|
||||
export type WebsiteTechAuditBlockProps = {
|
||||
website: WebsiteAudit;
|
||||
|
||||
Reference in new issue
Block a user