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
d63562fc
Commit
d63562fc
authored
Nov 05, 2025
by
Vũ Đình Nguyên
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/category' into 'develop'
Fix/category See merge request
!15
parents
dbcd6907
902a858f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
23 deletions
+32
-23
page.tsx
src/app/(main)/(home)/[id]/page.tsx
+2
-2
page.tsx
src/app/(main)/(home)/page.tsx
+24
-14
ScrollToTopButton.tsx
src/app/(main)/_lib/layout/ScrollToTopButton.tsx
+4
-5
page.tsx
src/app/(main)/thong-tin-truyen-thong/tin-vcci/page.tsx
+1
-1
index.tsx
src/components/base/list-category/index.tsx
+1
-1
No files found.
src/app/(main)/(home)/[id]/page.tsx
View file @
d63562fc
...
...
@@ -41,7 +41,7 @@ const NewsDetailPage = () => {
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-5"
>
{
/* Main content */
}
<
main
className=
"lg:col-span-2 bg-white border rounded-md p-
7
"
>
<
main
className=
"lg:col-span-2 bg-white border rounded-md p-
8
"
>
<
div
className=
'pb-5 text-primary text-2xl leading-normal font-medium'
>
{
data
?.
responseData
?.
title
}
</
div
>
...
...
@@ -53,7 +53,7 @@ const NewsDetailPage = () => {
<
hr
/>
</
div
>
<
div
className=
'flex-1 text-app-grey text-base overflow-hidden'
>
<
div
className=
"p
-7.5 p
rose tiptap overflow-hidden"
>
{
parse
(
data
?.
responseData
?.
description
??
''
)
}
</
div
>
<
div
className=
"prose tiptap overflow-hidden"
>
{
parse
(
data
?.
responseData
?.
description
??
''
)
}
</
div
>
</
div
>
</
main
>
{
/* Sidebar */
}
...
...
src/app/(main)/(home)/page.tsx
View file @
d63562fc
...
...
@@ -32,15 +32,25 @@ const Page = () => {
const
{
data
:
categoryData
,
isLoading
:
isLoadingCategory
}
=
useGetCategory
<
GetCategoryAdminResponseType
>
();
const
{
data
:
newsData
,
isLoading
:
isLoadingNews
}
=
useGetNews
<
GetNewsAdminResponseType
>
(
{
pageSize
:
'999'
}
{
pageSize
:
'5'
,
filters
:
tab
===
"all"
?
``
:
`category @=
${
tab
}
`
,
}
);
const
{
data
:
businessOpportunities
,
isLoading
:
isLoadingBusinessOpportunities
}
=
useGetNews
<
GetNewsAdminResponseType
>
(
{
pageSize
:
'5'
,
filters
:
`category @=Cơ hội kinh doanh`
,
}
);
const
{
data
:
policyAndLegalInformation
,
isLoading
:
isLoadingPolicyAndLegalInformation
}
=
useGetNews
<
GetNewsAdminResponseType
>
(
{
pageSize
:
'5'
,
filters
:
`category @=Thông tin chính sách và pháp luật`
,
}
);
const
{
data
:
eventData
,
isLoading
:
isLoadingEvent
}
=
useGetEvents
<
EventApiResponse
>
();
// filter category
const
rows
=
newsData
?.
responseData
?.
rows
??
[];
const
filteredRows
=
tab
===
"all"
?
rows
:
rows
.
filter
((
n
)
=>
n
.
category
===
tab
);
const
images
=
[
"/home/doi-tac/AMFORI-1.png.webp"
,
"/home/doi-tac/AUS4SKILLS-1.png.webp"
,
...
...
@@ -131,7 +141,7 @@ const Page = () => {
}
}
className=
"pb-5"
>
{
rows
.
map
((
news
)
=>
(
{
newsData
?.
responseData
?.
rows
.
map
((
news
)
=>
(
<
SwiperSlide
key=
{
news
.
id
}
>
<
a
href=
{
`/${news.id}`
}
...
...
@@ -196,11 +206,11 @@ const Page = () => {
/>
</
div
>
<
div
className=
"flex-1 p-5"
>
<
div
className=
"flex-1 p-5
pt-0
"
>
<
p
className=
"text-[#063E8E] font-bold text-xl line-clamp-2"
>
{
news
.
title
}
</
p
>
<
p
className=
"text-gray-500 text-sm
my-1
"
>
<
p
className=
"text-gray-500 text-sm"
>
{
dayjs
(
news
.
release_at
).
format
(
"DD/MM/YYYY"
)
}
</
p
>
<
AppEditorContent
...
...
@@ -238,7 +248,7 @@ const Page = () => {
))
}
</
div
>
{
filteredR
ows
.
slice
(
0
,
4
).
map
((
news
)
=>
(
{
newsData
?.
responseData
?.
r
ows
.
slice
(
0
,
4
).
map
((
news
)
=>
(
<
CardNews
key=
{
news
.
id
}
news=
{
news
}
/>
))
}
</
div
>
...
...
@@ -388,7 +398,7 @@ const Page = () => {
</
div
>
<
hr
className=
"border-[#063e8e] mb-4"
/>
<
div
className=
"pt-2"
>
{
newsData
?.
responseData
.
rows
{
businessOpportunities
?.
responseData
.
rows
.
slice
(
0
,
1
)
.
map
((
news
:
NewsAdminItem
)
=>
(
<
a
key=
{
news
.
id
}
href=
{
`${news.id}`
}
>
...
...
@@ -407,7 +417,7 @@ const Page = () => {
</
a
>
))
}
{
rows
.
slice
(
0
,
3
).
map
((
news
)
=>
(
{
businessOpportunities
?.
responseData
.
rows
.
slice
(
0
,
3
).
map
((
news
)
=>
(
<
CardNews
key=
{
news
.
id
}
news=
{
news
}
/>
))
}
</
div
>
...
...
@@ -429,7 +439,7 @@ const Page = () => {
</
div
>
<
hr
className=
"border-[#063e8e] mb-4"
/>
<
div
className=
"pt-2"
>
{
newsData
?.
responseData
.
rows
{
policyAndLegalInformation
?.
responseData
.
rows
.
slice
(
0
,
1
)
.
map
((
news
:
NewsAdminItem
)
=>
(
<
a
key=
{
news
.
id
}
href=
{
`${news.id}`
}
>
...
...
@@ -448,7 +458,7 @@ const Page = () => {
</
a
>
))
}
{
rows
.
slice
(
0
,
3
).
map
((
news
)
=>
(
{
policyAndLegalInformation
?.
responseData
.
rows
.
slice
(
0
,
3
).
map
((
news
)
=>
(
<
CardNews
key=
{
news
.
id
}
news=
{
news
}
/>
))
}
</
div
>
...
...
src/app/(main)/_lib/layout/ScrollToTopButton.tsx
View file @
d63562fc
...
...
@@ -21,11 +21,10 @@ export default function ScrollToTopButton() {
return
(
<
button
onClick=
{
scrollToTop
}
className=
{
`fixed bottom-25 right-6 bg-[#e8c518] hover:text-[#063e8e] text-white p-3 rounded-lg shadow-lg transition-all duration-500 cursor-pointer ${
visible
? "opacity-100 translate-y-0"
: "opacity-0 translate-y-3 pointer-events-none"
}`
}
className=
{
`fixed z-50 bottom-20 right-8 bg-[#e8c518] hover:text-[#063e8e] text-white p-3 rounded-lg shadow-lg transition-all duration-500 cursor-pointer ${visible
? "opacity-100 translate-y-0"
: "opacity-0 translate-y-3 pointer-events-none"
}`
}
>
<
ChevronsUp
size=
{
24
}
/>
</
button
>
...
...
src/app/(main)/thong-tin-truyen-thong/tin-vcci/page.tsx
View file @
d63562fc
...
...
@@ -20,7 +20,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 VCCI`
,
});
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
...
...
src/components/base/list-category/index.tsx
View file @
d63562fc
...
...
@@ -29,7 +29,7 @@ const ListCategory: React.FC<{ categories?: Category[] }> = ({
};
return
(
<
div
className=
"border-t border-gray-200 bg-white p
-2.5
"
>
<
div
className=
"border-t border-gray-200 bg-white p
y-2
"
>
<
div
className=
"w-full px-4 sm:px-6 lg:px-8"
>
<
div
className=
"py-3"
>
<
div
className=
"flex flex-wrap items-center max-w-full overflow-x-auto"
>
...
...
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