Backup: hydration fix and security updates before Next.js 15 upgrade
This commit is contained in:
parent
5135789450
commit
57c44ebf69
@ -83,7 +83,12 @@ function distribute(total: number, buckets: number): number[] {
|
||||
function formatPretty(s: string): string {
|
||||
try {
|
||||
const d = fromYMD(s);
|
||||
return d.toLocaleDateString(undefined, { weekday: "short", month: "short", day: "numeric" });
|
||||
const weekdays = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
||||
const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
||||
const weekday = weekdays[d.getDay()];
|
||||
const month = months[d.getMonth()];
|
||||
const day = d.getDate();
|
||||
return `${weekday}, ${month} ${day}`;
|
||||
} catch {
|
||||
return s;
|
||||
}
|
||||
|
||||
20
package.json
20
package.json
@ -9,23 +9,23 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "14.2.3",
|
||||
"framer-motion": "^11.0.0",
|
||||
"lucide-react": "^0.441.0",
|
||||
"next": "^14.2.31",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"framer-motion": "^11.0.0",
|
||||
"recharts": "^2.8.0",
|
||||
"lucide-react": "^0.441.0",
|
||||
"tailwind-merge": "^2.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.10.6",
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/react-dom": "^18.2.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-next": "^14.2.3",
|
||||
"postcss": "^8.4.38",
|
||||
"tailwindcss": "^3.4.7",
|
||||
"typescript": "^5.4.0",
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/node": "^20.10.6",
|
||||
"@types/react-dom": "^18.2.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-next": "^14.2.3"
|
||||
"typescript": "^5.4.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,14 +21,21 @@
|
||||
"@/*": [
|
||||
"./*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx"
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user