diff --git a/README.md b/README.md index 58e8226c..ee4376c0 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,4 @@ -## ⚠️ Heads Up: -### `JS` to `TS` Transition Branch Alert -🔷 Hey, just so you know, this branch is in the middle of a big switcheroo from 📜 **JavaScript** to **TypeScript**. It's a work in progress, so expect some hiccups and weird stuff. - -🚧 Thanks for rolling with us while we jazz up this template. Appreciate your patience!

@@ -12,7 +7,8 @@

- MIRURO.com + MIRURO.COM || + MIRURO.TV

Discord Shield

@@ -26,9 +22,13 @@

+### ⚠️ Heads Up: +#### `JS` to `TS` codebase transition alert; It's a work in progress, so expect some hiccups and weird stuff :) + + ## What is Miruro? -

Miruro is an anime streaming website made possible by the Consumet API, built with React⚛️ and Vite⚡, featuring a sleek and modern design. It offers Anilist integration to help you keep track of your favorite anime series. Your Website Name is entirely free and does not display any ads, making it a great option for those who want an uninterrupted viewing experience.

+

Miruro is a cutting-edge anime streaming platform powered by the Consumet API. Crafted using React and Vite, it boasts a stylish and contemporary interface. Our platform, Miruro.com, is completely ad-free, ensuring an immersive viewing journey without interruptions.

## Features 🪴 @@ -71,7 +71,7 @@ ### Before starting installation ⚠️ -> Before we proceed with the installation, we strongly recommend using `Bun` for a seamless and efficient setup. While `Node.js` is an alternative, Bun provides a comprehensive solution tailored for our project. +> Before we proceed with the installation, we strongly recommend using `bun` for a seamless and efficient setup. While `Node.js` is an alternative, Bun provides a comprehensive solution tailored for our project. ### 1. Clone this repository using @@ -176,7 +176,7 @@ If you have any questions or feedback, please reach out to us at [miruro@proton. ## Support & Contributions 🤲 -⭐️ [Star this project](https://github.com/Miruro-no-kuon/Miruro-no-Kuon) ⭐️ +⭐️ [Star this project](https://github.com/Miruro-no-kuon/Miruro) ⭐️ Feel free to contribute to this project! Whether you're an experienced developer or have been in the field for a while, your help is valuable. diff --git a/index.html b/index.html index e134dd6f..6e84c5a8 100644 --- a/index.html +++ b/index.html @@ -1,71 +1,83 @@ - - - - - - - + + + + + + + Miruro - + - - + +
- + - diff --git a/package.json b/package.json index 73ea3246..fc4e1a77 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "^5.0.1", + "react-infinite-scroll-component": "^6.1.0", "react-lazy-load-image-component": "^1.6.0", "react-player": "^2.14.1", "react-router-dom": "^6.22.0", diff --git a/src/App.tsx b/src/App.tsx index 0858566c..b9ead943 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import { useEffect } from "react"; +import { useEffect, useRef } from "react"; import { BrowserRouter as Router, Routes, @@ -16,9 +16,23 @@ import PolicyTerms from "./pages/PolicyTerms"; function ScrollToTop() { const { pathname } = useLocation(); + const prevPathnameRef = useRef(pathname); useEffect(() => { - window.scrollTo(0, 0); + const ignoreRoutePattern = /^\/watch\/[^/]+\/[^/]+\/[^/]+$/; + // Only scroll to if pathname has changed and does not match the ignore pattern + if ( + prevPathnameRef.current !== pathname && + !ignoreRoutePattern.test(pathname) + ) { + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + } + + // Update the previous pathname reference for the next render + prevPathnameRef.current = pathname; }, [pathname]); return null; @@ -48,10 +62,12 @@ function App() { } /> } /> } /> - } /> + } + /> } /> - } /> - } /> + } /> } />