Skip to content

Commit

Permalink
Add phone number
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoleone committed Jun 7, 2024
1 parent 4589d3b commit 1e303dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions react/StoreAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const StoreAddress: FC<StoreAddressProps & WrappedComponentProps> = ({
return null
}

const instructionsParsed = JSON.parse(group.instructions)
const storePhoneNumber = instructionsParsed.phoneNumber

const [lng, lat] = group.address.geoCoordinates

return (
Expand All @@ -62,6 +65,12 @@ const StoreAddress: FC<StoreAddressProps & WrappedComponentProps> = ({
{group.address.city ? `${group.address.city}` : ''}
{group.address.state ? `, ${group.address.state}` : ''}
{group.address.postalCode ? `, ${group.address.postalCode}` : ''}
<br />
<br />
<span
className={handles.addressStoreAddressStreet}
><a className={`${handles.addressLink} underline-hover no-underline`} href={`tel:${storePhoneNumber}`}>{storePhoneNumber}</a>
</span>
</a>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion react/StoreHours.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const StoreHours: FC<WrappedComponentProps & StoreHoursProps> = ({
const instructionsParsed = JSON.parse(group.instructions)
const groceryBusinessHours = instructionsParsed.groceryBusinessHours

console.log("LEONE GROUP", group.businessHours)
console.log("LEONE GROUP", group)
console.log("LEONE GROCERYBUSINESSHOURS", groceryBusinessHours)

const displayHours = (item) => {
Expand Down

0 comments on commit 1e303dd

Please sign in to comment.