feat(ssr): add update last updated to analytics embed
All checks were successful
deploy / deploy (push) Successful in 2m10s
All checks were successful
deploy / deploy (push) Successful in 2m10s
This commit is contained in:
parent
426a2b5a2f
commit
b42ba1afdd
@ -4,6 +4,7 @@ import Container from "@/components/Container";
|
|||||||
import { ScoresaberMetricsHistory } from "@/schemas/fascinated/scoresaberMetricsHistory";
|
import { ScoresaberMetricsHistory } from "@/schemas/fascinated/scoresaberMetricsHistory";
|
||||||
import ssrSettings from "@/ssrSettings.json";
|
import ssrSettings from "@/ssrSettings.json";
|
||||||
import { formatNumber } from "@/utils/numberUtils";
|
import { formatNumber } from "@/utils/numberUtils";
|
||||||
|
import { formatDate } from "@/utils/timeUtils";
|
||||||
import { isProduction } from "@/utils/utils";
|
import { isProduction } from "@/utils/utils";
|
||||||
import { Metadata } from "next";
|
import { Metadata } from "next";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
@ -45,7 +46,8 @@ export async function generateMetadata(): Promise<Metadata> {
|
|||||||
description +
|
description +
|
||||||
`
|
`
|
||||||
|
|
||||||
Players currently online: ${formatNumber(lastActivePlayers)}
|
Last Updated: ${formatDate(new Date().toISOString())}
|
||||||
|
Players Online Today: ${formatNumber(lastActivePlayers)}
|
||||||
Scores set Today: ${formatNumber(lastScoreCount)}`,
|
Scores set Today: ${formatNumber(lastScoreCount)}`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,7 @@ export function formatTimeAgo(timestamp: string) {
|
|||||||
* @param timestamp the timestamp to format
|
* @param timestamp the timestamp to format
|
||||||
* @returns the formatted timestamp
|
* @returns the formatted timestamp
|
||||||
*/
|
*/
|
||||||
export function formatDate(timestamp: string) {
|
export function formatDate(timestamp: any) {
|
||||||
const date = parseISO(timestamp);
|
const date = parseISO(timestamp);
|
||||||
return date.toLocaleDateString("en-US", {
|
return date.toLocaleDateString("en-US", {
|
||||||
year: "numeric",
|
year: "numeric",
|
||||||
|
Loading…
Reference in New Issue
Block a user