feat: replace Svelte LegalDate component with Preact

This commit is contained in:
Stefan Imhoff
2023-04-02 15:51:40 +02:00
parent 9b784ae818
commit a15c4ef149
2 changed files with 4 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
---
import LegalDate from './LegalDate.svelte';
import { LegalDate } from './LegalDate';
import { site } from '../data/site';
---

View File

@@ -1,7 +1,7 @@
<script>
export const LegalDate = () => {
const currentDate = new Date();
const isoDate = currentDate.toISOString();
const currentYear = currentDate.getFullYear();
</script>
<time datetime={isoDate}>2006{currentYear}</time>
return <time dateTime={isoDate}>2006{currentYear}</time>;
};