From b4c24553f16c498281cf3fb3412de61734f4eb0d Mon Sep 17 00:00:00 2001 From: NotMatta Date: Wed, 18 Dec 2024 17:30:10 +0100 Subject: [PATCH] =?UTF-8?q?weirder=20fixes=20=F0=9F=98=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/error-page.tsx | 2 +- src/components/media-query.tsx | 2 +- src/components/navbar-component.tsx | 8 ++++---- src/components/page-components/recommendations.tsx | 2 +- src/routes.tsx | 12 ++++++------ src/routes/home.tsx | 2 +- src/routes/search-page.tsx | 8 ++++---- vite.config.ts | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/components/error-page.tsx b/src/components/error-page.tsx index 17c0503..86378c7 100644 --- a/src/components/error-page.tsx +++ b/src/components/error-page.tsx @@ -3,7 +3,7 @@ const ErrorPage = () => { return (

Oops! Something went wrong.

- Go back to home + Go back to home
); } diff --git a/src/components/media-query.tsx b/src/components/media-query.tsx index bb412f7..6edc6b8 100644 --- a/src/components/media-query.tsx +++ b/src/components/media-query.tsx @@ -15,7 +15,7 @@ const DisplayMedia = ({media}:{media:media[]}) => { return(
{media.map((page) => ( -
navigate(`/${page.type.toLowerCase()}/${page.id}`)} key={page.id} className="w-[140px] md:w-[250px] flex-shrink-0 p-2 rounded hover:w-[260px] duration-300"> +
navigate(`/aniwiki/${page.type.toLowerCase()}/${page.id}`)} key={page.id} className="w-[140px] md:w-[250px] flex-shrink-0 p-2 rounded hover:w-[260px] duration-300"> {page.title.romaji}

{page.title.romaji}

diff --git a/src/components/navbar-component.tsx b/src/components/navbar-component.tsx index c7c7bd8..0821e4e 100644 --- a/src/components/navbar-component.tsx +++ b/src/components/navbar-component.tsx @@ -5,12 +5,12 @@ const NavBar = () => { return(
- AniWiki + AniWiki
-

Search

-

Anime

-

Manga

+

Search

+

Anime

+

Manga

) diff --git a/src/components/page-components/recommendations.tsx b/src/components/page-components/recommendations.tsx index ef5566a..38c3838 100644 --- a/src/components/page-components/recommendations.tsx +++ b/src/components/page-components/recommendations.tsx @@ -5,7 +5,7 @@ const Recommendations = ({media}:{media:{id:number,name:string,image:string,type return(
{media.map((page) => ( -
navigate(`/${page.type.toLowerCase()}/${page.id}`)}> +
navigate(`/aniwiki/${page.type.toLowerCase()}/${page.id}`)}> {page.name}

{page.name}

diff --git a/src/routes.tsx b/src/routes.tsx index 196f828..f736a4a 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -5,12 +5,12 @@ import MediaPage from "./routes/media-page"; import SearchPage from "./routes/search-page"; const routes = [ - {path: "/", element: }, - {path: "/anime/:id", element: }, - {path: "/manga/:id", element: }, - {path: "/browse/anime", element: }, - {path: "/browse/manga", element: }, - {path: "/search/", element: }, + {path: "/aniwiki/", element: }, + {path: "/aniwiki/anime/:id", element: }, + {path: "/aniwiki/manga/:id", element: }, + {path: "/aniwiki/browse/anime", element: }, + {path: "/aniwiki/browse/manga", element: }, + {path: "/aniwiki/search/", element: }, ] export const RoutesProvider = () => { diff --git a/src/routes/home.tsx b/src/routes/home.tsx index 7ed33f0..6055d88 100644 --- a/src/routes/home.tsx +++ b/src/routes/home.tsx @@ -6,7 +6,7 @@ const Home = () => {

A Wiki for all your Anime and Manga

- Start Browsing + Start Browsing Source diff --git a/src/routes/search-page.tsx b/src/routes/search-page.tsx index 8b0f7c4..a219e61 100644 --- a/src/routes/search-page.tsx +++ b/src/routes/search-page.tsx @@ -19,13 +19,13 @@ const Results = ({q,page,type}:{q:string,page:number,type:string}) => { return(
- +

{page}

- +
{data.Page.media.map((media:{title:{romaji:string},id:string,coverImage:{large:string}}) => ( -
navigate(`/${type}/${media.id}`)}> +
navigate(`/aniwiki/${type}/${media.id}`)}> {media.title.romaji}/

{media.title.romaji}

@@ -50,7 +50,7 @@ const SearchPage = () => { params.set('q',search) params.set('type',type) params.set('page','1') - navigate('/search?'+params.toString()) + navigate('/aniwiki/search?'+params.toString()) } } return ( diff --git a/vite.config.ts b/vite.config.ts index 9600831..6cdf7a3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,5 +4,5 @@ import react from '@vitejs/plugin-react' // https://vite.dev/config/ export default defineConfig({ plugins: [react()], - base: '/' + base: '/aniwiki/' })