From 761858b0c43f80967a541a55068b622949a355ea Mon Sep 17 00:00:00 2001 From: lamacchinadesiderante Date: Fri, 26 Apr 2024 19:52:27 +0200 Subject: [PATCH] add gitea repo link in header --- .../Layout/Header/Menu/Repo/Repo.module.scss | 0 .../Layout/Header/Menu/Repo/index.tsx | 20 +++++++++++++++++++ src/components/Layout/Header/Menu/index.tsx | 4 ++-- src/constants/repo.ts | 1 + src/middleware.ts | 2 +- 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 src/components/Layout/Header/Menu/Repo/Repo.module.scss create mode 100644 src/components/Layout/Header/Menu/Repo/index.tsx create mode 100644 src/constants/repo.ts diff --git a/src/components/Layout/Header/Menu/Repo/Repo.module.scss b/src/components/Layout/Header/Menu/Repo/Repo.module.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Layout/Header/Menu/Repo/index.tsx b/src/components/Layout/Header/Menu/Repo/index.tsx new file mode 100644 index 0000000..64ee07a --- /dev/null +++ b/src/components/Layout/Header/Menu/Repo/index.tsx @@ -0,0 +1,20 @@ +'use client' + +import React from 'react'; + +import { SiGitea } from "react-icons/si"; + +import Icon from '../Icon'; + +import { REPO_GITEA_URL } from '@/constants/repo'; + +const Menu: React.FC = () => { + + return ( + {window.location.href = REPO_GITEA_URL;}}> + {} + + ); +}; + +export default Menu; \ No newline at end of file diff --git a/src/components/Layout/Header/Menu/index.tsx b/src/components/Layout/Header/Menu/index.tsx index a90d413..5517db2 100644 --- a/src/components/Layout/Header/Menu/index.tsx +++ b/src/components/Layout/Header/Menu/index.tsx @@ -3,13 +3,13 @@ import React from 'react'; import style from './Menu.module.scss' import Theme from './Theme'; -import Language from './Language'; +import Repo from './Repo'; const Menu: React.FC = () => { return (
- +
); diff --git a/src/constants/repo.ts b/src/constants/repo.ts new file mode 100644 index 0000000..60e3321 --- /dev/null +++ b/src/constants/repo.ts @@ -0,0 +1 @@ +export const REPO_GITEA_URL = 'https://git.lamacchinadesiderante.org/lamacchinadesiderante/proxyraye-nextjs' \ No newline at end of file diff --git a/src/middleware.ts b/src/middleware.ts index 7fb17b3..f3d3d9d 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -5,7 +5,7 @@ export default createMiddleware({ locales: ['en', 'it'], // Used when no locale matches - defaultLocale: 'it' + defaultLocale: 'en' }); export const config = {