Next.js 14 - ์ ๋จ์๋ก ๋ฐ๊พธ๊ธฐ, ๋ ์ง ํฌ๋งทํ๊ธฐ
ยท
♣๏ธ Next.js 14
โ
์ ๋จ์๋ก ๋ฐ๊พธ๊ธฐ, ๋ ์ง ํฌ๋งทํ๊ธฐ(/lib/utils.ts)export function formatToWon(price: number): string { return price.toLocaleString("ko-KR");} export function formatToTimeAgo(date: string): string { const dayInMs = 1000 * 60 * 60 * 24; const time = new Date(date).getTime(); const now = new Date().getTime(); // const now = Date.now(); const diff = Math.round((time - now) / dayInMs); const formatter = new ..