Migrate to dayjs and Astro 4.0

This commit is contained in:
2023-12-07 00:17:32 +01:00
parent 505ee26622
commit 311856415e
24 changed files with 731 additions and 980 deletions

View File

@ -3,12 +3,12 @@
import TeamChip from "./TeamChip.svelte";
import type {Team} from "../../../types/team.js";
import DragAcceptor from "./DragAcceptor.svelte";
import moment from "moment";
import {Button, Input, Label, Modal, Range, Select} from "flowbite-svelte";
import {gamemodes, maps} from "../../../stores/stores.js";
import {PlusSolid} from "flowbite-svelte-icons";
import {fightRepo} from "../../../repo/repo.js";
import {replace} from "svelte-spa-router";
import * as dayjs from "dayjs";
export let data: ExtendedEvent;
$: teams = new Map<number, Team>(data.teams.map(team => [team.id, team]));
@ -46,8 +46,8 @@
groups = groups.map((group, i) => i === groupIndex ? [...group.filter(value => value != teamId), teamId] : group.filter(value => value != teamId)).filter(group => group.length > 0);
}
let startTime = moment(data.event.start).utc(true).toISOString().slice(0, -1)
$: startMoment = moment(startTime);
let startTime = dayjs(data.event.start).utc(true).toISOString().slice(0, -1)
$: startMoment = dayjs(startTime);
let gamemode = ''
let map = ''