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
54901914
Commit
54901914
authored
May 19, 2026
by
Lê Bảo Hồng Đức
☄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ddf84539
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
8 deletions
+2
-8
use-home-posts.ts
src/app/(main)/(home)/lib/use-home-posts.ts
+0
-3
data.ts
src/app/(main)/[...slug]/templates/data.ts
+0
-1
index.tsx
src/components/base/card-news/index.tsx
+1
-2
files.ts
src/lib/api/files.ts
+0
-1
index.ts
src/links/index.ts
+1
-1
No files found.
src/app/(main)/(home)/lib/use-home-posts.ts
View file @
54901914
...
@@ -154,9 +154,6 @@ const resolveAssetUrl = (value?: string | null) => {
...
@@ -154,9 +154,6 @@ const resolveAssetUrl = (value?: string | null) => {
if
(
!
trimmed
)
return
"/thumbnail.png"
;
if
(
!
trimmed
)
return
"/thumbnail.png"
;
if
(
trimmed
.
startsWith
(
"http://"
)
||
trimmed
.
startsWith
(
"https://"
))
return
trimmed
;
if
(
trimmed
.
startsWith
(
"http://"
)
||
trimmed
.
startsWith
(
"https://"
))
return
trimmed
;
if
(
trimmed
.
startsWith
(
"/"
))
{
return
`
${
Links
.
imageEndpoint
.
replace
(
/
\/
+$/
,
""
)}${
trimmed
}
`
;
}
return
`
${
Links
.
imageEndpoint
}${
trimmed
.
replace
(
/^
\/
+/
,
""
)}
`
;
return
`
${
Links
.
imageEndpoint
}${
trimmed
.
replace
(
/^
\/
+/
,
""
)}
`
;
};
};
...
...
src/app/(main)/[...slug]/templates/data.ts
View file @
54901914
...
@@ -294,7 +294,6 @@ export function resolveDynamicPostImage(thumbnail?: DynamicPostThumbnail) {
...
@@ -294,7 +294,6 @@ export function resolveDynamicPostImage(thumbnail?: DynamicPostThumbnail) {
if
(
!
value
)
return
"/thumbnail.png"
;
if
(
!
value
)
return
"/thumbnail.png"
;
if
(
value
.
startsWith
(
"http://"
)
||
value
.
startsWith
(
"https://"
))
return
value
;
if
(
value
.
startsWith
(
"http://"
)
||
value
.
startsWith
(
"https://"
))
return
value
;
if
(
value
.
startsWith
(
"/"
))
return
`
${
Links
.
imageEndpoint
.
replace
(
/
\/
+$/
,
""
)}${
value
}
`
;
return
`
${
Links
.
imageEndpoint
}${
value
.
replace
(
/^
\/
+/
,
""
)}
`
;
return
`
${
Links
.
imageEndpoint
}${
value
.
replace
(
/^
\/
+/
,
""
)}
`
;
}
}
...
...
src/components/base/card-news/index.tsx
View file @
54901914
...
@@ -22,8 +22,7 @@ const stripImagesAndHtml = (html?: string) => {
...
@@ -22,8 +22,7 @@ const stripImagesAndHtml = (html?: string) => {
const
resolveThumbnail
=
(
thumbnail
?:
string
)
=>
{
const
resolveThumbnail
=
(
thumbnail
?:
string
)
=>
{
if
(
!
thumbnail
)
return
"/img-error.png"
;
if
(
!
thumbnail
)
return
"/img-error.png"
;
if
(
thumbnail
.
startsWith
(
"http://"
)
||
thumbnail
.
startsWith
(
"https://"
))
return
thumbnail
;
if
(
thumbnail
.
startsWith
(
"http://"
)
||
thumbnail
.
startsWith
(
"https://"
))
return
thumbnail
;
if
(
thumbnail
.
startsWith
(
"/"
))
return
`
${
Links
.
imageEndpoint
.
replace
(
/
\/
+$/
,
""
)}${
thumbnail
}
`
;
return
`
${
Links
.
imageEndpoint
}${
thumbnail
.
replace
(
/^
\/
+/
,
""
)}
`
;
return
`
${
Links
.
imageEndpoint
}${
thumbnail
}
`
;
};
};
const
CardNews
=
({
news
,
link
}:
{
news
:
NewsItem
;
link
:
string
})
=>
{
const
CardNews
=
({
news
,
link
}:
{
news
:
NewsItem
;
link
:
string
})
=>
{
...
...
src/lib/api/files.ts
View file @
54901914
...
@@ -45,7 +45,6 @@ export const resolveCmsFileUrl = (path?: string | null) => {
...
@@ -45,7 +45,6 @@ export const resolveCmsFileUrl = (path?: string | null) => {
if
(
!
value
)
return
"/img-error.png"
;
if
(
!
value
)
return
"/img-error.png"
;
if
(
value
.
startsWith
(
"http://"
)
||
value
.
startsWith
(
"https://"
))
return
value
;
if
(
value
.
startsWith
(
"http://"
)
||
value
.
startsWith
(
"https://"
))
return
value
;
if
(
value
.
startsWith
(
"/"
))
return
`
${
Links
.
imageEndpoint
.
replace
(
/
\/
+$/
,
""
)}${
value
}
`
;
return
`
${
Links
.
imageEndpoint
}${
value
.
replace
(
/^
\/
+/
,
""
)}
`
;
return
`
${
Links
.
imageEndpoint
}${
value
.
replace
(
/^
\/
+/
,
""
)}
`
;
};
};
...
...
src/links/index.ts
View file @
54901914
...
@@ -37,7 +37,7 @@ const frontendUrl = toUrl(frontendOrigin);
...
@@ -37,7 +37,7 @@ const frontendUrl = toUrl(frontendOrigin);
const
links
=
{
const
links
=
{
analyticsGoogle
:
"G-C9TEK9BS4C"
,
analyticsGoogle
:
"G-C9TEK9BS4C"
,
apiEndpoint
:
backendOrigin
?
`
${
backendOrigin
}
/api/v1.0`
:
"/api/v1.0"
,
apiEndpoint
:
backendOrigin
?
`
${
backendOrigin
}
/api/v1.0`
:
"/api/v1.0"
,
imageEndpoint
:
backendOrigin
?
`
${
backendOrigin
}
/
`
:
"
/"
,
imageEndpoint
:
backendOrigin
?
`
${
backendOrigin
}
/
uploads/`
:
"/uploads
/"
,
backendHost
:
backendUrl
?.
hostname
||
""
,
backendHost
:
backendUrl
?.
hostname
||
""
,
backendProtocol
:
backendUrl
?.
protocol
.
replace
(
":"
,
""
)
||
""
,
backendProtocol
:
backendUrl
?.
protocol
.
replace
(
":"
,
""
)
||
""
,
backendPathname
:
backendUrl
?.
pathname
.
replace
(
/
\/
+$/
,
""
)
||
"/"
,
backendPathname
:
backendUrl
?.
pathname
.
replace
(
/
\/
+$/
,
""
)
||
"/"
,
...
...
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