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
48de7805
Commit
48de7805
authored
Nov 04, 2025
by
Phạm Quang Bảo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update/fallback image
parent
a7f86fcb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
fallback.png
public/fallback.png
+0
-0
index.tsx
src/app/(main)/(home)/components/card-event/index.tsx
+4
-0
index.tsx
src/app/(main)/(home)/components/card-news/index.tsx
+6
-1
page.tsx
src/app/(main)/(home)/page.tsx
+11
-2
No files found.
public/fallback.png
0 → 100644
View file @
48de7805
498 Bytes
src/app/(main)/(home)/components/card-event/index.tsx
View file @
48de7805
...
...
@@ -13,6 +13,10 @@ function CardEvent({ event }: { event: EventItem }) {
src=
{
`${BASE_URL.imageEndpoint}${event.image}`
}
alt=
{
event
.
name
}
className=
'w-[100px] md:w-[130px] aspect-3/2 object-cover'
onError=
{
(
e
)
=>
{
e
.
currentTarget
.
onerror
=
null
e
.
currentTarget
.
src
=
"/fallback.png"
}
}
/>
<
div
className=
'flex-1'
>
<
p
className=
'text-[#0056b3] font-bold text-sm line-clamp-2'
>
...
...
src/app/(main)/(home)/components/card-news/index.tsx
View file @
48de7805
...
...
@@ -12,8 +12,13 @@ function CardNews({ news }: { news: NewsAdminItem }) {
<
img
src=
{
`${BASE_URL.imageEndpoint}${news.thumbnail}`
}
alt=
{
news
.
title
}
className=
'w-[100px] md:w-[130px] aspect-3/2 object-cover'
className=
"w-[100px] md:w-[130px] aspect-3/2 object-cover"
onError=
{
(
e
)
=>
{
e
.
currentTarget
.
onerror
=
null
e
.
currentTarget
.
src
=
"/fallback.png"
}
}
/>
<
div
className=
'flex-1'
>
<
p
className=
'text-[#0056b3] font-bold text-sm line-clamp-2'
>
{
news
.
title
}
...
...
src/app/(main)/(home)/page.tsx
View file @
48de7805
...
...
@@ -30,7 +30,9 @@ const Page = () => {
const
swiperRef
=
useRef
<
SwiperType
|
null
>
(
null
)
const
{
data
:
categoryData
,
isLoading
:
isLoadingCategory
}
=
useGetCategory
<
GetCategoryAdminResponseType
>
()
const
{
data
:
newsData
,
isLoading
:
isLoadingNews
}
=
useGetNews
<
GetNewsAdminResponseType
>
()
const
{
data
:
newsData
,
isLoading
:
isLoadingNews
}
=
useGetNews
<
GetNewsAdminResponseType
>
(
{
pageSize
:
'999'
},
)
const
{
data
:
eventData
,
isLoading
:
isLoadingEvent
}
=
useGetEvents
<
EventApiResponse
>
()
// filter category
...
...
@@ -178,6 +180,10 @@ const Page = () => {
src=
{
`${BASE_URL.imageEndpoint}${news.thumbnail}`
}
alt=
{
news
.
title
}
className=
"w-full h-full object-cover"
onError=
{
(
e
)
=>
{
e
.
currentTarget
.
onerror
=
null
e
.
currentTarget
.
src
=
"/fallback.png"
}
}
/>
</
div
>
...
...
@@ -281,7 +287,10 @@ const Page = () => {
src=
{
`${BASE_URL.imageEndpoint}${event.image}`
}
alt=
{
event
.
name
}
className=
"w-full h-full object-cover"
/>
onError=
{
(
e
)
=>
{
e
.
currentTarget
.
onerror
=
null
e
.
currentTarget
.
src
=
"/fallback.png"
}
}
/>
</
div
>
<
div
className=
"flex-1"
>
...
...
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