[SSR 비활성화] SPA 방식으로 변경

This commit is contained in:
sohot8653
2025-10-21 15:54:01 +09:00
parent 7bbbdbe977
commit f2a717df4f
8 changed files with 33 additions and 51 deletions

22
plugins/myPlugin.ts Normal file
View File

@@ -0,0 +1,22 @@
export default defineNuxtPlugin(() => {
return {
provide: {
// 통화 포맷팅 함수 제공
formatCurrency: (amount: number): string => {
return new Intl.NumberFormat("ko-KR", {
style: "currency",
currency: "KRW",
}).format(amount);
},
// 알림 표시 함수
showNotification: (
message: string,
type: "success" | "error" | "warning" = "success"
) => {
console.log(`[${type.toUpperCase()}] ${message}`);
// 실제로는 토스트 알림 라이브러리 사용
},
},
};
});