From 9777d30b380a69cfa444a12203348a4405eb9a63 Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Sun, 28 Mar 2021 22:20:55 +0300 Subject: [PATCH] fix canonical urls --- src/pages/404.tsx | 1 - src/pages/admin/events/[id].tsx | 30 +++++------ src/pages/admin/events/index.tsx | 16 ++---- src/pages/admin/feed/[id].tsx | 30 +++++------ src/pages/admin/feed/index.tsx | 16 ++---- src/pages/admin/index.tsx | 2 +- src/pages/admin/jobads/[id].tsx | 30 +++++------ src/pages/admin/jobads/index.tsx | 16 ++---- src/pages/admin/login.tsx | 82 ++++++++++++++----------------- src/pages/admin/signups/[id].tsx | 4 -- src/pages/admin/signups/index.tsx | 16 ++---- src/pages/events/[id].tsx | 2 +- src/pages/feed/[id].tsx | 2 +- src/pages/in_english.tsx | 2 +- src/pages/index.tsx | 2 +- src/pages/kilta/fuksi.tsx | 2 +- src/pages/kilta/index.tsx | 2 +- src/pages/kilta/kunnia.tsx | 2 +- src/pages/kilta/toiminta.tsx | 2 +- src/pages/opinnot_ja_ura.tsx | 2 +- src/pages/signup/[id].tsx | 2 +- src/pages/yhteystiedot.tsx | 2 +- src/pages/yritysyhteistyo.tsx | 2 +- 23 files changed, 107 insertions(+), 160 deletions(-) diff --git a/src/pages/404.tsx b/src/pages/404.tsx index 383273f..c58c5ed 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -16,7 +16,6 @@ const NotFound = styled.main` const NotFoundPage: NextPage = () => ( <> - 404 | Ei vaan löydy diff --git a/src/pages/admin/events/[id].tsx b/src/pages/admin/events/[id].tsx index c29b285..48b2ba3 100644 --- a/src/pages/admin/events/[id].tsx +++ b/src/pages/admin/events/[id].tsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from "react"; import { NextPage } from "next"; -import Head from "next/head"; import { useRouter } from "next/router"; import AdminCreateCommon from "@views/admin/AdminCreateCommon"; import Tag from "@models/Tag"; @@ -238,23 +237,18 @@ const EventCreatePage: NextPage = () => { : "Create Event"; return ( - <> - - - - - + ); }; diff --git a/src/pages/admin/events/index.tsx b/src/pages/admin/events/index.tsx index f97becb..e77d5d8 100644 --- a/src/pages/admin/events/index.tsx +++ b/src/pages/admin/events/index.tsx @@ -1,6 +1,5 @@ import React from "react"; import { NextPage } from "next"; -import Head from "next/head"; import { formatRelative } from "date-fns"; import AdminListCommon from "@views/admin/AdminListCommon"; import { Link } from "@components/index"; @@ -39,16 +38,11 @@ const renderData = (events: Event[]) => { const AdminEventPage: NextPage = () => { const { data } = useFetchEvents({ options: { auth: true } }); return ( - <> - - - - -

Events

- - {renderData(data)} -
- + +

Events

+ + {renderData(data)} +
); }; diff --git a/src/pages/admin/feed/[id].tsx b/src/pages/admin/feed/[id].tsx index 643fe78..e4dfcf5 100644 --- a/src/pages/admin/feed/[id].tsx +++ b/src/pages/admin/feed/[id].tsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from "react"; import { NextPage } from "next"; -import Head from "next/head"; import { useRouter } from "next/router"; import AdminCreateCommon from "@views/admin/AdminCreateCommon"; import Tag from "@models/Tag"; @@ -189,23 +188,18 @@ const FeedCreatePage: NextPage = () => { : "Create Post"; return ( - <> - - - - - + ); }; diff --git a/src/pages/admin/feed/index.tsx b/src/pages/admin/feed/index.tsx index 514fee3..757ed1e 100644 --- a/src/pages/admin/feed/index.tsx +++ b/src/pages/admin/feed/index.tsx @@ -1,6 +1,5 @@ import React from "react"; import { NextPage } from "next"; -import Head from "next/head"; import { formatRelative } from "date-fns"; import AdminListCommon from "@views/admin/AdminListCommon"; import { Link } from "@components/index"; @@ -40,16 +39,11 @@ const renderData = (feed: Post[]) => { const AdminFeedPage: NextPage = () => { const { data } = useFetchFeed({ options: { auth: true } }); return ( - <> - - - - -

Feed

- - {renderData(data)} -
- + +

Feed

+ + {renderData(data)} +
); }; diff --git a/src/pages/admin/index.tsx b/src/pages/admin/index.tsx index 6fc3cf3..b60d44d 100644 --- a/src/pages/admin/index.tsx +++ b/src/pages/admin/index.tsx @@ -6,7 +6,7 @@ import AdminPageWrapper from "@views/common/AdminPageWrapper"; const AdminFrontPage: NextPage = () => ( <> - +
diff --git a/src/pages/admin/jobads/[id].tsx b/src/pages/admin/jobads/[id].tsx index d03eee2..3ecdaa0 100644 --- a/src/pages/admin/jobads/[id].tsx +++ b/src/pages/admin/jobads/[id].tsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from "react"; import { NextPage } from "next"; -import Head from "next/head"; import { useRouter } from "next/router"; import AdminCreateCommon from "@views/admin/AdminCreateCommon"; import JobAd from "@models/JobAd"; @@ -153,23 +152,18 @@ const JobAdCreatePage: NextPage = () => { : "Create Ad"; return ( - <> - - - - - + ); }; diff --git a/src/pages/admin/jobads/index.tsx b/src/pages/admin/jobads/index.tsx index 29c2c59..9500a38 100644 --- a/src/pages/admin/jobads/index.tsx +++ b/src/pages/admin/jobads/index.tsx @@ -1,6 +1,5 @@ import React from "react"; import { NextPage } from "next"; -import Head from "next/head"; import { formatRelative } from "date-fns"; import AdminListCommon from "@views/admin/AdminListCommon"; import { Link } from "@components/index"; @@ -44,16 +43,11 @@ const renderData = (jobAds: JobAd[]) => { const AdminJobAdPage: NextPage = () => { const { data } = useFetchJobAds({ options: { auth: true } }); return ( - <> - - - - -

Job advertisements

- - {renderData(data)} -
- + +

Job advertisements

+ + {renderData(data)} +
); }; diff --git a/src/pages/admin/login.tsx b/src/pages/admin/login.tsx index 48e3be0..a7f052b 100644 --- a/src/pages/admin/login.tsx +++ b/src/pages/admin/login.tsx @@ -1,6 +1,5 @@ import React, { useState, useEffect } from "react"; import { NextPage } from "next"; -import Head from "next/head"; import { useRouter } from "next/router"; import styled from "styled-components"; import { generateToken, setTokenCookie, isAuthenticated } from "@utils/auth"; @@ -40,49 +39,44 @@ const AdminLoginPage: NextPage = () => { }; return ( - <> - - - - -
-

Log in to SIK Admin

- {next && next !== DEFAULT_REDIRECT && ( -
You have to log in first.
- )} -
- - - -
- {error && ( -
- {error} -
- )} -
-
- + +
+

Log in to SIK Admin

+ {next && next !== DEFAULT_REDIRECT && ( +
You have to log in first.
+ )} +
+ + + +
+ {error && ( +
+ {error} +
+ )} +
+
); }; diff --git a/src/pages/admin/signups/[id].tsx b/src/pages/admin/signups/[id].tsx index dd51232..73bac5b 100644 --- a/src/pages/admin/signups/[id].tsx +++ b/src/pages/admin/signups/[id].tsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from "react"; import { NextPage } from "next"; -import Head from "next/head"; import { useRouter } from "next/router"; import AdminCreateCommon from "@views/admin/AdminCreateCommon"; import { SignupForm } from "@models/Signup"; @@ -161,9 +160,6 @@ const SignupCreatePage: NextPage = () => { return ( <> - - - { }, []); return ( - <> - - - - -

Sign-up forms

- - {renderData(forms)} -
- + +

Sign-up forms

+ + {renderData(forms)} +
); }; diff --git a/src/pages/events/[id].tsx b/src/pages/events/[id].tsx index 1391696..fe1cd13 100644 --- a/src/pages/events/[id].tsx +++ b/src/pages/events/[id].tsx @@ -25,7 +25,7 @@ const EventPage: NextPage = ({ initialEvent }) => { return ( <> - + diff --git a/src/pages/feed/[id].tsx b/src/pages/feed/[id].tsx index 66e544d..c87acf7 100644 --- a/src/pages/feed/[id].tsx +++ b/src/pages/feed/[id].tsx @@ -25,7 +25,7 @@ const FeedPage: NextPage = ({ initialPost }) => { return ( <> - + diff --git a/src/pages/in_english.tsx b/src/pages/in_english.tsx index f5fe3fa..1668381 100644 --- a/src/pages/in_english.tsx +++ b/src/pages/in_english.tsx @@ -27,7 +27,7 @@ const InEnglishPage: NextPage = ({ initialEvents, initialFeed }) = return ( <> - + diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 698ed52..82646bf 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -27,7 +27,7 @@ const FrontPage: NextPage = ({ initialEvents, initialFeed }) => { return ( <> - + diff --git a/src/pages/kilta/fuksi.tsx b/src/pages/kilta/fuksi.tsx index dfe80af..1acf7af 100644 --- a/src/pages/kilta/fuksi.tsx +++ b/src/pages/kilta/fuksi.tsx @@ -7,7 +7,7 @@ import PageWrapper from "@views/common/PageWrapper"; const FreshmenPage: NextPage = () => ( <> - + diff --git a/src/pages/kilta/index.tsx b/src/pages/kilta/index.tsx index 01b7413..98d1d8a 100644 --- a/src/pages/kilta/index.tsx +++ b/src/pages/kilta/index.tsx @@ -7,7 +7,7 @@ import PageWrapper from "@views/common/PageWrapper"; const GuildPage: NextPage = () => ( <> - + diff --git a/src/pages/kilta/kunnia.tsx b/src/pages/kilta/kunnia.tsx index 1f9b285..0e08248 100644 --- a/src/pages/kilta/kunnia.tsx +++ b/src/pages/kilta/kunnia.tsx @@ -7,7 +7,7 @@ import PageWrapper from "@views/common/PageWrapper"; const HonoraryPage: NextPage = () => ( <> - + diff --git a/src/pages/kilta/toiminta.tsx b/src/pages/kilta/toiminta.tsx index f82aa40..73eafcf 100644 --- a/src/pages/kilta/toiminta.tsx +++ b/src/pages/kilta/toiminta.tsx @@ -26,7 +26,7 @@ const ActualPage: NextPage = ({ initialEvents, initialFeed }) => { return ( <> - + diff --git a/src/pages/opinnot_ja_ura.tsx b/src/pages/opinnot_ja_ura.tsx index c9a2604..265c58f 100644 --- a/src/pages/opinnot_ja_ura.tsx +++ b/src/pages/opinnot_ja_ura.tsx @@ -7,7 +7,7 @@ import PageWrapper from "@views/common/PageWrapper"; const StudiesPage: NextPage = () => ( <> - + diff --git a/src/pages/signup/[id].tsx b/src/pages/signup/[id].tsx index 980d7f5..44796eb 100644 --- a/src/pages/signup/[id].tsx +++ b/src/pages/signup/[id].tsx @@ -40,7 +40,7 @@ const SignUpPage: NextPage = ({ form }) => { return ( <> - + ( <> - + diff --git a/src/pages/yritysyhteistyo.tsx b/src/pages/yritysyhteistyo.tsx index da5c1bf..b45c295 100644 --- a/src/pages/yritysyhteistyo.tsx +++ b/src/pages/yritysyhteistyo.tsx @@ -17,7 +17,7 @@ const CorporatePage: NextPage = ({ initialJobAds }) => { return ( <> - +