updated stream schedule

This commit is contained in:
liyunze 2024-11-23 16:52:29 +11:00
parent 3ee787c3c0
commit bf66861cb4

View file

@ -4,15 +4,20 @@
const myLocation = "Australia/Melbourne";
const myStreamSchedule = [
{
start: getUpcomingTimeDevTZ(2, "9:30"),
end: getUpcomingTimeDevTZ(2, "16:00"),
},
{
start: getUpcomingTimeDevTZ(4, "9:30"),
end: getUpcomingTimeDevTZ(4, "16:00"),
},
type StreamScheduleDay = {
start: moment.Moment;
end: moment.Moment;
};
const myStreamSchedule: null | StreamScheduleDay[] = [
// {
// start: getUpcomingTimeDevTZ(2, "9:30"),
// end: getUpcomingTimeDevTZ(2, "16:00"),
// },
// {
// start: getUpcomingTimeDevTZ(4, "9:30"),
// end: getUpcomingTimeDevTZ(4, "16:00"),
// },
];
/**
@ -75,6 +80,9 @@
let formattedLocalisedSchedule: Schedule[] = $state([]);
function displayStreamSchedule() {
if (myStreamSchedule == null) {
return;
}
localisedStreamSchedule = myStreamSchedule.map((stream) => ({
start: convertToUserLocalTimezone(stream.start),
end: convertToUserLocalTimezone(stream.end),
@ -133,6 +141,7 @@
</div>
{/if}
<div class="mt-1">
{#if myStreamSchedule.length}
<table>
<thead>
<tr>
@ -162,6 +171,15 @@
{/if}
</tbody>
</table>
{:else}
<div>
To be announced on <a
href="/discord"
target="_blank"
class="underline hover:text-blue-500">Discord</a
>
</div>
{/if}
</div>
<style>