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
136fa78f
Commit
136fa78f
authored
Nov 18, 2025
by
Phạm Quang Bảo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix/link post
parent
e758f6e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
page.tsx
src/app/(main)/search/page.tsx
+3
-2
No files found.
src/app/(main)/search/page.tsx
View file @
136fa78f
"use client"
;
"use client"
;
import
React
,
{
useState
,
Suspense
}
from
"react"
;
import
React
,
{
useState
,
Suspense
}
from
"react"
;
import
ListCategory
from
"@/components/base/list-category"
;
import
ListCategory
from
"@/components/base/list-category"
;
import
ListFilter
from
"@/components/base/list-filter"
;
import
ListFilter
from
"@/components/base/list-filter"
;
...
@@ -13,7 +14,7 @@ import { useSearchParams } from 'next/navigation'
...
@@ -13,7 +14,7 @@ import { useSearchParams } from 'next/navigation'
function
SearchContent
()
{
function
SearchContent
()
{
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
page
,
setPage
]
=
useState
(
1
);
const
searchParams
=
useSearchParams
()
const
searchParams
=
useSearchParams
()
const
query
=
searchParams
.
get
(
'q'
)
//
const
query
=
searchParams
.
get
(
'q'
)
||
''
;
const
pageSize
=
5
;
const
pageSize
=
5
;
const
{
data
:
allData
,
isLoading
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
,
isLoading
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
...
@@ -50,7 +51,7 @@ function SearchContent() {
...
@@ -50,7 +51,7 @@ function SearchContent() {
<
CardNews
<
CardNews
key=
{
news
.
id
}
key=
{
news
.
id
}
news=
{
news
}
news=
{
news
}
link=
{
`${news.page_config.static_link}/${news.id}`
}
link=
{
news
.
external_link
}
/>
/>
))
}
))
}
...
...
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