From 56db514d158bf049acd902c39862041c6668f029 Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Mon, 27 Mar 2023 19:32:53 +0200 Subject: [PATCH] Extract form as a separate component --- src/components/form.astro | 34 ++++++++++++++++++++++++++++++++++ src/pages/index.astro | 30 +++++------------------------- 2 files changed, 39 insertions(+), 25 deletions(-) create mode 100644 src/components/form.astro diff --git a/src/components/form.astro b/src/components/form.astro new file mode 100644 index 0000000..5a95040 --- /dev/null +++ b/src/components/form.astro @@ -0,0 +1,34 @@ +--- +/*! + * © 2023 Nikita Karamov + * Licensed under AGPL v3 or later + */ +import InstanceSelect from "@components/instance-select.astro"; + +const { prefilledText, prefilledInstance } = Astro.props; +--- + +
+ + + + + + diff --git a/src/pages/index.astro b/src/pages/index.astro index c0580b9..b8b2bba 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -4,7 +4,7 @@ * Licensed under AGPL v3 or later */ import Layout from "@layouts/layout.astro"; -import InstanceSelect from "@components/instance-select.astro"; +import Form from "@components/form.astro"; import { Content as PrivacyNotice } from "@pages/_privacy.md"; import { Content as Licence } from "@pages/_licence.md"; @@ -23,30 +23,10 @@ const prefilledInstance = searchParameters.get("instance"); />
-
- - - - - - +