From f6c83437510463627ab6572564fb5ffa88955173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Jaenisch?= Date: Sun, 11 Feb 2024 14:58:01 +0100 Subject: [PATCH] feat: extract Created partial from route MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is displaying the created time of the user's profile. Signed-off-by: André Jaenisch --- src/lib/components/atoms/Created.svelte | 15 +++++ src/routes/profile/+page.svelte | 9 +-- tests/components/atoms/Created.test.ts | 76 +++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 src/lib/components/atoms/Created.svelte create mode 100644 tests/components/atoms/Created.test.ts diff --git a/src/lib/components/atoms/Created.svelte b/src/lib/components/atoms/Created.svelte new file mode 100644 index 0000000..34f62ab --- /dev/null +++ b/src/lib/components/atoms/Created.svelte @@ -0,0 +1,15 @@ + + +{#if created_at && created_at_formatted} + created {@html created_at_formatted} +{/if} diff --git a/src/routes/profile/+page.svelte b/src/routes/profile/+page.svelte index b6de84a..04db3a0 100644 --- a/src/routes/profile/+page.svelte +++ b/src/routes/profile/+page.svelte @@ -1,5 +1,6 @@