Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: lost property contact page #378

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions src/page-modules/contact/layouts/contact-page-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ export const contactPages: ContactPage[] = [
href: '/contact/tickets-app',
icon: 'devices/Phone',
},
*/
{
title: PageText.Contact.lostAndFound.title,
href: '/contact/lost-and-found',
title: PageText.Contact.lostProperty.title,
href: '/contact/lost-property',
icon: 'actions/Support',
},
/*
{
title: PageText.Contact.groupTravel.title,
href: '/contact/group-travel',
Expand Down
25 changes: 25 additions & 0 deletions src/page-modules/contact/lost-property/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Typo } from '@atb/components/typography';
import { SectionCard } from '../components/section-card';
import { PageText, useTranslation } from '@atb/translations';

export default function LostPropertyContent() {
const { t } = useTranslation();
return (
<div>
<SectionCard title={t(PageText.Contact.lostProperty.title)}>
<Typo.p textType="body__primary">
<span>
{t(PageText.Contact.lostProperty.description.info)},&nbsp;
<a
href={t(PageText.Contact.lostProperty.description.url)}
target="_blank"
rel="noreferrer"
>
{t(PageText.Contact.lostProperty.description.externalLink)}
</a>
</span>
</Typo.p>
</SectionCard>
</div>
);
}
24 changes: 24 additions & 0 deletions src/pages/contact/lost-property.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import DefaultLayout from '@atb/layouts/default';
import { withGlobalData, WithGlobalData } from '@atb/layouts/global-data';
import {
ContactPageLayout,
ContactPageLayoutProps,
} from '@atb/page-modules/contact';
import LostPropertyContent from '@atb/page-modules/contact/lost-property';
import { NextPage } from 'next';

export type LostPropertyPageProps = WithGlobalData<ContactPageLayoutProps>;

const LostPropertyPage: NextPage<LostPropertyPageProps> = (props) => {
return (
<DefaultLayout {...props}>
<ContactPageLayout {...props}>
<LostPropertyContent />
</ContactPageLayout>
</DefaultLayout>
);
};

export default LostPropertyPage;

export const getServerSideProps = withGlobalData();
23 changes: 20 additions & 3 deletions src/translations/pages/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,30 @@ export const Contact = {
},
},
},
lostProperty: {
title: _('Hittegods', 'Lost property', 'Hittegods'),
description: {
info: _(
'Har du glemt igjen noe i en av bussene, hurtigbåtene eller fergene',
'If you have forgotten something on one of the buses, express boats, or ferries',
'Har du gløymt igjen noko i ein av bussane, hurtigbåtane eller ferjene',
),
externalLink: _(
'finner du informasjon om hvem du kan kontakte her.',
'you can find information on who to contact here.',
'finn du informasjon om kven du kan ta kontakt med her.',
),
url: _(
'https://frammr.no/hjelp-og-kontakt/hittegods/',
'https://frammr.no/hjelp-og-kontakt/hittegods/?sprak=3',
'https://frammr.no/hjelp-og-kontakt/hittegods/',
),
},
},

ticketsApp: {
title: _('Billetter og app', 'Tickets and app', 'Billettar og app'),
},
lostAndFound: {
title: _('Hittegods', 'Lost and found', 'Hittegods'),
},
groupTravel: {
title: _('Gruppereise', 'Group travel', 'Gruppereise'),
},
Expand Down
Loading