From 7c67e674e52f6b3da9e137f52f750ec1a68425f3 Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Sat, 24 Jun 2023 22:32:20 +0200 Subject: [PATCH] refactor: lots of improvements (#69) --- src/components/AddressBar.astro | 6 +- src/components/Library.astro | 19 +++--- src/components/Post.astro | 9 ++- src/layouts/Layout.astro | 36 +++++++---- src/pages/index.astro | 43 ++++--------- src/utils/library.ts | 107 +++++++++++++++++--------------- 6 files changed, 111 insertions(+), 109 deletions(-) diff --git a/src/components/AddressBar.astro b/src/components/AddressBar.astro index 0f4c500..00eae41 100644 --- a/src/components/AddressBar.astro +++ b/src/components/AddressBar.astro @@ -2,11 +2,11 @@ import Icon from 'astro-iconify'; export interface Props { - url: string; + url: string | null; } -const { url } = Astro.props; const placeholder = 'Type the article URL here'; +const { url } = Astro.props; ---
@@ -14,7 +14,7 @@ const placeholder = 'Type the article URL here'; - + diff --git a/src/components/Library.astro b/src/components/Library.astro index 6850424..7c23cb1 100644 --- a/src/components/Library.astro +++ b/src/components/Library.astro @@ -1,31 +1,29 @@ --- export interface Props { - postDivSelector: string, + routerOutlet: string, skipSave?: boolean } -const {postDivSelector, skipSave = false} = Astro.props; +const {routerOutlet, skipSave = false} = Astro.props; ---
    - - + +