Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
majkshkurti committed Aug 13, 2024
2 parents 038197f + b0d6d0c commit de629fe
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 2 deletions.
71 changes: 71 additions & 0 deletions app/component/Feedback.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import PropTypes from 'prop-types';
/* eslint-disable react/no-array-index-key */
import React from 'react';
import Link from 'found/Link';
import { FormattedMessage } from 'react-intl';
import connectToStores from 'fluxible-addons-react/connectToStores';

const FeedbackPage = ({ currentLanguage }, { config }) => {
const feedback = config.feedback[currentLanguage];
return (
<div className="about-page fullscreen">
<div className="page-frame fullscreen momentum-scroll">
{feedback.map((section, i) =>
(section.paragraphs && section.paragraphs.length) || section.link ? (
<div key={`feedback-section-${i}`}>
{i === 0 ? (
<h1 className="feedback-header">{section.header}</h1>
) : (
<h2 className="feedback-header">{section.header}</h2>
)}
{section.paragraphs &&
section.paragraphs.map((p, j) => (
// eslint-disable-next-line react/no-danger
<p
dangerouslySetInnerHTML={{ __html: p }}
key={`feedback-section-${i}-p-${j}`}
/>
))}
{section.link && (
<a href={section.link} className="link">
<FormattedMessage
id="extra-info"
defaultMessage="More information"
/>
</a>
)}
</div>
) : (
false
),
)}
<Link to="/">
<div className="call-to-action-button">
<FormattedMessage
id="back-to-front-page"
defaultMessage="Back to front page"
/>
</div>
</Link>
</div>
</div>
);
};

FeedbackPage.propTypes = {
currentLanguage: PropTypes.string.isRequired,
};

FeedbackPage.contextTypes = {
config: PropTypes.object.isRequired,
};

const connectedComponent = connectToStores(
FeedbackPage,
['PreferencesStore'],
context => ({
currentLanguage: context.getStore('PreferencesStore').getLanguage(),
}),
);

export { connectedComponent as default, FeedbackPage as Component };
22 changes: 20 additions & 2 deletions app/configurations/config.klnavi.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default configMerger(walttiConfig, {
modesWithNoBike: ['BICYCLE_RENT', 'WALK', 'CARPOOL', 'FLEX_DIRECT', 'FLEX_ACCESS', 'FLEX_EGRESS'],
appBarLink: {
name: 'Feedback',
href: 'https://klnavi.de/feedback',
href: '/feedback',
target: '_blank'
},
contactName: {
Expand Down Expand Up @@ -433,6 +433,24 @@ export default configMerger(walttiConfig, {
]
},

feedback: {
de: [
{
header: 'Feedback',
paragraphs: [
'Sie haben Feedback oder Anregungen zum KL.Navi? Wir freuen uns über Ihre Nachricht! Schreiben Sie uns eine E-Mail an <a href=mailto:lotse@kaiserslautern.de>lotse@kaiserslautern.de</a>.'
]
}
],
en: [
{
header: 'Feedback',
paragraphs: [
'Do you have feedback or suggestions for KL.Navi? We look forward to your message! Write us an email at <a href=mailto:lotse@kaiserslautern.de>lotse@kaiserslautern.de</a>!'
]
}
]
},
aboutThisService: {
de: [
{
Expand All @@ -447,7 +465,7 @@ export default configMerger(walttiConfig, {
'Sie betreiben ein Mobilitätsangebot in Kaiserslautern und haben es noch nicht in KL.Navi gefunden? Dann freuen wir uns über Ihre Nachricht. Statistische und Echtzeit-Informationen, die als offene Daten vorliegen, binden wir gerne ein.',
'Sie nutzen ein Mobilitätsangebot in Brandenburg (z.B. einen Bürgerbus oder ein Fahrrad- oder Carsharing-Angebot) und finden es nicht in KL.Navi? Dann freuen wir uns über Ihre Hinweise und gucken dann, ob wir es in KL.Navi einbinden können.',
'Sie möchten zum Mitmacher werden und wünschen mehr Informationen?',
'Schreiben Sie uns eine E-mail an vorname.nachname@kaiserslautern.de',
'Schreiben Sie uns eine E-mail an <a href=mailto:lotse@kaiserslautern.de>lotse@kaiserslautern.de</a>.',
]
},
{
Expand Down
10 changes: 10 additions & 0 deletions app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,16 @@ export default config => {
),
}}
</Route>

<Route
path="/feedback"
getComponent={() =>
import(
/* webpackChunkName: "feedback" */ './component/Feedback'
).then(getDefault)
}
/>

<Route
path="/dieser-dienst"
getComponent={() =>
Expand Down

0 comments on commit de629fe

Please sign in to comment.