feat!(front): migrate to Hey API
This commit is contained in:
parent
128a33824a
commit
6e802d2402
47 changed files with 2865 additions and 1209 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { useEffect, useState } from "react";
|
||||
import { useParams, Link } from "react-router-dom";
|
||||
import { DefaultService } from "../../api/services/DefaultService";
|
||||
import type { Title } from "../../api";
|
||||
// import { DefaultService } from "../../api/services/DefaultService";
|
||||
import { getTitle, type Title } from "../../api";
|
||||
import { TitleStatusControls } from "../../components/TitleStatusControls/TitleStatusControls";
|
||||
|
||||
export default function TitlePage() {
|
||||
|
|
@ -19,8 +19,9 @@ export default function TitlePage() {
|
|||
const fetchTitle = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await DefaultService.getTitle(titleId, "all");
|
||||
setTitle(data);
|
||||
// const data = await DefaultService.getTitle(titleId, "all");
|
||||
const data = await getTitle({path: {title_id: titleId}})
|
||||
setTitle(data?.data ?? null);
|
||||
setError(null);
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue