feat: update fixing error
This commit is contained in:
parent
8970e02f31
commit
8a8774fe73
|
|
@ -170,7 +170,7 @@ const AddExpertTable = () => {
|
||||||
|
|
||||||
async function getCategories() {
|
async function getCategories() {
|
||||||
const category = await listEnableCategory("");
|
const category = await listEnableCategory("");
|
||||||
const resCategory = category.data.data.content;
|
const resCategory = category?.data?.data?.content;
|
||||||
setCategories(resCategory);
|
setCategories(resCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ const BroadcastTable = () => {
|
||||||
|
|
||||||
async function getCategories() {
|
async function getCategories() {
|
||||||
const category = await listEnableCategory("");
|
const category = await listEnableCategory("");
|
||||||
const resCategory = category.data.data.content;
|
const resCategory = category?.data?.data?.content;
|
||||||
setCategories(resCategory);
|
setCategories(resCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ export default function FormBlog() {
|
||||||
// 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);
|
||||||
|
|
|
||||||
|
|
@ -328,7 +328,7 @@ export default function FormAudio() {
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,7 @@ export default function FormImageAI() {
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,7 @@ export default function FormImageDetail() {
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ export default function FormImageUpdate() {
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ export default function FormConvertSPIT() {
|
||||||
const getCategories = async () => {
|
const getCategories = async () => {
|
||||||
try {
|
try {
|
||||||
const category = await listCategory(fileTypeId);
|
const category = await listCategory(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);
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ export default function FormTeksDetail() {
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -328,7 +328,7 @@ export default function FormTeks() {
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ export default function FormTeksUpdate() {
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ export default function FormVideoDetail() {
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -328,7 +328,7 @@ export default function FormVideo() {
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ export default function FormVideoUpdate() {
|
||||||
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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue