Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
🖥️ fixes some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tdanks2000 committed Dec 26, 2022
1 parent 3f422a5 commit 6b944aa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
8 changes: 5 additions & 3 deletions src/components/Info/Episodes/Episode/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ const Episode = (props) => {
Episode {props.number}
</EpisodeNumber>
</CardContent>
<WatchedContainer>
<WatchedAmount amount={watchedAmount} />
</WatchedContainer>
{watchedAmount < 1 ? null : (
<WatchedContainer>
<WatchedAmount amount={watchedAmount} />
</WatchedContainer>
)}
</CardImage>
</Container>
);
Expand Down
1 change: 1 addition & 0 deletions src/containers/Manga/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from "../../components";

const MangaContainer = (props) => {
console.log(props.data);
const [current, setCurrent] = useState(1);
return (
<View>
Expand Down
24 changes: 15 additions & 9 deletions src/utils/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,24 @@ export const getInfo = async (id, dub) => {
};

export const getMangaInfo = async (id) => {
const { data } = await axios.get(`/meta/anilist-manga/info/${id}`);

if (!data)
return {
error: "No data",
};

return data;
try {
const { data } = await api.get(`/meta/anilist-manga/info/${id}`);

if (!data)
return {
error: "No data",
};

return data;
} catch (error) {
console.log(error);
}
};

export const getMangaPages = async (id) => {
const { data } = await axios.get(`/meta/anilist-manga/read?chapterId=${id}`);
const { data } = await api.get(`/meta/anilist-manga/read?chapterId=${id}`);

console.log({ data });

if (!data)
return {
Expand Down

0 comments on commit 6b944aa

Please sign in to comment.