diff --git a/package-lock.json b/package-lock.json index 4e527c8..81a0845 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "proxyraye-next", - "version": "0.1.0", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "proxyraye-next", - "version": "0.1.0", + "version": "0.2.0", "dependencies": { "@picocss/pico": "^2.0.6", "@reduxjs/toolkit": "^2.2.3", diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index 0fd507b..304cf5b 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -1,8 +1,11 @@ -'use client' - import "@/styles/globals.scss" -import ReduxProvider from "@/store/redux-provider"; +import type { Metadata } from 'next' + +export const metadata: Metadata = { + title: 'ProxyRaye', + description: 'Watch porn videos without tracking or annoying ads!', +} export default function RootLayout({ children, @@ -14,9 +17,7 @@ export default function RootLayout({ return ( <> - - {children} - + {children} ); } diff --git a/src/components/Layout/Content/index.tsx b/src/components/Layout/Content/index.tsx new file mode 100644 index 0000000..035514e --- /dev/null +++ b/src/components/Layout/Content/index.tsx @@ -0,0 +1,38 @@ +'use client' + +import React from 'react'; + +import Head from 'next/head'; + +import { AppProgressBar as ProgressBar } from 'next-nprogress-bar'; + +import { useAppSelector } from '@/store/store'; +import { LAYOUT_COLORS_PINK, LAYOUT_COLORS_YELLOW } from '@/constants/colors'; +import { Themes } from '@/meta/settings'; + +const Content: React.FC = (props) => { + + const { children } = props; + + const theme = useAppSelector((state) => state.settings.theme); + + return ( + + + + + + +
{children}
+ + + + ); +}; + +export default Content; \ No newline at end of file diff --git a/src/components/Layout/Header/Menu/Repo/index.tsx b/src/components/Layout/Header/Menu/Repo/index.tsx index 64ee07a..c049730 100644 --- a/src/components/Layout/Header/Menu/Repo/index.tsx +++ b/src/components/Layout/Header/Menu/Repo/index.tsx @@ -2,17 +2,17 @@ import React from 'react'; -import { SiGitea } from "react-icons/si"; +import { SiCodeberg } from "react-icons/si"; import Icon from '../Icon'; -import { REPO_GITEA_URL } from '@/constants/repo'; +import { REPO_CODEBERG_URL } from '@/constants/repo'; const Menu: React.FC = () => { return ( - {window.location.href = REPO_GITEA_URL;}}> - {} + {window.location.href = REPO_CODEBERG_URL;}}> + {} ); }; diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index 8ce895a..5084429 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -1,38 +1,18 @@ -'use client' - import React from 'react'; -import Head from 'next/head'; - -import { AppProgressBar as ProgressBar } from 'next-nprogress-bar'; - -import { useAppSelector } from '@/store/store'; -import { LAYOUT_COLORS_PINK, LAYOUT_COLORS_YELLOW } from '@/constants/colors'; -import { Themes } from '@/meta/settings'; +import WithRedux from '@/store/withRedux'; +import Content from './Content'; const Layout: React.FC = (props) => { const { children } = props; - const theme = useAppSelector((state) => state.settings.theme); - return ( - - - - - Proxy Raye: watch porn videos without tracking or annoying ads! - - -
{children}
- - - + + + {children} + + ); }; diff --git a/src/constants/repo.ts b/src/constants/repo.ts index 60e3321..1634600 100644 --- a/src/constants/repo.ts +++ b/src/constants/repo.ts @@ -1 +1,2 @@ -export const REPO_GITEA_URL = 'https://git.lamacchinadesiderante.org/lamacchinadesiderante/proxyraye-nextjs' \ No newline at end of file +export const REPO_GITEA_URL = 'https://git.lamacchinadesiderante.org/lamacchinadesiderante/proxyraye-nextjs' +export const REPO_CODEBERG_URL = 'https://codeberg.org/lamacchinadesiderante/proxyraye' \ No newline at end of file diff --git a/src/store/store.ts b/src/store/store.ts index 1d6befc..fd9804c 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -4,7 +4,24 @@ import { useDispatch, TypedUseSelectorHook, useSelector } from "react-redux"; import { settingsReducer } from "@/store/settingsSlice"; import { persistReducer } from "redux-persist"; -import storage from "redux-persist/lib/storage"; + +import createWebStorage from "redux-persist/lib/storage/createWebStorage"; + +const createNoopStorage = () => { + return { + getItem(_key: any) { + return Promise.resolve(null); + }, + setItem(_key: any, value: any) { + return Promise.resolve(value); + }, + removeItem(_key: any) { + return Promise.resolve(); + }, + }; +}; + +const storage = typeof window !== "undefined" ? createWebStorage("local") : createNoopStorage(); const settingsPersistConfig = { key: "settings", diff --git a/src/store/withRedux.tsx b/src/store/withRedux.tsx new file mode 100644 index 0000000..d65bc68 --- /dev/null +++ b/src/store/withRedux.tsx @@ -0,0 +1,18 @@ +'use client' + +import ReduxProvider from "@/store/redux-provider"; + +export default function WithRedux({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + + return ( + <> + + {children} + + + ); +}