diff --git a/public/images/logo-192x192.png b/public/images/logo-192x192.png new file mode 100644 index 0000000..a91fdd3 Binary files /dev/null and b/public/images/logo-192x192.png differ diff --git a/public/images/meta/zdam.png b/public/images/meta/zdam.png new file mode 100644 index 0000000..d66b6bb Binary files /dev/null and b/public/images/meta/zdam.png differ diff --git a/src/common/SEO/SEO.tsx b/src/common/SEO/SEO.tsx new file mode 100644 index 0000000..68728b2 --- /dev/null +++ b/src/common/SEO/SEO.tsx @@ -0,0 +1,48 @@ +import React from 'react'; +import { useRouter } from 'next/router'; +import { URL } from 'config/app'; + +import Head from 'next/head'; + +const NAME = 'zdamegzaminzawodowy.pl'; +const DEFAULT_DESCRIPTION = + 'zdamegzaminzawodowy.pl to ogromny baza pytań z różnych egzaminów zawodowych. Pytania pochodzą z arkuszy z lat ubiegłych.'; + +export interface SEOProps { + title?: string; + description?: string; +} + +const SEO = ({ title, description = DEFAULT_DESCRIPTION }: SEOProps) => { + const { asPath } = useRouter(); + const formattedTitle = title ? `${title} | ${NAME}` : NAME; + return ( + + {formattedTitle} + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default SEO; diff --git a/src/config/app.ts b/src/config/app.ts index 4f06dbd..49c4c30 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -7,3 +7,6 @@ export const QUESTIONS = [1, 40]; export const GOOGLE_PLAY_URL = 'https://play.google.com/store/apps/details?id=com.dawidwysokinski.zdamegzaminzawodowy'; + +export const URL = + process.env.NEXT_PUBLIC_URL ?? 'https://zdamegzaminzawodowy.pl'; diff --git a/src/features/IndexPage/IndexPage.tsx b/src/features/IndexPage/IndexPage.tsx index d80b90e..f76acc2 100644 --- a/src/features/IndexPage/IndexPage.tsx +++ b/src/features/IndexPage/IndexPage.tsx @@ -9,6 +9,7 @@ import { import { QUERY_PROFESSIONS } from './queries'; import { Divider } from '@material-ui/core'; +import SEO from 'common/SEO/SEO'; import Layout from 'common/Layout/Layout'; import Header from './components/Header/Header'; import Timer from './components/Timer/Timer'; @@ -30,6 +31,7 @@ const IndexPage = ({ }: IndexPageProps) => { return ( +
diff --git a/src/features/IndexPage/components/CheckMobileApp/CheckMobileApp.tsx b/src/features/IndexPage/components/CheckMobileApp/CheckMobileApp.tsx index c6a0a92..78b7e7c 100644 --- a/src/features/IndexPage/components/CheckMobileApp/CheckMobileApp.tsx +++ b/src/features/IndexPage/components/CheckMobileApp/CheckMobileApp.tsx @@ -13,7 +13,10 @@ const CheckMobileApp = () => { Nie zapomnij sprawdzić naszej aplikacji mobilnej! - +