From 39285bcde203b96c828e32b98436c74e1dd93af2 Mon Sep 17 00:00:00 2001 From: essi1 Date: Fri, 14 Oct 2022 14:56:32 +0300 Subject: [PATCH] added new element & 404 pages --- components/Custom404/Custom404.jsx | 11 +++++++++++ components/EventPick/EventPick.jsx | 22 ++++++++++++++++++++++ components/TopPicks/TopPick.jsx | 14 -------------- components/TopPicks/TopPicks.jsx | 1 - components/lookUp.js | 2 ++ pages/404.js | 21 +++++++++++++++++++++ pages/fi/index.jsx | 6 +++--- 7 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 components/Custom404/Custom404.jsx create mode 100644 components/EventPick/EventPick.jsx delete mode 100644 components/TopPicks/TopPick.jsx diff --git a/components/Custom404/Custom404.jsx b/components/Custom404/Custom404.jsx new file mode 100644 index 0000000..a06f6dc --- /dev/null +++ b/components/Custom404/Custom404.jsx @@ -0,0 +1,11 @@ +const Custom404 = () => { + return ( +
+

404

+

Sivua ei löytynyt.

+
+ + ) +} + +export default Custom404 \ No newline at end of file diff --git a/components/EventPick/EventPick.jsx b/components/EventPick/EventPick.jsx new file mode 100644 index 0000000..9bbc5b7 --- /dev/null +++ b/components/EventPick/EventPick.jsx @@ -0,0 +1,22 @@ +import Link from "next/link"; + +const EventPick = ({ props, locale }) => { + + console.log('eventpick', props) + + return ( +
+ +
+ +
+

{props.event_item.title[locale]}

+

{props.event_item.short_desc[locale]}

+
+
+ +
+ ) +} + +export default EventPick \ No newline at end of file diff --git a/components/TopPicks/TopPick.jsx b/components/TopPicks/TopPick.jsx deleted file mode 100644 index 7c797d4..0000000 --- a/components/TopPicks/TopPick.jsx +++ /dev/null @@ -1,14 +0,0 @@ -import Link from 'next/link' - -const TopPick = ({ props, locale }) => { - - return ( -
- - {props.media_item} - -
- ) -} - -export default TopPick \ No newline at end of file diff --git a/components/TopPicks/TopPicks.jsx b/components/TopPicks/TopPicks.jsx index 05f7450..ff6c8e0 100644 --- a/components/TopPicks/TopPicks.jsx +++ b/components/TopPicks/TopPicks.jsx @@ -3,7 +3,6 @@ import styles from '../../styles/Home.module.css' const TopPicks = ({ props, locale }) => { - console.log(props) return (
diff --git a/components/lookUp.js b/components/lookUp.js index ab39823..848d57e 100644 --- a/components/lookUp.js +++ b/components/lookUp.js @@ -1,9 +1,11 @@ import topPicks from "./TopPicks/TopPicks"; import LocalPicks from "./LocalPicks/LocalPicks"; import Calendar from "./Calendar/Calendar"; +import EventPick from "./EventPick/EventPick"; const LookUp = { "top_picks": topPicks, + "event_pick": EventPick, "local_picks": LocalPicks, "calendar": Calendar } diff --git a/pages/404.js b/pages/404.js index e69de29..56c74e1 100644 --- a/pages/404.js +++ b/pages/404.js @@ -0,0 +1,21 @@ +import Head from "next/head" +import Layout from "../components/Layout/Layout" +import Custom404 from "../components/Custom404/Custom404" + +const Custom404Page = () => { + + return ( + <> + + 404 + + + + + + + + ) +} + +export default Custom404Page \ No newline at end of file diff --git a/pages/fi/index.jsx b/pages/fi/index.jsx index d29b9a4..d6ce997 100644 --- a/pages/fi/index.jsx +++ b/pages/fi/index.jsx @@ -10,7 +10,7 @@ import styles from "../../styles/Home.module.css"; import Typography from "@mui/material/Typography"; -const Home = ({ elements, footerProps }) => { +const Home = ({ elements }) => { const theme = useTheme(); @@ -19,8 +19,8 @@ const Home = ({ elements, footerProps }) => { }; return ( - - + +