diff --git a/src/app/edit-profile/page.tsx b/src/app/edit-profile/page.tsx index 6575393..9b2b2d8 100644 --- a/src/app/edit-profile/page.tsx +++ b/src/app/edit-profile/page.tsx @@ -68,10 +68,10 @@ const Page = () => { {loading ? ( ) : ( -
+

Profile

- -
+ +
setOpenAvatarModal(true)} className="h-24 cursor-pointer w-24 relative lg:h-32 lg:w-32 rounded-full bg-white text-black flex justify-center items-center "> {profilePicture ? profile :

{username?.charAt(0).toUpperCase()}

}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 54fe204..d595d59 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -10,9 +10,7 @@ import "./globals.css"; import Footer from "@/components/shared/Footer"; import ScrollToTop from "@/components/shared/ScrollToTop"; -import { ThemeChildren } from "@/components/ThemeChildren"; import { UserProvider } from "@/context/getUserDetails"; -import { ThemeProvider } from "@/context/themeChange"; import { ProfileProvider } from "@/hooks/useprofile"; const inter = Inter({ subsets: ["latin"] }); @@ -29,25 +27,23 @@ export default function RootLayout({ children }: { children: React.ReactNode }) return ( - -
- - - - - - - - -
- {children} -
-
-
-
-
-
-
+
+ + + + +
+ + + +
+ {children} +
+
+
+
+
+
); diff --git a/src/components/ThemeChildren.tsx b/src/components/ThemeChildren.tsx deleted file mode 100644 index 3811103..0000000 --- a/src/components/ThemeChildren.tsx +++ /dev/null @@ -1,10 +0,0 @@ -"use client"; -import React from "react"; - -import { useTheme } from "@/context/themeChange"; - -export const ThemeChildren = ({ children }: { children: React.ReactNode }) => { - const { theme } = useTheme(); - - return
{children}
; -}; diff --git a/src/components/appName.tsx b/src/components/appName.tsx deleted file mode 100644 index cd4b153..0000000 --- a/src/components/appName.tsx +++ /dev/null @@ -1,16 +0,0 @@ -"use client"; -import React from "react"; -import Link from "next/link"; - -import { useTheme } from "@/context/themeChange"; - -const AppName = () => { - const { theme } = useTheme(); - return ( - - Anime Trix - - ); -}; - -export default AppName; diff --git a/src/components/loading/AiringScheduleLoading.tsx b/src/components/loading/AiringScheduleLoading.tsx index d19c6ab..af35de5 100644 --- a/src/components/loading/AiringScheduleLoading.tsx +++ b/src/components/loading/AiringScheduleLoading.tsx @@ -3,15 +3,12 @@ import React from "react"; import SpinLoading from "./SpinLoading"; -import { useTheme } from "@/context/themeChange"; - const AiringScheduleLoading = () => { - const { theme } = useTheme(); return (

Airing

-
+
diff --git a/src/components/loading/SpinLoading.tsx b/src/components/loading/SpinLoading.tsx index fac44b8..76e9f0b 100644 --- a/src/components/loading/SpinLoading.tsx +++ b/src/components/loading/SpinLoading.tsx @@ -1,12 +1,10 @@ "use client"; import React from "react"; -import { useTheme } from "@/context/themeChange"; const SpinLoading = () => { - const { theme } = useTheme(); return (
-
+
setOpenAvatarModal(false)} size={40} /> {Object.keys(ProfiePicture.Profiles).map((anime) => (
diff --git a/src/components/shared/Footer.tsx b/src/components/shared/Footer.tsx index cc7d0e4..b5c5ed2 100644 --- a/src/components/shared/Footer.tsx +++ b/src/components/shared/Footer.tsx @@ -1,9 +1,8 @@ "use client"; import React from "react"; -import { Github, Instagram, Moon, Sun } from "lucide-react"; +import { Github, Instagram } from "lucide-react"; -import { useTheme } from "@/context/themeChange"; const socialMediaLinks = [ { icon: , @@ -16,29 +15,20 @@ const socialMediaLinks = [ ]; const Footer = () => { - const { theme, toggleTheme } = useTheme(); return ( -
+

AnimeTrix

AnimeTrix is not affiliated with or endorsed by any of the anime studios behind the creation of the anime presented on this site. This website is only a user interface presenting/linking various self-hosted files across the internet by other third-party providers for easy access. AnimeTrix never downloads the video from any source provider, link will be returned from the response hence it is completely not subjected to DMCA compliant.

-
-
+
+
{socialMediaLinks.map((link) => ( {link.icon} ))}
-
-
toggleTheme("dark")} className={`${theme === "dark" && "bg-white/30"} p-2 rounded-full`}> - -
-
toggleTheme("light")} className={`${theme === "light" && "bg-black/20 text-black"} p-2 rounded-full`}> - -
-
); diff --git a/src/components/shared/SearchModal.tsx b/src/components/shared/SearchModal.tsx index e6d7f1b..dd8415d 100644 --- a/src/components/shared/SearchModal.tsx +++ b/src/components/shared/SearchModal.tsx @@ -8,7 +8,6 @@ import SpinLoading from "../loading/SpinLoading"; import SearchCards from "./cards/SearchCards"; import { SearchResults } from "./SearchResults"; -import { useTheme } from "@/context/themeChange"; import useDebounce from "@/hooks/debounce"; import Anime from "@/types/animetypes"; @@ -16,7 +15,6 @@ const SearchModal = ({ trending }: { trending: Anime[] }) => { const modalRef = useRef(null); const [openSearch, setOpenSearch] = useState(false); const [searchValue, setSearchValue] = useState(""); - const { theme } = useTheme(); const closeSearchModal = () => { setOpenSearch(false); @@ -72,7 +70,7 @@ const SearchModal = ({ trending }: { trending: Anime[] }) => { return ( - setOpenSearch(!openSearch)} /> + setOpenSearch(!openSearch)} /> {openSearch && ( = ({ airingData }) = const daysOfWeek: DayOfWeek[] = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]; const [currentDay, setCurrentDay] = useState(daysOfWeek[new Date().getDay()]); const [animeForCurrentDay, setAnimeForCurrentDay] = useState(undefined); - const { theme } = useTheme(); useEffect(() => { setAnimeForCurrentDay(airingData[currentDay]); @@ -60,7 +57,7 @@ const AiringScheduleCard: React.FC = ({ airingData }) = return (
-
+
@@ -70,7 +67,7 @@ const AiringScheduleCard: React.FC = ({ airingData }) =
) : ( animeForCurrentDay.map((anime: Anime) => ( -
+
{`an @@ -78,7 +75,7 @@ const AiringScheduleCard: React.FC = ({ airingData }) = {anime?.title?.romaji || anime?.title?.english || anime.title?.native}
Ep: {anime.airingEpisode} - - {formatTime(anime.airingAt)} + {formatTime(anime.airingAt)}
@@ -92,7 +89,7 @@ const AiringScheduleCard: React.FC = ({ airingData }) =
-
+