Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
77f9fca
chore: add @mrfylke/contact-form dependency and transpilePackages
sifterstudios Feb 19, 2026
c46c2f9
feat(contact): add contact form config module
sifterstudios Feb 19, 2026
e80433f
feat(contact): use package lines API handler with authority prefix
sifterstudios Feb 19, 2026
190ead1
feat(contact): add contact wrapper with ContactFormRoot and ContactFo…
sifterstudios Feb 19, 2026
066e7fd
refactor(contact): replace contact pages with catch-all route
sifterstudios Feb 19, 2026
38bd451
refactor(contact): use package shouldShowContactPage in footer
sifterstudios Feb 19, 2026
664b809
refactor(contact): remove contact page-module UI and state machines
sifterstudios Feb 19, 2026
d29a113
refactor(contact): remove per-type contact API routes
sifterstudios Feb 19, 2026
62609e9
chore(contact): update contact translations for package
sifterstudios Feb 19, 2026
04b82aa
refactor(contact): move contact server code from page-modules to serv…
sifterstudios Feb 19, 2026
a7d5ec8
feat(contact): add unified POST /api/contact/submit route
sifterstudios Feb 19, 2026
2c0e2c6
style: prettier warnings
rosvik May 18, 2026
9aa57a1
chore: bump @mrfylke/contact-form
mathiazom Aug 28, 2026
76e9146
fix(contact): remove refund fallback form
mathiazom Aug 28, 2026
64ed918
fix(contact): hide skoleskyss for fram
mathiazom Aug 28, 2026
2149b09
fix(contact): use static link page for fram lost property
mathiazom Aug 28, 2026
ae32ebd
chore(contact): remove direct dependency on @emotion/is-prop-valid
mathiazom Aug 28, 2026
1737022
fix(contact): specify refund categories for fram
mathiazom Aug 28, 2026
164c569
feat(contact): support lostProperty form
mathiazom Aug 28, 2026
706a289
fix: host-controlled theme and language
mathiazom Aug 31, 2026
6c7ae42
fix: shouldShowContactPage
mathiazom Aug 31, 2026
b8c87ee
refactor: remove 'use client'
mathiazom Sep 1, 2026
e419bba
feat: bump contact form
mathiazom Sep 1, 2026
927c287
refactor: toContactFormLanguage
mathiazom Sep 1, 2026
76db49a
refactor: remove getContactPageTitle
mathiazom Sep 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const orgId = process.env.NEXT_PUBLIC_PLANNER_ORG_ID;
*/
const nextConfig = {
output: 'standalone',
transpilePackages: ['@atb-as/mapbox-shared'],
transpilePackages: ['@atb-as/mapbox-shared', '@mrfylke/contact-form'],
async headers() {
return [
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@isaacs/ttlcache": "^1.4.1",
"@leile/lobo-t": "^1.0.5",
"@mapbox/polyline": "^1.2.1",
"@mrfylke/contact-form": "^0.1.24",
"@react-aria/focus": "^3.21.0",
"@react-hook/resize-observer": "^2.0.2",
"@resvg/resvg-js": "^2.6.2",
Expand Down
122 changes: 120 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ allowBuilds:
unrs-resolver: true
minimumReleaseAgeExclude:
- "@atb-as/*"
- '@mrfylke/contact-form'
1 change: 1 addition & 0 deletions src/components/contact-form/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ContactFormWrapper } from './wrapper';
34 changes: 34 additions & 0 deletions src/components/contact-form/wrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import {
ContactFormRoot,
Language as ContactFormLanguage,
} from '@mrfylke/contact-form';
import { contactFormConfig } from '@atb/config/contact-form-config';
import { Language, useLanguageSettings } from '@atb/translations';
import { useDarkMode } from '@atb/modules/theme';
import { PropsWithChildren } from 'react';

export function ContactFormWrapper({ children }: PropsWithChildren) {
const { language } = useLanguageSettings();
const [isDarkMode] = useDarkMode();

return (
<ContactFormRoot
config={contactFormConfig}
language={toContactFormLanguage(language)}
theme={isDarkMode ? 'dark' : 'light'}
>
{children}
</ContactFormRoot>
);
}

function toContactFormLanguage(language: Language): ContactFormLanguage {
switch (language) {
case Language.English:
return ContactFormLanguage.English;
case Language.Norwegian:
return ContactFormLanguage.Norwegian;
case Language.Nynorsk:
return ContactFormLanguage.Nynorsk;
}
}
Loading
Loading