feat: 시안 B 화면을 기본 화면으로, Hey API로 백엔드 연결

- 예전 화면(/, /a)과 목업 데이터를 지우고 시안 B 를 / 로
- @hey-api/openapi-ts 로 타입·TanStack Query 함수 생성, 토큰·401 갱신 처리
- 공유는 기본 공유창, 없으면 링크 복사

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
minaChoiandClaude Opus 5.5 committed 2026-10-02 11:32:22 +09:00
1 parent e134295ce5
commit f8b47f064a
147 files changed
+12350

No files matched your search

+88
View File
@@ -0,0 +1,88 @@
import type { CSSProperties, ReactNode } from 'react'
import { Link } from 'react-router'
import { cx } from '../lib/utils'
import { iconSrc } from './lib'
type IcProps = { name: string; className?: string; alt?: string; style?: CSSProperties }
export function Ic({ name, className, alt = '', style }: IcProps) {
return <img src={iconSrc(name)} alt={alt} className={cx('block', className)} style={style} decoding="async" />
}
type SecProps = { title: string; sub?: ReactNode; more?: { to: string; label?: string }; className?: string }
export function Sec({ title, sub, more, className }: SecProps) {
return (
<div className={cx('flex items-end justify-between px-4 pt-[22px] pb-1.5', className)}>
<div>
<h2 className="m-0 font-jua text-[21px] font-normal">{title}</h2>
{sub && <p className="mt-0.5 text-[13px] font-semibold text-(--ink2)">{sub}</p>}
</div>
{more && (
<Link to={more.to} className="text-[13px] font-bold text-(--ink2)">
{more.label ?? '전체 보기'}
</Link>
)}
</div>
)
}
export function Rail({ children, className, label }: { children: ReactNode; className?: string; label?: string }) {
return (
<div className={cx('b-noscroll flex snap-x snap-proximity gap-2.5 overflow-x-auto px-4 pt-3 pb-1 *:shrink-0 *:snap-start', className)} role={label ? 'group' : undefined} aria-label={label}>
{children}
</div>
)
}
type ChipsProps<K extends string> = { items: readonly (readonly [K, string])[]; value: K; onChange: (k: K) => void; label: string }
export function Chips<K extends string>({ items, value, onChange, label }: ChipsProps<K>) {
return (
<div className="b-noscroll flex gap-2 overflow-x-auto px-4 pt-3 pb-0.5" role="group" aria-label={label}>
{items.map(([k, l]) => (
<button
key={k}
type="button"
aria-pressed={value === k}
onClick={() => onChange(k)}
className={cx('shrink-0 cursor-pointer rounded-full px-3.5 py-[7px] text-[13.5px] font-bold', value === k ? 'bg-(--ink) text-white' : 'bg-white text-(--ink2) shadow-[inset_0_-3px_0_var(--shade)]')}
>
{l}
</button>
))}
</div>
)
}
type StateProps = { loading?: boolean; error?: unknown; onRetry?: () => void; empty?: string; className?: string }
/** 불러오는 중·실패·빈 목록 안내 */
export function StateBox({ loading, error, onRetry, empty, className }: StateProps) {
const text = loading ? '불러오는 중이에요…' : error ? '정보를 불러오지 못했어요.' : empty
if (!text) return null
return (
<div className={cx('mx-3 mt-3 flex flex-col items-center gap-2 rounded-[22px] bg-white px-4 py-6 text-center text-[13.5px] font-semibold text-(--ink2) shadow-[inset_0_-5px_0_var(--shade)]', className)} role={error ? 'alert' : 'status'}>
<span>{text}</span>
{error != null && onRetry && (
<button type="button" onClick={onRetry} className="cursor-pointer rounded-full bg-(--ink) px-4 py-1.5 text-[13px] font-bold text-white">
다시 시도
</button>
)}
</div>
)
}
/** 줄 목록 (라벨 · 값) */
export function Rows({ rows, dark = false }: { rows: { label: string; value: string }[]; dark?: boolean }) {
return (
<div className="mt-auto flex flex-col">
{rows.map((r) => (
<div key={r.label} className={cx('flex justify-between gap-2.5 border-b-2 py-2.5 font-bold last:border-b-0', dark ? 'border-white/18' : 'border-[rgb(40_48_74/0.08)]')}>
<span>{r.label}</span>
<b className="text-right font-jua text-[17px] font-normal">{r.value}</b>
</div>
))}
</div>
)
}