Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vcci-news-frontend
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-frontend
Commits
3433b281
Commit
3433b281
authored
Oct 09, 2026
by
Phạm Quang Bảo
Browse files
Options
Browse Files
Download
Plain Diff
[tag]0.1-vcci
parents
b083c86b
b5c7d30e
Pipeline
#53567
passed with stages
in 2 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
event-info-card.tsx
...templates/news-detail-page/components/event-info-card.tsx
+4
-7
No files found.
src/app/(main)/[...slug]/templates/news-detail-page/components/event-info-card.tsx
View file @
3433b281
...
@@ -2,11 +2,8 @@ import dayjs from "dayjs";
...
@@ -2,11 +2,8 @@ import dayjs from "dayjs";
import
{
Calendar
,
MapPin
,
Clock
,
Users
,
CreditCard
}
from
"lucide-react"
;
import
{
Calendar
,
MapPin
,
Clock
,
Users
,
CreditCard
}
from
"lucide-react"
;
import
type
{
DynamicPostItem
}
from
"@/api/vcci-news/types/post"
;
import
type
{
DynamicPostItem
}
from
"@/api/vcci-news/types/post"
;
const
formatDate
=
(
value
:
string
|
null
)
=>
value
?
dayjs
(
value
).
format
(
"DD/MM/YYYY"
)
:
""
;
const
formatDateTime
=
(
value
:
string
|
null
)
=>
const
formatDateTime
=
(
value
:
string
|
null
)
=>
value
?
dayjs
(
value
).
format
(
"
DD/MM/YYYY HH:mm
"
)
:
""
;
value
?
dayjs
(
value
).
format
(
"
HH:mm (DD/MM/YYYY)
"
)
:
""
;
const
isEventOrTraining
=
(
post
:
DynamicPostItem
)
=>
{
const
isEventOrTraining
=
(
post
:
DynamicPostItem
)
=>
{
const
eventCategories
=
[
"Sự kiện"
,
"Đào tạo"
,
"su-kien"
,
"dao-tao"
,
"su_kien"
,
"dao_tao"
];
const
eventCategories
=
[
"Sự kiện"
,
"Đào tạo"
,
"su-kien"
,
"dao-tao"
,
"su_kien"
,
"dao_tao"
];
...
@@ -80,10 +77,10 @@ export default function EventInfoCard({ post }: { post: DynamicPostItem }) {
...
@@ -80,10 +77,10 @@ export default function EventInfoCard({ post }: { post: DynamicPostItem }) {
<
p
className=
"mt-1 text-sm font-semibold text-[#1f3768]"
>
<
p
className=
"mt-1 text-sm font-semibold text-[#1f3768]"
>
{
startedAt
{
startedAt
?
endedAt
?
endedAt
?
`${formatDate
(startedAt)} - ${formatDat
e(endedAt)}`
?
`${formatDate
Time(startedAt)} - ${formatDateTim
e(endedAt)}`
:
formatDate
(
startedAt
)
:
formatDate
Time
(
startedAt
)
:
endedAt
:
endedAt
?
formatDate
(
endedAt
)
?
formatDate
Time
(
endedAt
)
:
"-"
}
:
"-"
}
</
p
>
</
p
>
</
div
>
</
div
>
...
...
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