- 라우팅 react-router v7, 서버상태 TanStack Query - orval 자동 생성 API 클라이언트(src/api/generated) - 견적/상품/협력사/견적설정 페이지, shadcn UI, 토큰(tokens.css) - 실행: 루트 docker compose (front :3001), README 그에 맞게 정리 - AI Studio 스캐폴드 잔재 제거(metadata.json, 중복 DESIGN_TOKENS.md), 타이틀 NegoData, vite.config 죽은코드 제거 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
12 lines
465 B
TypeScript
12 lines
465 B
TypeScript
// 전역 토스트 — sonner 단일 출처. 기존 showToast(message, type) 시그니처를 유지해
|
|
// View/페이지가 받던 prop을 그대로 넘길 수 있게 한다.
|
|
import {toast} from 'sonner';
|
|
|
|
export type ToastType = 'success' | 'info' | 'error';
|
|
|
|
export function showToast(message: string, type: ToastType = 'info'): void {
|
|
if (type === 'success') toast.success(message);
|
|
else if (type === 'error') toast.error(message);
|
|
else toast(message);
|
|
}
|