Skip to content

Commit

Permalink
Change date format and adding handles to holiday container
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonfnasc12 committed Jun 19, 2024
1 parent 2ed0ef2 commit d2b956a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"vendor": "vtex",
"name": "store-locator",
"version": "0.11.2-hkignore.4",
"version": "0.11.2-hkignore.5",
"title": "Store Locator",
"description": "Integrates with the logistics module to provide Store Locator pages",
"builders": {
Expand Down
11 changes: 6 additions & 5 deletions react/StoreHours.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ const CSS_HANDLES = [
'dayOfWeek',
'divider',
'businessHours',
'hourHolidayRow'
'hourHolidayRow',
'pickupHolidaysContainer'
] as const

const timeFormat = (time: string, format?: string) => {
Expand Down Expand Up @@ -122,11 +123,11 @@ const StoreHours: FC<WrappedComponentProps & StoreHoursProps> = ({

const displayHolidayDay = (item) => {
const holiday = new Date(item.date)
const dayOfWeek = holiday.getDay()
const { locale } = intl
const month = new Intl.DateTimeFormat(locale, {
day: 'numeric',
month: 'long',
month: 'numeric',
year: 'numeric'
}).format(holiday)

const today = new Date()
Expand All @@ -137,7 +138,7 @@ const StoreHours: FC<WrappedComponentProps & StoreHoursProps> = ({

return (
<div className={`${handles.dayOfWeek} w-30`}>
Bank Holiday {intl.formatMessage(messages[dayOfWeek])}, {month}
Bank Holiday {month}
</div>
)
}
Expand Down Expand Up @@ -171,7 +172,7 @@ const StoreHours: FC<WrappedComponentProps & StoreHoursProps> = ({

return (
<>
<div className={`container mt6`}>
<div className={`${handles.pickupHolidaysContainer} container mt6`}>
{!pickupHolidays &&
group.pickupHolidays.map((item: any, i: number) => (
<div
Expand Down

0 comments on commit d2b956a

Please sign in to comment.