From 922424f669958f946022c88631760d46cf1d90eb Mon Sep 17 00:00:00 2001 From: jakubmanczak Date: Sun, 11 Dec 2022 13:11:01 +0100 Subject: [PATCH] convert to named exports --- components/Footer/Footer.tsx | 2 +- components/Navigation/Navigation.tsx | 11 +++-------- components/SEO.tsx | 4 ++-- pages/404.tsx | 2 +- pages/_app.tsx | 6 +++--- pages/cytaty.tsx | 2 +- pages/index.tsx | 2 +- pages/o-gractwie.tsx | 2 +- pages/rankingi.tsx | 2 +- 9 files changed, 14 insertions(+), 19 deletions(-) diff --git a/components/Footer/Footer.tsx b/components/Footer/Footer.tsx index 4a1f729..17a741e 100644 --- a/components/Footer/Footer.tsx +++ b/components/Footer/Footer.tsx @@ -6,4 +6,4 @@ const Footer = () => { ); }; -export default Footer; +export { Footer }; diff --git a/components/Navigation/Navigation.tsx b/components/Navigation/Navigation.tsx index 7310c4b..ab21e6e 100644 --- a/components/Navigation/Navigation.tsx +++ b/components/Navigation/Navigation.tsx @@ -1,20 +1,15 @@ import styles from "./Navigation.module.scss"; -import GractwoLogo from "../logo"; +import { GractwoLogo } from "../Logo"; import Link from "next/link"; import config from "../../data/config.json"; -const PageNavigation = () => { +const Navigation = () => { let username: string = ""; return ( <>
- {/* */} {config.navigation.map((navlink) => { return ( { ); }; -export default PageNavigation; +export { Navigation }; diff --git a/components/SEO.tsx b/components/SEO.tsx index 1a915f5..1306095 100644 --- a/components/SEO.tsx +++ b/components/SEO.tsx @@ -6,7 +6,7 @@ type seoprops = { description?: string; }; -const ComponentSEO = ({ title, noatsign, description }: seoprops) => { +const SEO = ({ title, noatsign, description }: seoprops) => { const defaultDescription = "Witryna internetowa Gractwa."; return ( @@ -19,4 +19,4 @@ const ComponentSEO = ({ title, noatsign, description }: seoprops) => { ); }; -export default ComponentSEO; +export { SEO }; diff --git a/pages/404.tsx b/pages/404.tsx index c2e18fe..d5915b5 100644 --- a/pages/404.tsx +++ b/pages/404.tsx @@ -1,4 +1,4 @@ -import SEO from "../components/SEO"; +import { SEO } from "../components/SEO"; const PageError404 = () => { return ( diff --git a/pages/_app.tsx b/pages/_app.tsx index e8cc3de..e9c91f8 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,8 +1,8 @@ import "../styles/globals.scss"; import type { AppProps } from "next/app"; -import Navigation from "../components/Navigation/Navigation"; -import Footer from "../components/Footer/Footer"; -import SEO from "../components/SEO"; +import { Navigation } from "../components/Navigation/Navigation"; +import { Footer } from "../components/Footer/Footer"; +import { SEO } from "../components/SEO"; export default function App({ Component, pageProps }: AppProps) { return ( diff --git a/pages/cytaty.tsx b/pages/cytaty.tsx index dffc2df..e18c359 100644 --- a/pages/cytaty.tsx +++ b/pages/cytaty.tsx @@ -1,4 +1,4 @@ -import SEO from "../components/SEO"; +import { SEO } from "../components/SEO"; const PageCytaty = () => { return ( diff --git a/pages/index.tsx b/pages/index.tsx index 8312340..56abaa4 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,7 +1,7 @@ import styles from "../styles/Index.module.scss"; import { useEffect, useState } from "react"; -import SEO from "../components/SEO"; +import { SEO } from "../components/SEO"; import config from "../data/config.json"; const PageIndex = () => { diff --git a/pages/o-gractwie.tsx b/pages/o-gractwie.tsx index 998b942..0246e15 100644 --- a/pages/o-gractwie.tsx +++ b/pages/o-gractwie.tsx @@ -1,4 +1,4 @@ -import SEO from "../components/SEO"; +import { SEO } from "../components/SEO"; const PageInfo = () => { return ( diff --git a/pages/rankingi.tsx b/pages/rankingi.tsx index c06590d..1b66419 100644 --- a/pages/rankingi.tsx +++ b/pages/rankingi.tsx @@ -1,4 +1,4 @@ -import SEO from "../components/SEO"; +import { SEO } from "../components/SEO"; const PageRankingi = () => { return (