feat: update fixing error
This commit is contained in:
parent
1a7aa27262
commit
83e419b5f2
|
|
@ -145,7 +145,7 @@ export default function FormAudioUpdate() {
|
||||||
const getCategories = async () => {
|
const getCategories = async () => {
|
||||||
try {
|
try {
|
||||||
const category = await listEnableCategory(fileTypeId);
|
const category = await listEnableCategory(fileTypeId);
|
||||||
const resCategory: Category[] = category.data.data.content;
|
const resCategory: Category[] = category?.data.data.content;
|
||||||
|
|
||||||
setCategories(resCategory);
|
setCategories(resCategory);
|
||||||
console.log("data category", resCategory);
|
console.log("data category", resCategory);
|
||||||
|
|
@ -171,7 +171,7 @@ export default function FormAudioUpdate() {
|
||||||
async function initState() {
|
async function initState() {
|
||||||
if (id) {
|
if (id) {
|
||||||
const response = await detailMedia(id);
|
const response = await detailMedia(id);
|
||||||
const details = response.data?.data;
|
const details = response?.data?.data;
|
||||||
|
|
||||||
setDetail(details);
|
setDetail(details);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue