Skip to content
Open
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
38 changes: 19 additions & 19 deletions src/components/InfoBanner.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down Expand Up @@ -49,28 +62,15 @@ const InfoBanner = ({ visible, onHide }) => {
<div style={textStyle}>
<div style={{ marginBottom: 20 }}>
<div style={{ marginBottom: 10 }}>
The format of submission repository in the part 6 has changed, see {' '}
<a
style={linkStyle}
href="https://fullstackopen.com/en/part6/flux_architecture_and_zustand#submission-repository"
target="_blank"
rel="noreferrer"
>
here
</a>{' '}
for more
</div>

<div>
Osan 6 tehtävien palautusrepositorion formaatti on muuttunut, katso tarkemmin {' '}
{text} {' '}
<a
style={linkStyle}
href="https://fullstackopen.com/osa6/flux_arkkitehtuuri_ja_zustand#tehtavarepositorio"
href={SUBMISSION_REPO_URL}
target="_blank"
rel="noreferrer"
>
täältä
rel="noreferrer">
{text_here}
</a>
.
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const Layout = (props) => {

<Header lang={siteLanguage} />

<InfoBanner onHide={() => hideNote()} visible={visible} />
<InfoBanner onHide={() => hideNote()} visible={visible} language={siteLanguage} />

<InfoBanner2 onHide={() => hideNote2()} visible={false} />

Expand Down