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
3dc23e79
Commit
3dc23e79
authored
Aug 11, 2026
by
Lê Bảo Hồng Đức
☄
Browse files
Options
Browse Files
Download
Plain Diff
[tag]0.1-vcci
parents
dfa17dc9
40d4b3f5
Pipeline
#52519
passed with stages
in 3 minutes and 50 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
index.tsx
src/app/(main)/(home)/components/quick-links/index.tsx
+1
-2
use-advertisements.ts
src/app/(main)/(home)/lib/use-advertisements.ts
+1
-1
No files found.
src/app/(main)/(home)/components/quick-links/index.tsx
View file @
3dc23e79
...
...
@@ -13,7 +13,6 @@ const FALLBACK_HREF = "https://vccihcm.vn";
function
AdItem
({
item
}:
{
item
:
Advertisement
})
{
const
initialSrc
=
item
.
file
?.
path
?
resolveUploadUrl
(
item
.
file
.
path
)
:
FALLBACK_SRC
;
const
[
src
,
setSrc
]
=
useState
(
initialSrc
);
const
isGif
=
src
.
toLowerCase
().
endsWith
(
".gif"
);
return
(
<
Link
...
...
@@ -30,7 +29,7 @@ function AdItem({ item }: { item: Advertisement }) {
width=
{
2048
}
height=
{
1365
}
className=
"h-full w-full object-cover object-[center_80%]"
unoptimized
=
{
isGif
}
unoptimized
onError=
{
()
=>
{
if
(
src
!==
FALLBACK_SRC
)
setSrc
(
FALLBACK_SRC
);
}
}
...
...
src/app/(main)/(home)/lib/use-advertisements.ts
View file @
3dc23e79
...
...
@@ -16,7 +16,7 @@ export function useAdvertisements(
type
:
"square"
|
"horizontal"
,
limit
?:
number
,
):
Advertisement
[]
{
const
effectiveLimit
=
limit
??
(
type
===
"horizontal"
?
1
:
20
);
const
effectiveLimit
=
limit
??
(
type
===
"horizontal"
?
1
:
5
);
const
{
data
}
=
useGetApiV10AdvertisementPublic
({
type
:
type
as
GetApiV10AdvertisementPublicType
,
...
...
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