From a5380070a1d30c8fffaa4fb60926e9f16dc6316f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Tue, 28 Sep 2021 16:11:48 +0200 Subject: [PATCH] Check is location is fresh/updated --- package.json | 1 + pnpm-lock.yaml | 6 ++++++ src/components/molecules/Location.svelte | 12 +++++++++++- src/routes/__layout.svelte | 1 + src/routes/index.svelte | 4 ++-- src/utils/functions.ts | 0 6 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 src/utils/functions.ts diff --git a/package.json b/package.json index 0a57d78..934a74a 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "lint": "eslint --ignore-path .gitignore ." }, "dependencies": { + "dayjs": "^1.10.7", "focus-visible": "^5.2.0", "sanitize.css": "^12.0.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 78afedb..63c176c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ specifiers: '@sveltejs/kit': next '@typescript-eslint/eslint-plugin': ^4.32.0 '@typescript-eslint/parser': ^4.32.0 + dayjs: ^1.10.7 eslint: ^7.32.0 eslint-plugin-svelte3: ^3.2.1 focus-visible: ^5.2.0 @@ -19,6 +20,7 @@ specifiers: typescript: ^4.4.3 dependencies: + dayjs: 1.10.7 focus-visible: 5.2.0 motion: 10.1.0 sanitize.css: 12.0.1 @@ -494,6 +496,10 @@ packages: which: 2.0.2 dev: true + /dayjs/1.10.7: + resolution: {integrity: sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig==} + dev: false + /debug/4.3.2: resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} engines: {node: '>=6.0'} diff --git a/src/components/molecules/Location.svelte b/src/components/molecules/Location.svelte index aecbbd6..c4a20e0 100644 --- a/src/components/molecules/Location.svelte +++ b/src/components/molecules/Location.svelte @@ -1,10 +1,17 @@
@@ -14,5 +21,8 @@ {name} {country.name} + {#if isNew} + + {/if}
\ No newline at end of file diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index 84c7f10..4dc1ac2 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -55,6 +55,7 @@ seo_name seo_title seo_description + limit_new instagram footer_links } diff --git a/src/routes/index.svelte b/src/routes/index.svelte index abaa54a..66a9159 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -1,10 +1,10 @@