mirror of
https://github.com/Radiquum/YAMPD.git
synced 2025-05-20 23:59:35 +05:00
decouple pack functions from flask
This commit is contained in:
parent
f4d15c5eaf
commit
69fb1584e5
4 changed files with 141 additions and 93 deletions
|
@ -52,8 +52,10 @@ export default function PackPage() {
|
|||
const res = await fetch(PACK_ENDPOINT("getPack", id));
|
||||
if (!res.ok) router.push("/404");
|
||||
const data: Pack = await res.json();
|
||||
setPackData(data);
|
||||
setPackDataLoading(false);
|
||||
if (data._id) {
|
||||
setPackData(data);
|
||||
setPackDataLoading(false);
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue