mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-06-21 11:05:36 +02:00
Code-Typos, Formatting, redundant statements
This commit is contained in:
@ -33,9 +33,9 @@
|
||||
<!-- ABOUT THE PROJECT -->
|
||||
## Screenshots
|
||||
|
||||
|||
|
||||
|---|---|---|
|
||||
|||
|
||||
|  |  |  |
|
||||
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
|
||||
|  |  |  |
|
||||
|
||||
## About The Project
|
||||
|
||||
|
@ -116,7 +116,7 @@ export default function MangaPopup({manga, open, setOpen, children} : {manga: IM
|
||||
}, [manga, apiUri]);
|
||||
|
||||
const [updatingThreshold, setUpdatingThreshold] = useState<boolean>(false);
|
||||
const updateIgnoreThreshhold = useCallback((value: number) => {
|
||||
const updateIgnoreThreshold = useCallback((value: number) => {
|
||||
if(manga == null)
|
||||
return;
|
||||
setUpdatingThreshold(true);
|
||||
@ -176,7 +176,7 @@ export default function MangaPopup({manga, open, setOpen, children} : {manga: IM
|
||||
}
|
||||
sx={{width:"min-content"}}
|
||||
size={"md"}
|
||||
onChange={(e) => updateIgnoreThreshhold(e.currentTarget.valueAsNumber)}
|
||||
onChange={(e) => updateIgnoreThreshold(e.currentTarget.valueAsNumber)}
|
||||
/>
|
||||
{children}
|
||||
</Stack>
|
||||
|
@ -14,22 +14,22 @@ export const GetJobsWithIds = async (apiUri: string, jobIds: string[]) : Promise
|
||||
}
|
||||
|
||||
export const GetJobsInState = async (apiUri: string, state: JobState) : Promise<IJob[]> => {
|
||||
if(state == null || state == undefined)
|
||||
if(state == null)
|
||||
return Promise.reject("state was not provided");
|
||||
return await getData(`${apiUri}/v2/Job/State/${state}`) as Promise<IJob[]>;
|
||||
}
|
||||
|
||||
export const GetJobsWithType = async (apiUri: string, jobType: JobType) : Promise<IJob[]> => {
|
||||
if(jobType == null || jobType == undefined) {
|
||||
if(jobType == null) {
|
||||
return Promise.reject("jobType was not provided");
|
||||
}
|
||||
return await getData(`${apiUri}/v2/Job/Type/${jobType}`) as Promise<IJob[]>;
|
||||
}
|
||||
|
||||
export const GetJobsOfTypeAndWithState = async (apiUri: string, jobType: JobType, state: JobState) : Promise<IJob[]> => {
|
||||
if(jobType == null || jobType == undefined)
|
||||
if(jobType == null)
|
||||
return Promise.reject("jobType was not provided");
|
||||
if(state == null || state == undefined)
|
||||
if(state == null)
|
||||
return Promise.reject("state was not provided");
|
||||
return await getData(`${apiUri}/v2/Job/TypeAndState/${jobType}/${state}`) as Promise<IJob[]>;
|
||||
}
|
||||
|
@ -29,13 +29,13 @@ export const DeleteManga = async (apiUri: string, mangaId: string) : Promise<voi
|
||||
}
|
||||
|
||||
export const GetMangaCoverImageUrl = (apiUri: string, mangaId: string, ref: HTMLImageElement | undefined | null) : string => {
|
||||
if(ref == null || ref == undefined || mangaId === DefaultManga.mangaId)
|
||||
if(ref == null || mangaId === DefaultManga.mangaId)
|
||||
return "/blahaj.png";
|
||||
return `${apiUri}/v2/Manga/${mangaId}/Cover?width=${ref.clientWidth}&height=${ref.clientHeight}`;
|
||||
}
|
||||
|
||||
export const GetChapters = async (apiUri: string, mangaId: string) : Promise<IChapter[]> => {
|
||||
if(mangaId === undefined || mangaId === null || mangaId.length < 1)
|
||||
if(mangaId === null || mangaId.length < 1)
|
||||
return Promise.reject("mangaId was not provided");
|
||||
if(mangaId === DefaultManga.mangaId)
|
||||
return Promise.reject("Default Manga was requested");
|
||||
|
Reference in New Issue
Block a user