diff --git a/src/components/InfoBanner.js b/src/components/InfoBanner.js index 7efe1152e3..278e6e3173 100644 --- a/src/components/InfoBanner.js +++ b/src/components/InfoBanner.js @@ -1,8 +1,21 @@ import React from 'react'; -const InfoBanner = ({ visible, onHide }) => { +const InfoBanner = ({ visible, onHide, language }) => { if (!visible) return null; + const SUBMISSION_REPO_URL = + language === 'fi' + ? 'https://fullstackopen.com/osa6/flux_arkkitehtuuri_ja_zustand#tehtavarepositorio' + : 'https://fullstackopen.com/en/part6/flux_architecture_and_zustand#submission-repository'; + + const text = + language === 'fi' + ? 'Osan 6 tehtävien palautusrepositorion formaatti on muuttunut, ' + : 'The format of submission repository in the part 6 has changed, '; + const text_here = + language === 'fi' + ? 'katso tarkemmin täältä' + : 'see more details here'; const style = { padding: 10, borderStyle: 'solid', @@ -49,28 +62,15 @@ const InfoBanner = ({ visible, onHide }) => {
- The format of submission repository in the part 6 has changed, see {' '} - - here - {' '} - for more -
- -
- Osan 6 tehtävien palautusrepositorion formaatti on muuttunut, katso tarkemmin {' '} + {text} {' '} - täältä + rel="noreferrer"> + {text_here} + .
diff --git a/src/components/layout.js b/src/components/layout.js index b13a9183fd..055712885a 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -107,7 +107,7 @@ const Layout = (props) => {
- hideNote()} visible={visible} /> + hideNote()} visible={visible} language={siteLanguage} /> hideNote2()} visible={false} />