Skip to content

Commit

Permalink
Merge pull request #4819 from HSLdevcom/DT-5941
Browse files Browse the repository at this point in the history
fix: about texts for kela and fix warning
  • Loading branch information
vesameskanen authored May 29, 2023
2 parents d82ca95 + 6f68f00 commit fd3afa9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
12 changes: 9 additions & 3 deletions app/component/AboutPage.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import PropTypes from 'prop-types';
/* eslint-disable react/no-array-index-key */
import React from 'react';
import React, { useEffect, useState } from 'react';
import Link from 'found/Link';
import { FormattedMessage } from 'react-intl';
import connectToStores from 'fluxible-addons-react/connectToStores';

const AboutPage = ({ currentLanguage }, { config }) => {
const about = config.aboutThisService[currentLanguage];
const [about, setAbout] = useState([]);
useEffect(() => {
setAbout(config.aboutThisService[currentLanguage]);
}, []);
return (
<div className="about-page fullscreen">
<div className="page-frame fullscreen momentum-scroll">
Expand All @@ -16,7 +19,10 @@ const AboutPage = ({ currentLanguage }, { config }) => {
<h1 className="about-header">{section.header}</h1>
{section.paragraphs &&
section.paragraphs.map((p, j) => (
<p key={`about-section-${i}-p-${j}`}>{p}</p>
<p
key={`about-section-${i}-p-${j}`}
dangerouslySetInnerHTML={{ __html: p }}
/>
))}
{section.link && (
<a href={section.link}>
Expand Down
13 changes: 8 additions & 5 deletions app/component/TopLevel.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ class TopLevel extends React.Component {
}

componentDidMount() {
import(
/* webpackChunkName: "main" */ `../configurations/images/${this.context.config.logo}`
).then(logo => {
this.setState({ logo: logo.default });
});
if (this.context.config.logo) {
// Logo is not mandatory
import(
/* webpackChunkName: "main" */ `../configurations/images/${this.context.config.logo}`
).then(logo => {
this.setState({ logo: logo.default });
});
}
}

componentDidUpdate(prevProps) {
Expand Down
10 changes: 6 additions & 4 deletions app/configurations/config.kela.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,18 @@ export default configMerger(matkaConfig, {
{
header: 'Tietoja palvelusta',
paragraphs: [
'Tervetuloa Kelan reittioppaaseen! Palvelu perustuu Digitransit-palvelualustaan.',
'Reittiopasta käytetään Kelan matkaetuuksien hakemisessa ja myöntämisessä. Voit selvittää reittioppaalla matkasi tietoja kuten matkan pituuden, kulkutavan ja matkustusajan. Reittiopasta hyödynnetään Kelan <a href="https://www.kela.fi/koulumatkatuki">koulumatkatuessa</a> sekä <a href="https://www.kela.fi/matkat">terveydenhuollon ja kuntoutuksen matkakorvauksissa</a>.',
'Kela ei vastaa reittioppaan tiedoista. Jos havaitset reittioppaassa puutteita tai virheitä, ole yhteydessä palvelun tietojen toimittajaan.',
],
link: 'https://kela.fi',
},
],

sv: [
{
header: 'Om tjänsten',
paragraphs: [
'Den här tjänsten erbjuds av Fpa för reseplanering. Tjänsten baserar sig på Digitransit-plattformen.',
'Reseplaneraren används vid ansökan om och beviljande av reseförmåner från FPA. Med hjälp av reseplaneraren ser du uppgifter om din resa, såsom resans längd, färdsätt och restid. Reseplaneraren används för FPA:s <a href="https://www.kela.fi/skolresestod">skoleresestöd</a> samt <a href="https://www.kela.fi/resor">reseersättningar i samband med hälso- och sjukvård och rehabilitering</a>.',
'FPA svarar inte för uppgifterna i reseplaneraren. Om du märker brister eller fel i reseplaneraren ska du kontakta den som levererar uppgifter till tjänsten.',
],
},
],
Expand All @@ -134,7 +135,8 @@ export default configMerger(matkaConfig, {
{
header: 'About this service',
paragraphs: [
'This service is provided by Kela for route planning. Service is built on Digitransit platform.',
'The journey planner is used when applying for and granting travel-related benefits from Kela. In the journey planner, you can see information about your trip, for instance travel distance, mode of transport and travel time. The journey planner is used for <a href="https://www.kela.fi/school-transport-subsidy">school transport subsidy</a> and <a href="https://www.kela.fi/travel-costs">reimbursements of travel expenses in connection with health care and rehabilitation</a>.',
'Kela is not responsible for the information in the journey planner. If you notice inaccuracies or incorrect information in the journey planner, you should contact the supplier of information to the service.',
],
},
],
Expand Down

0 comments on commit fd3afa9

Please sign in to comment.