fix build and lints

This commit is contained in:
Kentai Radiquum 2025-04-04 00:41:04 +05:00
parent 329448c9fc
commit 491f9b48b5
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
9 changed files with 19 additions and 31 deletions

View file

@ -188,6 +188,7 @@ export const ProfileEditModal = (props: {
if (avatarModalProps.croppedImage) {
_uploadAvatar();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [avatarModalProps.croppedImage]);
if (!prefData || !loginData || prefError || loginError) {

View file

@ -14,7 +14,7 @@ export const ReleaseInfoStreaming = (props: { release_id: number }) => {
setData(await response.json());
};
_getData();
}, []);
}, [props.release_id]);
return (
<>
@ -32,7 +32,8 @@ export const ReleaseInfoStreaming = (props: { release_id: number }) => {
key={`platform_${item.id}`}
className="flex items-center gap-2 px-4 py-2 transition-colors bg-gray-100 rounded-lg hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 "
>
<img src={item.icon} className="w-6 h-6 rounded-full" />
{/* eslint-disable-next-line @next/next/no-img-element */}
<img alt="" src={item.icon} className="w-6 h-6 rounded-full" />
<p className="text-sm line-clamp-2">{item.name}</p>
</a>
);

View file

@ -212,7 +212,8 @@ export const ReleasePlayerCustom = (props: {
}
};
__getInfo();
}, []);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.id, props.token]);
useEffect(() => {
const __getInfo = async () => {
@ -244,6 +245,7 @@ export const ReleasePlayerCustom = (props: {
if (voiceover.selected) {
__getInfo();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [voiceover.selected]);
useEffect(() => {
@ -284,6 +286,7 @@ export const ReleasePlayerCustom = (props: {
if (source.selected) {
__getInfo();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [source.selected]);
useEffect(() => {
@ -346,6 +349,7 @@ export const ReleasePlayerCustom = (props: {
setPlayerError(null);
__getInfo();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [episode.selected]);
return (

View file

@ -20,7 +20,7 @@ const DropdownTrigger = ({ name }: Source) => {
);
};
const DropdownItem = ({ name, episodes_count }: Source) => {
const DropdownItemInternal = ({ name, episodes_count }: Source) => {
return (
<div className="flex flex-col gap-2 cursor-pointer">
<div className="flex items-center gap-2">
@ -68,7 +68,7 @@ export const SourceSelector = (props: {
});
}}
>
<DropdownItem {...source} />
<DropdownItemInternal {...source} />
</DropdownItem>
))}
</Dropdown>

View file

@ -16,7 +16,8 @@ interface Voiceover {
const DropdownTrigger = ({ icon, name, pinned }: Voiceover) => {
return (
<div className="flex items-center gap-2 cursor-pointer">
{icon && <img className="w-6 h-6 rounded-full" src={icon}></img>}
{/* eslint-disable-next-line @next/next/no-img-element */}
{icon && <img alt="" className="w-6 h-6 rounded-full" src={icon}></img>}
<p>{name}</p>
{pinned && (
<span className="h-6 bg-gray-700 dark:bg-gray-300 iconify material-symbols--push-pin"></span>
@ -36,7 +37,8 @@ const DropdownItemInternal = ({
return (
<div className="flex flex-col gap-2 cursor-pointer">
<div className="flex items-center gap-2">
{icon && <img className="w-6 h-6 rounded-full" src={icon}></img>}
{/* eslint-disable-next-line @next/next/no-img-element */}
{icon && <img alt="" className="w-6 h-6 rounded-full" src={icon}></img>}
<p>{name}</p>
{pinned && (
<span className="h-6 iconify material-symbols--push-pin"></span>

View file

@ -34,6 +34,7 @@ export const CreateCollectionPage = () => {
if (userStore.state === "finished" && !userStore.token) {
router.push("/login?redirect=/collections/create");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [userStore]);
const [edit, setEdit] = useState(false);