import { getVtuberBySlug } from '@/lib/vtubers';
import { getAllStreamsForVtuber } from '@/lib/streams';
import NotFound from '../not-found';
import { DataRecord } from 'cal-heatmap/src/options/Options';
import { Cal } from '@/components/cal';
interface IPageProps {
params: {
slug: string;
};
}
function getArchiveStatusValue(archiveStatus: string): number {
if (archiveStatus === 'good') return 2;
if (archiveStatus === 'issue') return 1;
else return 0 // missing
}
function sortDataRecordsByDate(records: DataRecord[]) {
return records.sort((a, b) => {
if (typeof a.date === 'string' && typeof b.date === 'string') {
return a.date.localeCompare(b.date);
} else {
// Handle comparison when date is not a string (e.g., when it's a number)
// For instance, you might want to convert numbers to strings or use a different comparison logic.
// Example assuming number to string conversion:
return String(a.date).localeCompare(String(b.date));
}
});
}
export default async function Page({ params: { slug } }: IPageProps) {
const vtuber = await getVtuberBySlug(slug);
if (!vtuber) return
{JSON.stringify(streamsByYear[year], null, 2)}
*/}