diff --git a/astro.config.mjs b/astro.config.mjs
index dd1975e..d329c51 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -10,7 +10,8 @@ export default defineConfig({
adapter: node({
mode: 'standalone',
}),
- integrations: [preact(), global()],
+ // eslint-disable-next-line no-undef
+ integrations: [preact({ devtools: process.env.NODE_ENV === 'development' }), global()],
i18n: {
defaultLocale: 'en',
locales: ['en'],
diff --git a/src/components/ComplaintLandingPage/AskAuthority.astro b/src/components/ComplaintLandingPage/AskAuthority.astro
index 95ba8bf..b792a33 100644
--- a/src/components/ComplaintLandingPage/AskAuthority.astro
+++ b/src/components/ComplaintLandingPage/AskAuthority.astro
@@ -4,12 +4,14 @@ import Base from '../../layouts/base.astro';
import { absUrl } from '../../lib/util';
import TextRaw from '../TextRaw.astro';
import { dpas } from '../../lib/dpas';
+import RadioForm from '../RadioForm.astro';
interface Props {
token: string;
+ complaintAuthority: string | null;
}
-const { token } = Astro.props;
+const { token, complaintAuthority } = Astro.props;
---
@@ -17,18 +19,13 @@ const { token } = Astro.props;
-
-
- {
- Object.values(dpas).map((d) => (
-
- ))
- }
-
-
+ , key: string) => {
+ agg[key] = dpas[key]!.name;
+ return agg;
+ }, {})}
+ value={complaintAuthority}
+ idPrefix="askAuthority"
+ />
diff --git a/src/components/ComplaintLandingPage/AskComplaintType.astro b/src/components/ComplaintLandingPage/AskComplaintType.astro
index b53a36f..6ded906 100644
--- a/src/components/ComplaintLandingPage/AskComplaintType.astro
+++ b/src/components/ComplaintLandingPage/AskComplaintType.astro
@@ -3,12 +3,14 @@ import { t } from '../../i18n/server';
import Base from '../../layouts/base.astro';
import { absUrl } from '../../lib/util';
import TextRaw from '../TextRaw.astro';
+import RadioForm from '../RadioForm.astro';
interface Props {
token: string;
+ complaintType: string | null | undefined;
}
-const { token } = Astro.props;
+const { token, complaintType } = Astro.props;
---
@@ -21,18 +23,16 @@ const { token } = Astro.props;
{t('complaint-landing-askComplaintType', 'informal-complaint-explanation')}
-
-
- {
- (['formal', 'informal'] as const).map((type) => (
-
- ))
- }
-
-
+
+ Object.assign(agg, {
+ [type]: t('complaint-landing-askComplaintType', `${type}-complaint-button`),
+ }),
+ {},
+ )}
+ value={complaintType}
+ idPrefix="askComplaintType"
+ />
diff --git a/src/components/ComplaintLandingPage/AskDeveloperAddress.astro b/src/components/ComplaintLandingPage/AskDeveloperAddress.astro
index 952e473..2b46045 100644
--- a/src/components/ComplaintLandingPage/AskDeveloperAddress.astro
+++ b/src/components/ComplaintLandingPage/AskDeveloperAddress.astro
@@ -29,7 +29,7 @@ const { token, developerName, privacyPolicyUrl } = Astro.props;