Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VCCI-News
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Văn Hoàng
VCCI-News
Commits
a7f86fcb
Commit
a7f86fcb
authored
Nov 04, 2025
by
Phạm Quang Bảo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a
parent
e83b5a22
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1032 additions
and
63 deletions
+1032
-63
orval.config.ts
orval.config.ts
+2
-1
news-page-config.ts
src/api/endpoints/news-page-config.ts
+930
-0
index.ts
src/api/models/index.ts
+1
-0
putNewsPageConfigCategoryIdBody.ts
src/api/models/putNewsPageConfigCategoryIdBody.ts
+11
-0
header.tsx
src/app/(main)/_lib/layout/header.tsx
+4
-1
page.tsx
src/app/(main)/hoat-dong/dao-tao/page.tsx
+4
-4
page.tsx
src/app/(main)/hoat-dong/page.tsx
+1
-1
page.tsx
src/app/(main)/hoat-dong/su-kien/page.tsx
+4
-4
page.tsx
src/app/(main)/hoi-vien/ket-noi-hoi-vien/page.tsx
+19
-19
page.tsx
src/app/(main)/hoi-vien/tin-hoi-vien/page.tsx
+1
-1
page.tsx
src/app/(main)/thong-tin-truyen-thong/an-pham/page.tsx
+3
-3
page.tsx
src/app/(main)/thong-tin-truyen-thong/chuyen-de/page.tsx
+3
-3
page.tsx
...n-truyen-thong/thong-tin-chinh-sach-va-phap-luat/page.tsx
+3
-3
page.tsx
.../(main)/thong-tin-truyen-thong/thu-vien-tai-lieu/page.tsx
+3
-3
page.tsx
...p/(main)/thong-tin-truyen-thong/tin-doanh-nghiep/page.tsx
+3
-3
page.tsx
src/app/(main)/thong-tin-truyen-thong/tin-kinh-te/page.tsx
+3
-3
AppEditorContent.tsx
src/components/shared/editor-content/AppEditorContent.tsx
+37
-14
No files found.
orval.config.ts
View file @
a7f86fcb
...
...
@@ -79,7 +79,8 @@ const orvalConfig = async () => {
'UserHistory'
,
'Approvals'
,
'News'
,
'Category'
'Category'
,
'NewsPageConfig'
,
]
}
}
...
...
src/api/endpoints/news-page-config.ts
0 → 100644
View file @
a7f86fcb
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VCCI
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import
{
useInfiniteQuery
,
useMutation
,
useQuery
}
from
'@tanstack/react-query'
;
import
type
{
DataTag
,
DefinedInitialDataOptions
,
DefinedUseInfiniteQueryResult
,
DefinedUseQueryResult
,
InfiniteData
,
MutationFunction
,
QueryClient
,
QueryFunction
,
QueryKey
,
UndefinedInitialDataOptions
,
UseInfiniteQueryOptions
,
UseInfiniteQueryResult
,
UseMutationOptions
,
UseMutationResult
,
UseQueryOptions
,
UseQueryResult
}
from
'@tanstack/react-query'
;
import
type
{
PutNewsPageConfigCategoryIdBody
,
Response
}
from
'../models'
;
import
{
useCustomClient
}
from
'../mutator/custom-client'
;
import
type
{
ErrorType
,
BodyType
}
from
'../mutator/custom-client'
;
type
SecondParameter
<
T
extends
(...
args
:
never
)
=>
unknown
>
=
Parameters
<
T
>
[
1
];
/**
* Get page config category by id
*/
export
type
getNewsPageConfigCategoryIdResponse200
=
{
data
:
Response
status
:
200
}
export
type
getNewsPageConfigCategoryIdResponseSuccess
=
(
getNewsPageConfigCategoryIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
getNewsPageConfigCategoryIdResponse
=
(
getNewsPageConfigCategoryIdResponseSuccess
)
export
const
getGetNewsPageConfigCategoryIdUrl
=
(
id
:
string
,)
=>
{
return
`/newsPageConfig/category/
${
id
}
`
}
export
const
getNewsPageConfigCategoryId
=
async
(
id
:
string
,
options
?:
RequestInit
):
Promise
<
getNewsPageConfigCategoryIdResponse
>
=>
{
return
useCustomClient
<
getNewsPageConfigCategoryIdResponse
>
(
getGetNewsPageConfigCategoryIdUrl
(
id
),
{
...
options
,
method
:
'GET'
}
);}
export
const
getGetNewsPageConfigCategoryIdInfiniteQueryKey
=
(
id
?:
string
,)
=>
{
return
[
'infinite'
,
`/newsPageConfig/category/
${
id
}
`
]
as
const
;
}
export
const
getGetNewsPageConfigCategoryIdQueryKey
=
(
id
?:
string
,)
=>
{
return
[
`/newsPageConfig/category/
${
id
}
`
]
as
const
;
}
export
const
getGetNewsPageConfigCategoryIdInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetNewsPageConfigCategoryIdInfiniteQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>>
=
({
signal
})
=>
getNewsPageConfigCategoryId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
GetNewsPageConfigCategoryIdInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>>
export
type
GetNewsPageConfigCategoryIdInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGetNewsPageConfigCategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategoryIdInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetNewsPageConfigCategoryIdInfiniteQueryOptions
(
id
,
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
query
.
queryKey
=
queryOptions
.
queryKey
;
return
query
;
}
export
const
prefetchGetNewsPageConfigCategoryIdInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetNewsPageConfigCategoryIdInfiniteQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
return
queryClient
;
}
export
const
getGetNewsPageConfigCategoryIdQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetNewsPageConfigCategoryIdQueryKey
(
id
);
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>>
=
({
signal
})
=>
getNewsPageConfigCategoryId
(
id
,
{
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
enabled
:
!!
(
id
),
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
GetNewsPageConfigCategoryIdQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>>
export
type
GetNewsPageConfigCategoryIdQueryError
=
ErrorType
<
unknown
>
export
function
useGetNewsPageConfigCategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategoryId
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
=
ErrorType
<
unknown
>>
(
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetNewsPageConfigCategoryIdQueryOptions
(
id
,
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
query
.
queryKey
=
queryOptions
.
queryKey
;
return
query
;
}
export
const
prefetchGetNewsPageConfigCategoryIdQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
id
:
string
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategoryId
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetNewsPageConfigCategoryIdQueryOptions
(
id
,
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
return
queryClient
;
}
/**
* Update page config category
*/
export
type
putNewsPageConfigCategoryIdResponse200
=
{
data
:
Response
status
:
200
}
export
type
putNewsPageConfigCategoryIdResponseSuccess
=
(
putNewsPageConfigCategoryIdResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
putNewsPageConfigCategoryIdResponse
=
(
putNewsPageConfigCategoryIdResponseSuccess
)
export
const
getPutNewsPageConfigCategoryIdUrl
=
(
id
:
string
,)
=>
{
return
`/newsPageConfig/category/
${
id
}
`
}
export
const
putNewsPageConfigCategoryId
=
async
(
id
:
string
,
putNewsPageConfigCategoryIdBody
:
PutNewsPageConfigCategoryIdBody
,
options
?:
RequestInit
):
Promise
<
putNewsPageConfigCategoryIdResponse
>
=>
{
return
useCustomClient
<
putNewsPageConfigCategoryIdResponse
>
(
getPutNewsPageConfigCategoryIdUrl
(
id
),
{
...
options
,
method
:
'PUT'
,
headers
:
{
'Content-Type'
:
'application/json'
,
...
options
?.
headers
},
body
:
JSON
.
stringify
(
putNewsPageConfigCategoryIdBody
,)
}
);}
export
const
getPutNewsPageConfigCategoryIdMutationOptions
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putNewsPageConfigCategoryId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
PutNewsPageConfigCategoryIdBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putNewsPageConfigCategoryId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
PutNewsPageConfigCategoryIdBody
>
},
TContext
>
=>
{
const
mutationKey
=
[
'putNewsPageConfigCategoryId'
];
const
{
mutation
:
mutationOptions
,
request
:
requestOptions
}
=
options
?
options
.
mutation
&&
'mutationKey'
in
options
.
mutation
&&
options
.
mutation
.
mutationKey
?
options
:
{...
options
,
mutation
:
{...
options
.
mutation
,
mutationKey
}}
:
{
mutation
:
{
mutationKey
,
},
request
:
undefined
};
const
mutationFn
:
MutationFunction
<
Awaited
<
ReturnType
<
typeof
putNewsPageConfigCategoryId
>>
,
{
id
:
string
;
data
:
BodyType
<
PutNewsPageConfigCategoryIdBody
>
}
>
=
(
props
)
=>
{
const
{
id
,
data
}
=
props
??
{};
return
putNewsPageConfigCategoryId
(
id
,
data
,
requestOptions
)
}
return
{
mutationFn
,
...
mutationOptions
}}
export
type
PutNewsPageConfigCategoryIdMutationResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
putNewsPageConfigCategoryId
>>>
export
type
PutNewsPageConfigCategoryIdMutationBody
=
BodyType
<
PutNewsPageConfigCategoryIdBody
>
export
type
PutNewsPageConfigCategoryIdMutationError
=
ErrorType
<
unknown
>
export
const
usePutNewsPageConfigCategoryId
=
<
TError
=
ErrorType
<
unknown
>
,
TContext
=
unknown
>
(
options
?:
{
mutation
?:
UseMutationOptions
<
Awaited
<
ReturnType
<
typeof
putNewsPageConfigCategoryId
>>
,
TError
,{
id
:
string
;
data
:
BodyType
<
PutNewsPageConfigCategoryIdBody
>
},
TContext
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseMutationResult
<
Awaited
<
ReturnType
<
typeof
putNewsPageConfigCategoryId
>>
,
TError
,
{
id
:
string
;
data
:
BodyType
<
PutNewsPageConfigCategoryIdBody
>
},
TContext
>
=>
{
const
mutationOptions
=
getPutNewsPageConfigCategoryIdMutationOptions
(
options
);
return
useMutation
(
mutationOptions
,
queryClient
);
}
/**
* Get page config category
*/
export
type
getNewsPageConfigCategoryResponse200
=
{
data
:
Response
status
:
200
}
export
type
getNewsPageConfigCategoryResponseSuccess
=
(
getNewsPageConfigCategoryResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
getNewsPageConfigCategoryResponse
=
(
getNewsPageConfigCategoryResponseSuccess
)
export
const
getGetNewsPageConfigCategoryUrl
=
()
=>
{
return
`/newsPageConfig/category`
}
export
const
getNewsPageConfigCategory
=
async
(
options
?:
RequestInit
):
Promise
<
getNewsPageConfigCategoryResponse
>
=>
{
return
useCustomClient
<
getNewsPageConfigCategoryResponse
>
(
getGetNewsPageConfigCategoryUrl
(),
{
...
options
,
method
:
'GET'
}
);}
export
const
getGetNewsPageConfigCategoryInfiniteQueryKey
=
()
=>
{
return
[
'infinite'
,
`/newsPageConfig/category`
]
as
const
;
}
export
const
getGetNewsPageConfigCategoryQueryKey
=
()
=>
{
return
[
`/newsPageConfig/category`
]
as
const
;
}
export
const
getGetNewsPageConfigCategoryInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetNewsPageConfigCategoryInfiniteQueryKey
();
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>>
=
({
signal
})
=>
getNewsPageConfigCategory
({
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
GetNewsPageConfigCategoryInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>>
export
type
GetNewsPageConfigCategoryInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGetNewsPageConfigCategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategoryInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetNewsPageConfigCategoryInfiniteQueryOptions
(
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
query
.
queryKey
=
queryOptions
.
queryKey
;
return
query
;
}
export
const
prefetchGetNewsPageConfigCategoryInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetNewsPageConfigCategoryInfiniteQueryOptions
(
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
return
queryClient
;
}
export
const
getGetNewsPageConfigCategoryQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetNewsPageConfigCategoryQueryKey
();
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>>
=
({
signal
})
=>
getNewsPageConfigCategory
({
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
GetNewsPageConfigCategoryQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>>
export
type
GetNewsPageConfigCategoryQueryError
=
ErrorType
<
unknown
>
export
function
useGetNewsPageConfigCategory
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategory
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategory
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigCategory
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetNewsPageConfigCategoryQueryOptions
(
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
query
.
queryKey
=
queryOptions
.
queryKey
;
return
query
;
}
export
const
prefetchGetNewsPageConfigCategoryQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigCategory
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetNewsPageConfigCategoryQueryOptions
(
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
return
queryClient
;
}
/**
* Get
*/
export
type
getNewsPageConfigGetAllLinksResponse200
=
{
data
:
Response
status
:
200
}
export
type
getNewsPageConfigGetAllLinksResponseSuccess
=
(
getNewsPageConfigGetAllLinksResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
getNewsPageConfigGetAllLinksResponse
=
(
getNewsPageConfigGetAllLinksResponseSuccess
)
export
const
getGetNewsPageConfigGetAllLinksUrl
=
()
=>
{
return
`/newsPageConfig/getAllLinks`
}
export
const
getNewsPageConfigGetAllLinks
=
async
(
options
?:
RequestInit
):
Promise
<
getNewsPageConfigGetAllLinksResponse
>
=>
{
return
useCustomClient
<
getNewsPageConfigGetAllLinksResponse
>
(
getGetNewsPageConfigGetAllLinksUrl
(),
{
...
options
,
method
:
'GET'
}
);}
export
const
getGetNewsPageConfigGetAllLinksInfiniteQueryKey
=
()
=>
{
return
[
'infinite'
,
`/newsPageConfig/getAllLinks`
]
as
const
;
}
export
const
getGetNewsPageConfigGetAllLinksQueryKey
=
()
=>
{
return
[
`/newsPageConfig/getAllLinks`
]
as
const
;
}
export
const
getGetNewsPageConfigGetAllLinksInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetNewsPageConfigGetAllLinksInfiniteQueryKey
();
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>>
=
({
signal
})
=>
getNewsPageConfigGetAllLinks
({
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
GetNewsPageConfigGetAllLinksInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>>
export
type
GetNewsPageConfigGetAllLinksInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGetNewsPageConfigGetAllLinksInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigGetAllLinksInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigGetAllLinksInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigGetAllLinksInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetNewsPageConfigGetAllLinksInfiniteQueryOptions
(
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
query
.
queryKey
=
queryOptions
.
queryKey
;
return
query
;
}
export
const
prefetchGetNewsPageConfigGetAllLinksInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetNewsPageConfigGetAllLinksInfiniteQueryOptions
(
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
return
queryClient
;
}
export
const
getGetNewsPageConfigGetAllLinksQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetNewsPageConfigGetAllLinksQueryKey
();
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>>
=
({
signal
})
=>
getNewsPageConfigGetAllLinks
({
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
GetNewsPageConfigGetAllLinksQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>>
export
type
GetNewsPageConfigGetAllLinksQueryError
=
ErrorType
<
unknown
>
export
function
useGetNewsPageConfigGetAllLinks
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigGetAllLinks
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigGetAllLinks
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigGetAllLinks
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetNewsPageConfigGetAllLinksQueryOptions
(
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
query
.
queryKey
=
queryOptions
.
queryKey
;
return
query
;
}
export
const
prefetchGetNewsPageConfigGetAllLinksQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfigGetAllLinks
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetNewsPageConfigGetAllLinksQueryOptions
(
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
return
queryClient
;
}
/**
* Get
*/
export
type
getNewsPageConfigResponse200
=
{
data
:
Response
status
:
200
}
export
type
getNewsPageConfigResponseSuccess
=
(
getNewsPageConfigResponse200
)
&
{
headers
:
Headers
;
};
;
export
type
getNewsPageConfigResponse
=
(
getNewsPageConfigResponseSuccess
)
export
const
getGetNewsPageConfigUrl
=
()
=>
{
return
`/newsPageConfig`
}
export
const
getNewsPageConfig
=
async
(
options
?:
RequestInit
):
Promise
<
getNewsPageConfigResponse
>
=>
{
return
useCustomClient
<
getNewsPageConfigResponse
>
(
getGetNewsPageConfigUrl
(),
{
...
options
,
method
:
'GET'
}
);}
export
const
getGetNewsPageConfigInfiniteQueryKey
=
()
=>
{
return
[
'infinite'
,
`/newsPageConfig`
]
as
const
;
}
export
const
getGetNewsPageConfigQueryKey
=
()
=>
{
return
[
`/newsPageConfig`
]
as
const
;
}
export
const
getGetNewsPageConfigInfiniteQueryOptions
=
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetNewsPageConfigInfiniteQueryKey
();
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>>
=
({
signal
})
=>
getNewsPageConfig
({
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
...
queryOptions
}
as
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
GetNewsPageConfigInfiniteQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>>
export
type
GetNewsPageConfigInfiniteQueryError
=
ErrorType
<
unknown
>
export
function
useGetNewsPageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfigInfinite
<
TData
=
InfiniteData
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetNewsPageConfigInfiniteQueryOptions
(
options
)
const
query
=
useInfiniteQuery
(
queryOptions
,
queryClient
)
as
UseInfiniteQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
query
.
queryKey
=
queryOptions
.
queryKey
;
return
query
;
}
export
const
prefetchGetNewsPageConfigInfiniteQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseInfiniteQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetNewsPageConfigInfiniteQueryOptions
(
options
)
await
queryClient
.
prefetchInfiniteQuery
(
queryOptions
);
return
queryClient
;
}
export
const
getGetNewsPageConfigQueryOptions
=
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
)
=>
{
const
{
query
:
queryOptions
,
request
:
requestOptions
}
=
options
??
{};
const
queryKey
=
queryOptions
?.
queryKey
??
getGetNewsPageConfigQueryKey
();
const
queryFn
:
QueryFunction
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>>
=
({
signal
})
=>
getNewsPageConfig
({
signal
,
...
requestOptions
});
return
{
queryKey
,
queryFn
,
...
queryOptions
}
as
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
}
export
type
GetNewsPageConfigQueryResult
=
NonNullable
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>>
export
type
GetNewsPageConfigQueryError
=
ErrorType
<
unknown
>
export
function
useGetNewsPageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
:
{
query
:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
&
Pick
<
DefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
DefinedUseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
&
Pick
<
UndefinedInitialDataOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
>
,
'initialData'
>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
export
function
useGetNewsPageConfig
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
,
queryClient
?:
QueryClient
):
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
}
{
const
queryOptions
=
getGetNewsPageConfigQueryOptions
(
options
)
const
query
=
useQuery
(
queryOptions
,
queryClient
)
as
UseQueryResult
<
TData
,
TError
>
&
{
queryKey
:
DataTag
<
QueryKey
,
TData
,
TError
>
};
query
.
queryKey
=
queryOptions
.
queryKey
;
return
query
;
}
export
const
prefetchGetNewsPageConfigQuery
=
async
<
TData
=
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
=
ErrorType
<
unknown
>>
(
queryClient
:
QueryClient
,
options
?:
{
query
?:
Partial
<
UseQueryOptions
<
Awaited
<
ReturnType
<
typeof
getNewsPageConfig
>>
,
TError
,
TData
>>
,
request
?:
SecondParameter
<
typeof
useCustomClient
>
}
):
Promise
<
QueryClient
>
=>
{
const
queryOptions
=
getGetNewsPageConfigQueryOptions
(
options
)
await
queryClient
.
prefetchQuery
(
queryOptions
);
return
queryClient
;
}
src/api/models/index.ts
View file @
a7f86fcb
...
...
@@ -140,6 +140,7 @@ export * from './putEventsLinkParams';
export
*
from
'./putEventsParams'
;
export
*
from
'./putFooterParams'
;
export
*
from
'./putMembershipFeeParams'
;
export
*
from
'./putNewsPageConfigCategoryIdBody'
;
export
*
from
'./putNotificationsMarkAsReadParams'
;
export
*
from
'./putNotificationsParams'
;
export
*
from
'./putOrderPaymentParams'
;
...
...
src/api/models/putNewsPageConfigCategoryIdBody.ts
0 → 100644
View file @
a7f86fcb
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VCCI
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
export
type
PutNewsPageConfigCategoryIdBody
=
{
category_ids
?:
string
[];
};
src/app/(main)/_lib/layout/header.tsx
View file @
a7f86fcb
...
...
@@ -91,7 +91,10 @@ function Header() {
"Tin Hội Viên"
,
]
}
/>
<
MenuItem
title=
"Hoạt động"
items=
{
[
"Sự Kiện"
,
"Đào Tạo"
]
}
/>
<
MenuItem
title=
"Hoạt động"
link=
"hoat-dong"
items=
{
[
"Sự Kiện"
,
"Đào Tạo"
]
}
/>
<
MenuItem
title=
"Xuất Xứ Hàng Hóa"
link=
"xuat-xu-hang-hoa"
...
...
src/app/(main)/hoat-dong/dao-tao/page.tsx
View file @
a7f86fcb
...
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
import
{
EVENT_CATEGORIES
}
from
"@constants/categories"
;
import
EventFilter
from
"@app/dai-dien-gioi-chu/components/event-filter"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
...
@@ -17,7 +17,7 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Đào tạo'
,
});
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
...
...
@@ -29,7 +29,7 @@ export default function Page() {
<
main
className=
"lg:col-span-2 bg-background "
>
<
div
className=
"pb-5 overflow-hidden"
>
{
allData
?.
responseData
.
rows
.
map
((
news
)
=>
(
<
NewsContent
key=
{
news
.
id
}
news=
{
news
}
link=
{
`${PATHS.event}/dao-tao/${news.id}`
}
/>
<
NewsContent
key=
{
news
.
id
}
news=
{
news
}
link=
{
`${PATHS.event}/dao-tao/${news.id}`
}
/>
))
}
<
div
className=
"w-full flex justify-center mt-4"
>
...
...
src/app/(main)/hoat-dong/page.tsx
View file @
a7f86fcb
src/app/(main)/hoat-dong/su-kien/page.tsx
View file @
a7f86fcb
...
...
@@ -5,7 +5,7 @@ import { EVENT_CATEGORIES } from "@constants/categories";
import
EventFilter
from
"@app/dai-dien-gioi-chu/components/event-filter"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
// ...existing code...
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
...
@@ -18,7 +18,7 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Sự kiện'
,
});
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
...
...
@@ -30,7 +30,7 @@ export default function Page() {
<
main
className=
"lg:col-span-2 bg-background "
>
<
div
className=
"pb-5 overflow-hidden"
>
{
allData
?.
responseData
.
rows
.
map
((
news
)
=>
(
<
NewsContent
key=
{
news
.
id
}
news=
{
news
}
link=
{
`${PATHS.event}/su-kien/${news.id}`
}
/>
<
NewsContent
key=
{
news
.
id
}
news=
{
news
}
link=
{
`${PATHS.event}/su-kien/${news.id}`
}
/>
))
}
<
div
className=
"w-full flex justify-center mt-4"
>
...
...
src/app/(main)/hoi-vien/ket-noi-hoi-vien/page.tsx
View file @
a7f86fcb
...
...
@@ -16,7 +16,7 @@ export default function Page() {
const
{
data
:
allData
,
isLoading
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
`category @=Kết nối hội viên`
,
});
return
(
<
div
className=
"min-h-screen container mx-auto pb-4"
>
...
...
src/app/(main)/hoi-vien/tin-hoi-vien/page.tsx
View file @
a7f86fcb
...
...
@@ -16,7 +16,7 @@ export default function Page() {
const
{
data
:
allData
,
isLoading
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Tin hội viên'
,
})
return
(
<
div
className=
"min-h-screen container mx-auto pb-4"
>
...
...
src/app/(main)/thong-tin-truyen-thong/an-pham/page.tsx
View file @
a7f86fcb
...
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
import
{
MEDIA_INFORMATION_CATEGORIES
}
from
"@constants/categories"
;
import
EventFilter
from
"@app/dai-dien-gioi-chu/components/event-filter"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
...
@@ -16,7 +16,7 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Ấn phẩm'
,
});
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
...
...
src/app/(main)/thong-tin-truyen-thong/chuyen-de/page.tsx
View file @
a7f86fcb
...
...
@@ -5,7 +5,7 @@ import { MEDIA_INFORMATION_CATEGORIES } from "@constants/categories";
// ...existing code...
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
...
@@ -17,7 +17,7 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Chuyên đề'
,
});
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
...
...
src/app/(main)/thong-tin-truyen-thong/thong-tin-chinh-sach-va-phap-luat/page.tsx
View file @
a7f86fcb
...
...
@@ -5,7 +5,7 @@ import { MEDIA_INFORMATION_CATEGORIES } from "@constants/categories";
// ...existing code...
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
...
@@ -18,7 +18,7 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Thông tin chính sách và pháp luật'
,
});
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
...
...
src/app/(main)/thong-tin-truyen-thong/thu-vien-tai-lieu/page.tsx
View file @
a7f86fcb
...
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
import
{
MEDIA_INFORMATION_CATEGORIES
}
from
"@constants/categories"
;
// ...existing code...
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
...
...
@@ -18,7 +18,7 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Thư viện tài liệu'
,
});
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
...
...
src/app/(main)/thong-tin-truyen-thong/tin-doanh-nghiep/page.tsx
View file @
a7f86fcb
...
...
@@ -5,7 +5,7 @@ import { MEDIA_INFORMATION_CATEGORIES } from "@constants/categories";
// ...existing code...
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
...
@@ -18,7 +18,7 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Tin doanh nghiệp'
,
});
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
...
...
src/app/(main)/thong-tin-truyen-thong/tin-kinh-te/page.tsx
View file @
a7f86fcb
...
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
import
{
MEDIA_INFORMATION_CATEGORIES
}
from
"@constants/categories"
;
// ...existing code...
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
...
@@ -17,7 +17,7 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Tin kinh tế'
,
});
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
...
...
src/components/shared/editor-content/AppEditorContent.tsx
View file @
a7f86fcb
...
...
@@ -4,24 +4,47 @@ import { AppEditorContentProps } from './AppEditorContent.type';
import
'./AppEditorContent.css'
;
const
AppEditorContent
:
FC
<
AppEditorContentProps
>
=
({
value
=
''
,
className
=
''
})
=>
{
const
transform
=
(
node
:
DOMNode
):
JSX
.
Element
|
null
=>
{
if
(
node
instanceof
Element
&&
node
.
tagName
===
'strong'
)
{
const
transform
=
(
node
:
DOMNode
):
JSX
.
Element
|
string
|
undefined
|
null
=>
{
// 1. Xử lý Text Node
if
(
node
instanceof
Text
)
{
return
node
.
data
;
}
if
(
!
(
node
instanceof
Element
))
return
undefined
;
const
tagName
=
node
.
tagName
.
toLowerCase
();
// ✅ FIX LỖI: Ép kiểu (as DOMNode) để Type 'ChildNode' khớp với 'DOMNode'
const
children
=
node
.
children
?
node
.
children
.
map
(
child
=>
transform
(
child
as
DOMNode
))
:
[];
// --- LOGIC XỬ LÝ THEO YÊU CẦU ---
// 2. ✅ Xóa thẻ <img>
if
(
tagName
===
'img'
)
{
return
<></>;
}
// 3. ✅ Xóa thẻ <a> nhưng giữ lại nội dung
if
(
tagName
===
'a'
)
{
// Trả về children đã được xử lý (làm phẳng thẻ <a>)
return
<>
{
children
}
</>;
}
// 4. ✅ Xử lý thẻ <strong>
if
(
tagName
===
'strong'
)
{
return
(
<
strong
className=
"custom-strong"
>
{
node
.
children
&&
Array
.
isArray
(
node
.
children
)
?
node
.
children
.
map
((
child
,
index
)
=>
{
if
(
typeof
child
===
'string'
)
{
return
child
;
}
else
if
(
child
instanceof
Text
)
{
return
child
.
data
;
}
return
null
;
})
:
null
}
{
children
}
</
strong
>
);
}
return
null
;
// 5. ✅ Render các thẻ HTML khác (Fallback)
// Trả về undefined để thư viện tự động render các thẻ còn lại (p, div, br,...)
return
undefined
;
};
return
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment