mirror of
https://github.com/Radiquum/AniX.git
synced 2025-05-01 10:29:40 +05:00
frontend: fix linted errors
This commit is contained in:
parent
9e75a0783c
commit
58ed4007df
9 changed files with 46 additions and 14 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
import { usePathname } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
|
||||
export const NavigationRail = (props) => {
|
||||
const pathname = usePathname();
|
||||
|
@ -37,7 +38,7 @@ export const NavigationRail = (props) => {
|
|||
return (
|
||||
<nav className="left">
|
||||
<button className="circle transparent ">
|
||||
<img className="responsive" src="/favicon.ico"></img>
|
||||
<Image className="responsive" src="/favicon.ico" alt="Ваш профиль" />
|
||||
</button>
|
||||
|
||||
{items.map((item) => {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
|
||||
export const ReleaseCard = (props) => {
|
||||
return (
|
||||
|
@ -9,7 +10,11 @@ export const ReleaseCard = (props) => {
|
|||
className="no-padding round fill"
|
||||
style={{ width: 284, height: 508 }}
|
||||
>
|
||||
<img className="responsive large top-round" src={props.poster} />
|
||||
<Image
|
||||
className="responsive large top-round"
|
||||
src={props.poster}
|
||||
alt=""
|
||||
/>
|
||||
<div className="padding">
|
||||
<h6>{`${props.title.substring(0, 36)}${
|
||||
[...props.title].length > 36 ? "..." : ""
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
import { LogInNeeded } from "@/app/components/LogInNeeded/LogInNeeded";
|
||||
import { useUserStore } from "@/app/store/user-store";
|
||||
|
||||
export default History = () => {
|
||||
export default function History() {
|
||||
const userStore = useUserStore();
|
||||
|
||||
return <>{!userStore.isAuth ? <LogInNeeded /> : ""}</>;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export default () => {
|
||||
export default function LoginPage() {
|
||||
return <p>login page</p>;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ export default function Home() {
|
|||
} else {
|
||||
setList("last");
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
async function fetchData(list, page = 0) {
|
||||
|
@ -55,12 +56,14 @@ export default function Home() {
|
|||
setPage(0);
|
||||
fetchData(list); // Call fetchData here
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [list]);
|
||||
|
||||
useEffect(() => {
|
||||
if (list && releases) {
|
||||
fetchData(list, page); // Use fetchData for pagination
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [page]);
|
||||
|
||||
const chips = [
|
||||
|
|
|
@ -53,12 +53,14 @@ export default function Search() {
|
|||
setQuery(query);
|
||||
fetchData(query, 0);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (releases) {
|
||||
fetchData(query, page); // Use fetchData for pagination
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [page]);
|
||||
|
||||
const handleInput = (e) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue