ordering-ui-external 1.4.5 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.9c913f613f7ccfd32dd9.js → 0.ordering-ui.5de718771fdf8a9bc402.js} +1 -1
- package/_bundles/{1.ordering-ui.9c913f613f7ccfd32dd9.js → 1.ordering-ui.5de718771fdf8a9bc402.js} +1 -1
- package/_bundles/{2.ordering-ui.9c913f613f7ccfd32dd9.js → 2.ordering-ui.5de718771fdf8a9bc402.js} +1 -1
- package/_bundles/{4.ordering-ui.9c913f613f7ccfd32dd9.js → 4.ordering-ui.5de718771fdf8a9bc402.js} +1 -1
- package/_bundles/{5.ordering-ui.9c913f613f7ccfd32dd9.js → 5.ordering-ui.5de718771fdf8a9bc402.js} +1 -1
- package/_bundles/{6.ordering-ui.9c913f613f7ccfd32dd9.js → 6.ordering-ui.5de718771fdf8a9bc402.js} +1 -1
- package/_bundles/{7.ordering-ui.9c913f613f7ccfd32dd9.js → 7.ordering-ui.5de718771fdf8a9bc402.js} +2 -2
- package/_bundles/{7.ordering-ui.9c913f613f7ccfd32dd9.js.LICENSE.txt → 7.ordering-ui.5de718771fdf8a9bc402.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.9c913f613f7ccfd32dd9.js → 8.ordering-ui.5de718771fdf8a9bc402.js} +1 -1
- package/_bundles/{9.ordering-ui.9c913f613f7ccfd32dd9.js → 9.ordering-ui.5de718771fdf8a9bc402.js} +1 -1
- package/_bundles/{ordering-ui.9c913f613f7ccfd32dd9.js → ordering-ui.5de718771fdf8a9bc402.js} +2 -2
- package/_bundles/{ordering-ui.9c913f613f7ccfd32dd9.js.LICENSE.txt → ordering-ui.5de718771fdf8a9bc402.js.LICENSE.txt} +0 -0
- package/_modules/components/LogoutButton/index.js +9 -4
- package/_modules/components/PaymentOptions/index.js +14 -7
- package/_modules/components/SpinnerLoader/styles.js +1 -1
- package/_modules/components/UserProfileForm/index.js +15 -2
- package/_modules/components/UserProfileForm/styles.js +1 -1
- package/_modules/hooks/useRecaptcha.js +62 -0
- package/_modules/themes/five/src/components/AddressForm/styles.js +3 -3
- package/_modules/themes/five/src/components/AddressList/index.js +1 -1
- package/_modules/themes/five/src/components/AddressList/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +5 -5
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +12 -10
- package/_modules/themes/five/src/components/BusinessController/index.js +6 -4
- package/_modules/themes/five/src/components/BusinessController/styles.js +10 -4
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +21 -6
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +6 -17
- package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +3 -4
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +11 -3
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessReviews/index.js +16 -8
- package/_modules/themes/five/src/components/BusinessReviews/styles.js +6 -4
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +58 -34
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +40 -23
- package/_modules/themes/five/src/components/DriverTips/styles.js +1 -1
- package/_modules/themes/five/src/components/Footer/index.js +2 -1
- package/_modules/themes/five/src/components/Footer/styles.js +1 -1
- package/_modules/themes/five/src/components/Header/index.js +18 -11
- package/_modules/themes/five/src/components/Header/styles.js +7 -7
- package/_modules/themes/five/src/components/HomeHero/index.js +0 -15
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +116 -31
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +36 -37
- package/_modules/themes/five/src/components/LoginForm/index.js +62 -21
- package/_modules/themes/five/src/components/LoginForm/styles.js +1 -1
- package/_modules/themes/five/src/components/Messages/index.js +19 -3
- package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +6 -6
- package/_modules/themes/five/src/components/MyOrders/index.js +4 -4
- package/_modules/themes/five/src/components/NavigationBar/index.js +145 -34
- package/_modules/themes/five/src/components/NavigationBar/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/index.js +46 -7
- package/_modules/themes/five/src/components/OrderDetails/styles.js +11 -3
- package/_modules/themes/five/src/components/PaymentOptionStripe/index.js +2 -14
- package/_modules/themes/five/src/components/PaymentOptions/index.js +23 -16
- package/_modules/themes/five/src/components/PaymentOptions/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductForm/index.js +9 -7
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +10 -4
- package/_modules/themes/five/src/components/ProductItemAccordion/styles.js +11 -3
- package/_modules/themes/five/src/components/ProductShare/ProductCopyURL.js +61 -0
- package/_modules/themes/five/src/components/ProductShare/index.js +107 -0
- package/_modules/themes/five/src/components/ProductShare/styles.js +40 -0
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +3 -2
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +18 -16
- package/_modules/themes/five/src/components/ReviewProduct/index.js +5 -3
- package/_modules/themes/five/src/components/ReviewProduct/styles.js +19 -3
- package/_modules/themes/five/src/components/SearchProducts/index.js +13 -2
- package/_modules/themes/five/src/components/SignUpApproval/index.js +6 -6
- package/_modules/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/index.js +57 -17
- package/_modules/themes/five/src/components/SignUpBusiness/layouts/OldSignUpBusiness/index.js +57 -17
- package/_modules/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/index.js +57 -17
- package/_modules/themes/five/src/components/SignUpDriver/layouts/OldSignUpDriver/index.js +57 -17
- package/_modules/themes/five/src/components/SignUpForm/index.js +60 -20
- package/_modules/themes/five/src/components/SignUpForm/styles.js +2 -2
- package/_modules/themes/five/src/components/SingleProductCard/index.js +36 -2
- package/_modules/themes/five/src/components/UserProfileForm/index.js +105 -8
- package/_modules/themes/five/src/components/UserProfileForm/styles.js +30 -17
- package/_modules/utils/index.js +26 -11
- package/index-template.js +11 -1
- package/package.json +2 -2
- package/src/components/LogoutButton/index.js +10 -8
- package/src/components/PaymentOptions/index.js +16 -11
- package/src/components/SpinnerLoader/styles.js +1 -0
- package/src/components/UserProfileForm/index.js +12 -2
- package/src/components/UserProfileForm/styles.js +1 -1
- package/src/hooks/useRecaptcha.js +40 -0
- package/src/themes/five/src/components/AddressForm/styles.js +3 -2
- package/src/themes/five/src/components/AddressList/index.js +1 -1
- package/src/themes/five/src/components/AddressList/styles.js +2 -2
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +74 -71
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +69 -20
- package/src/themes/five/src/components/BusinessController/index.js +3 -1
- package/src/themes/five/src/components/BusinessController/styles.js +8 -0
- package/src/themes/five/src/components/BusinessListingSearch/index.js +16 -1
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +6 -18
- package/src/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -0
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +2 -3
- package/src/themes/five/src/components/BusinessReviews/index.js +17 -10
- package/src/themes/five/src/components/BusinessReviews/styles.js +7 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +64 -19
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +99 -1
- package/src/themes/five/src/components/DriverTips/styles.js +1 -1
- package/src/themes/five/src/components/Footer/index.js +9 -5
- package/src/themes/five/src/components/Footer/styles.js +2 -6
- package/src/themes/five/src/components/Header/index.js +16 -8
- package/src/themes/five/src/components/Header/styles.js +49 -8
- package/src/themes/five/src/components/HomeHero/index.js +0 -6
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +163 -60
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +145 -82
- package/src/themes/five/src/components/LoginForm/index.js +30 -4
- package/src/themes/five/src/components/LoginForm/styles.js +8 -0
- package/src/themes/five/src/components/Messages/index.js +8 -2
- package/src/themes/five/src/components/MultiOrdersDetails/styles.js +34 -1
- package/src/themes/five/src/components/MyOrders/index.js +4 -4
- package/src/themes/five/src/components/NavigationBar/index.js +153 -39
- package/src/themes/five/src/components/NavigationBar/styles.js +2 -2
- package/src/themes/five/src/components/OrderDetails/index.js +45 -8
- package/src/themes/five/src/components/OrderDetails/styles.js +50 -0
- package/src/themes/five/src/components/PaymentOptionStripe/index.js +2 -14
- package/src/themes/five/src/components/PaymentOptions/index.js +13 -7
- package/src/themes/five/src/components/PaymentOptions/styles.js +5 -0
- package/src/themes/five/src/components/ProductForm/index.js +9 -7
- package/src/themes/five/src/components/ProductItemAccordion/index.js +67 -53
- package/src/themes/five/src/components/ProductItemAccordion/styles.js +26 -0
- package/src/themes/five/src/components/ProductShare/ProductCopyURL.js +53 -0
- package/src/themes/five/src/components/ProductShare/index.js +104 -0
- package/src/themes/five/src/components/ProductShare/styles.js +165 -0
- package/src/themes/five/src/components/RenderProductsLayout/index.js +2 -8
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +5 -0
- package/src/themes/five/src/components/ReviewProduct/index.js +10 -3
- package/src/themes/five/src/components/ReviewProduct/styles.js +43 -0
- package/src/themes/five/src/components/SearchProducts/index.js +16 -3
- package/src/themes/five/src/components/SignUpApproval/index.js +8 -7
- package/src/themes/five/src/components/SignUpBusiness/layouts/NewSignUpBusiness/index.js +26 -2
- package/src/themes/five/src/components/SignUpBusiness/layouts/OldSignUpBusiness/index.js +26 -2
- package/src/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/index.js +26 -2
- package/src/themes/five/src/components/SignUpDriver/layouts/OldSignUpDriver/index.js +26 -2
- package/src/themes/five/src/components/SignUpForm/index.js +26 -1
- package/src/themes/five/src/components/SignUpForm/styles.js +9 -2
- package/src/themes/five/src/components/SingleProductCard/index.js +26 -1
- package/src/themes/five/src/components/UserPopover/index.js +1 -1
- package/src/themes/five/src/components/UserProfileForm/index.js +83 -5
- package/src/themes/five/src/components/UserProfileForm/styles.js +49 -0
- package/src/utils/index.js +36 -9
- package/template/app.js +12 -11
- package/template/assets/images/amex.svg +30 -0
- package/template/assets/images/diners.svg +16 -0
- package/template/assets/images/discover.svg +17 -0
- package/template/assets/images/jcb.svg +33 -0
- package/template/assets/images/unionpay.svg +25 -0
- package/template/components/HelmetTags/index.js +1 -1
- package/template/components/ScrollToTop/index.js +7 -5
- package/template/pages/BusinessProductsList/index.js +8 -4
- package/template/pages/MyOrders/index.js +4 -1
- package/template/pages/OrderDetails/index.js +11 -2
- package/template/pages/Profile/index.js +8 -2
|
@@ -12,9 +12,38 @@ export const InnerHeader = styled.div`
|
|
|
12
12
|
width: 100%;
|
|
13
13
|
color: #FFF;
|
|
14
14
|
justify-content: space-between;
|
|
15
|
-
|
|
16
|
-
margin: 15px auto;
|
|
15
|
+
margin: 15px 0;
|
|
17
16
|
align-items: center;
|
|
17
|
+
|
|
18
|
+
#left-side {
|
|
19
|
+
width: 20%;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
}
|
|
22
|
+
#right-side {
|
|
23
|
+
width: 20%;
|
|
24
|
+
justify-content: flex-end;
|
|
25
|
+
}
|
|
26
|
+
#center-side {
|
|
27
|
+
width: calc(60% - 30px);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (min-width: 1024px) {
|
|
31
|
+
#center-side {
|
|
32
|
+
width: calc(60% - 140px);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media (min-width: 1200px) {
|
|
37
|
+
#center-side {
|
|
38
|
+
width: calc(60% - 200px);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media (min-width: 1500px) {
|
|
43
|
+
#center-side {
|
|
44
|
+
width: calc(60% - 260px);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
18
47
|
`
|
|
19
48
|
|
|
20
49
|
export const LogoHeader = styled.div`
|
|
@@ -75,7 +104,7 @@ export const Menu = styled.div`
|
|
|
75
104
|
|
|
76
105
|
#select-input {
|
|
77
106
|
border-radius: 7.6px;
|
|
78
|
-
|
|
107
|
+
|
|
79
108
|
#list {
|
|
80
109
|
border-radius: 7.6px;
|
|
81
110
|
}
|
|
@@ -85,7 +114,7 @@ export const Menu = styled.div`
|
|
|
85
114
|
height: 40px;
|
|
86
115
|
border-color: #CCC;
|
|
87
116
|
background-color: #CCC !important;
|
|
88
|
-
|
|
117
|
+
|
|
89
118
|
svg {
|
|
90
119
|
font-size: 16px;
|
|
91
120
|
}
|
|
@@ -126,7 +155,7 @@ export const Menu = styled.div`
|
|
|
126
155
|
padding: 0 20px;
|
|
127
156
|
margin: 0 70px;
|
|
128
157
|
}
|
|
129
|
-
|
|
158
|
+
|
|
130
159
|
@media (min-width: 1200px) {
|
|
131
160
|
padding: 0 30px;
|
|
132
161
|
margin: 0 100px;
|
|
@@ -275,10 +304,21 @@ export const AddressMenu = styled.div`
|
|
|
275
304
|
align-items: center;
|
|
276
305
|
position: relative;
|
|
277
306
|
|
|
307
|
+
span {
|
|
308
|
+
width: 85%;
|
|
309
|
+
p {
|
|
310
|
+
margin: 0;
|
|
311
|
+
padding: 0;
|
|
312
|
+
text-overflow: ellipsis;
|
|
313
|
+
white-space: nowrap;
|
|
314
|
+
overflow: hidden;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
278
318
|
${({ isCustomerMode }) => isCustomerMode ? css`
|
|
279
|
-
|
|
319
|
+
flex: 0.8;
|
|
280
320
|
` : css`
|
|
281
|
-
width:
|
|
321
|
+
width: 50%;
|
|
282
322
|
`}
|
|
283
323
|
|
|
284
324
|
svg {
|
|
@@ -297,7 +337,7 @@ export const AddressMenu = styled.div`
|
|
|
297
337
|
}
|
|
298
338
|
@media (min-width: 820px) {
|
|
299
339
|
${({ isCustomerMode }) => !isCustomerMode && css`
|
|
300
|
-
width:
|
|
340
|
+
width: 50%;
|
|
301
341
|
`}
|
|
302
342
|
}
|
|
303
343
|
`
|
|
@@ -339,6 +379,7 @@ export const FarAwayMessage = styled.div`
|
|
|
339
379
|
position: absolute;
|
|
340
380
|
display: flex;
|
|
341
381
|
align-items: center;
|
|
382
|
+
z-index: 2000;
|
|
342
383
|
top: 100%;
|
|
343
384
|
background: ${props => props.theme.colors.warning100};
|
|
344
385
|
border: 1px solid ${props => props.theme.colors.warning500};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { useConfig } from 'ordering-components-external'
|
|
3
2
|
import { OriginalHomeHero } from './layouts/OriginalHomeHero'
|
|
4
3
|
import { RedHomeHero } from './layouts/RedHomeHero'
|
|
5
4
|
import { StarbucksHomeHero } from './layouts/StarbucksHomeHero'
|
|
6
5
|
|
|
7
6
|
export const HomeHero = (props) => {
|
|
8
|
-
const [{ configs }] = useConfig()
|
|
9
|
-
|
|
10
|
-
// *****************************
|
|
11
|
-
// HomeLayout = configs
|
|
12
7
|
const HomeLayoutConfig = {
|
|
13
8
|
homepage_settings: {
|
|
14
9
|
layout: 'original', // 'original', 'starbucks', 'red'
|
|
@@ -17,7 +12,6 @@ export const HomeHero = (props) => {
|
|
|
17
12
|
}
|
|
18
13
|
const layout = HomeLayoutConfig?.homepage_settings?.layout !== undefined
|
|
19
14
|
? HomeLayoutConfig?.homepage_settings?.layout : 'original'
|
|
20
|
-
// *****************************
|
|
21
15
|
|
|
22
16
|
const homeLayoutProps = {
|
|
23
17
|
...props,
|
|
@@ -8,23 +8,33 @@ import {
|
|
|
8
8
|
Title,
|
|
9
9
|
Slogan,
|
|
10
10
|
WrapInput,
|
|
11
|
-
|
|
11
|
+
LogoWrapper,
|
|
12
|
+
UseAccount,
|
|
13
|
+
HeroContent,
|
|
14
|
+
SectionHeader
|
|
12
15
|
} from './styles'
|
|
13
16
|
|
|
14
17
|
import { Modal } from '../../../Modal'
|
|
15
18
|
import { Button } from '../../../../styles/Buttons'
|
|
16
19
|
import { AddressForm } from '../../../AddressForm'
|
|
20
|
+
import { LoginForm } from '../../../LoginForm'
|
|
21
|
+
import { SignUpForm } from '../../../SignUpForm'
|
|
22
|
+
import { ForgotPasswordForm } from '../../../ForgotPasswordForm'
|
|
17
23
|
import { AddressList } from '../../../AddressList'
|
|
24
|
+
import { useWindowSize } from '../../../../../../../hooks/useWindowSize'
|
|
18
25
|
|
|
19
26
|
export const OriginalHomeHero = (props) => {
|
|
20
|
-
const { onFindBusiness
|
|
27
|
+
const { onFindBusiness } = props
|
|
21
28
|
|
|
22
|
-
const [{ auth }] = useSession()
|
|
29
|
+
const [{ auth }, { login }] = useSession()
|
|
23
30
|
const [orderState] = useOrder()
|
|
24
31
|
const [, t] = useLanguage()
|
|
25
32
|
const [modals, setModals] = useState({ listOpen: false, formOpen: false })
|
|
26
33
|
const theme = useTheme()
|
|
27
34
|
const userCustomer = parseInt(window.localStorage.getItem('user-customer'))
|
|
35
|
+
const windowSize = useWindowSize()
|
|
36
|
+
const [authModalOpen, setAuthModalOpen] = useState(false)
|
|
37
|
+
const [modalPageToShow, setModalPageToShow] = useState(null)
|
|
28
38
|
|
|
29
39
|
const handleFindBusinesses = () => {
|
|
30
40
|
if (!orderState?.options?.address?.location) {
|
|
@@ -43,71 +53,164 @@ export const OriginalHomeHero = (props) => {
|
|
|
43
53
|
}
|
|
44
54
|
}
|
|
45
55
|
|
|
56
|
+
const handleOpenLoginSignUp = (index) => {
|
|
57
|
+
setModalPageToShow(index)
|
|
58
|
+
setAuthModalOpen(true)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const handleCustomModalClick = (e, { page }) => {
|
|
62
|
+
e.preventDefault()
|
|
63
|
+
setModalPageToShow(page)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const closeAuthModal = () => {
|
|
67
|
+
setAuthModalOpen(false)
|
|
68
|
+
setModalPageToShow(null)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const handleSuccessLogin = (user) => {
|
|
72
|
+
if (user) {
|
|
73
|
+
closeAuthModal()
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const handleSuccessSignup = (user) => {
|
|
78
|
+
login({
|
|
79
|
+
user,
|
|
80
|
+
token: user?.session?.access_token
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
|
|
46
84
|
useEffect(() => {
|
|
47
85
|
return () => setModals({ listOpen: false, formOpen: false })
|
|
48
86
|
}, [])
|
|
49
87
|
|
|
50
88
|
return (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
<HeroContainer bgimage={theme.images?.general?.homeHero} mb={!auth && '30vh'}>
|
|
90
|
+
<ContentWrapper>
|
|
91
|
+
{windowSize.width < 576 && (
|
|
92
|
+
<LogoWrapper>
|
|
93
|
+
<img alt='Logotype' src={theme?.images?.logos?.logotypeInvert} loading='lazy' />
|
|
94
|
+
</LogoWrapper>
|
|
95
|
+
)}
|
|
96
|
+
<HeroContent>
|
|
97
|
+
<Title>{t('TITLE_HOME', theme?.defaultLanguages?.TITLE_HOME || 'All We need is Food.')}</Title>
|
|
98
|
+
<Slogan>{t('SUBTITLE_HOME', theme?.defaultLanguages?.SUBTITLE_HOME || 'Let\'s start to order food now')}</Slogan>
|
|
99
|
+
<WrapInput onClick={handleAddressInput} withIcon>
|
|
100
|
+
<HiOutlineLocationMarker />
|
|
101
|
+
<p>
|
|
102
|
+
{orderState?.options?.address?.address || t('WHERE_DO_WE_DELIVERY', theme?.defaultLanguages?.WHERE_DO_WE_DELIVERY || 'Where do we delivery?')}
|
|
103
|
+
</p>
|
|
104
|
+
</WrapInput>
|
|
105
|
+
|
|
106
|
+
<Button
|
|
107
|
+
color='primary'
|
|
108
|
+
name='find-business'
|
|
109
|
+
onClick={handleFindBusinesses}
|
|
110
|
+
>
|
|
111
|
+
{t('FIND_BUSINESSES', theme?.defaultLanguages?.FIND_BUSINESSES || 'Find businesses')}
|
|
112
|
+
</Button>
|
|
113
|
+
</HeroContent>
|
|
114
|
+
</ContentWrapper>
|
|
115
|
+
|
|
116
|
+
{windowSize.width < 576 && !auth && (
|
|
117
|
+
<UseAccount>
|
|
118
|
+
<SectionHeader>
|
|
119
|
+
{t('YOUR_ACCOUNT', 'Use your account')}
|
|
120
|
+
</SectionHeader>
|
|
121
|
+
<Button color='primary' onClick={() => handleOpenLoginSignUp('login')}>login</Button>
|
|
122
|
+
<Button color='primary' onClick={() => handleOpenLoginSignUp('signup')}>signUp</Button>
|
|
123
|
+
</UseAccount>
|
|
124
|
+
)}
|
|
125
|
+
|
|
126
|
+
<Modal
|
|
127
|
+
title={t('WHERE_DO_WE_DELIVERY', theme?.defaultLanguages?.WHERE_DO_WE_DELIVERY || 'Where do we delivery?')}
|
|
128
|
+
open={modals.formOpen}
|
|
129
|
+
onClose={() => setModals({ ...modals, formOpen: false })}
|
|
130
|
+
>
|
|
131
|
+
<AddressForm
|
|
132
|
+
useValidationFileds
|
|
133
|
+
address={orderState?.options?.address || {}}
|
|
81
134
|
onClose={() => setModals({ ...modals, formOpen: false })}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
135
|
+
onSaveAddress={() => setModals({ ...modals, formOpen: false })}
|
|
136
|
+
onCancel={() => setModals({ ...modals, formOpen: false })}
|
|
137
|
+
/>
|
|
138
|
+
</Modal>
|
|
139
|
+
<Modal
|
|
140
|
+
title={t('WHERE_DO_WE_DELIVERY', theme?.defaultLanguages?.WHERE_DO_WE_DELIVERY || 'Where do we delivery?')}
|
|
141
|
+
open={modals.listOpen}
|
|
142
|
+
width='70%'
|
|
143
|
+
onClose={() => setModals({ ...modals, listOpen: false })}
|
|
144
|
+
>
|
|
145
|
+
<AddressList
|
|
146
|
+
isModal
|
|
147
|
+
changeOrderAddressWithDefault
|
|
148
|
+
userId={isNaN(userCustomer) ? null : userCustomer}
|
|
149
|
+
onCancel={() => setModals({ ...modals, listOpen: false })}
|
|
150
|
+
onAccept={() => handleFindBusinesses()}
|
|
151
|
+
/>
|
|
152
|
+
</Modal>
|
|
153
|
+
{authModalOpen && !auth && (
|
|
91
154
|
<Modal
|
|
92
|
-
open={
|
|
93
|
-
|
|
94
|
-
|
|
155
|
+
open={authModalOpen}
|
|
156
|
+
onRemove={() => closeAuthModal()}
|
|
157
|
+
width='50%'
|
|
158
|
+
authModal
|
|
95
159
|
>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
160
|
+
{modalPageToShow === 'login' && (
|
|
161
|
+
<LoginForm
|
|
162
|
+
handleSuccessLogin={handleSuccessLogin}
|
|
163
|
+
elementLinkToSignup={
|
|
164
|
+
<a
|
|
165
|
+
onClick={
|
|
166
|
+
(e) => handleCustomModalClick(e, { page: 'signup' })
|
|
167
|
+
} href='#'
|
|
168
|
+
>{t('CREATE_ACCOUNT', theme?.defaultLanguages?.CREATE_ACCOUNT || 'Create account')}
|
|
169
|
+
</a>
|
|
170
|
+
}
|
|
171
|
+
elementLinkToForgotPassword={
|
|
172
|
+
<a
|
|
173
|
+
onClick={
|
|
174
|
+
(e) => handleCustomModalClick(e, { page: 'forgotpassword' })
|
|
175
|
+
} href='#'
|
|
176
|
+
>{t('RESET_PASSWORD', theme?.defaultLanguages?.RESET_PASSWORD || 'Reset password')}
|
|
177
|
+
</a>
|
|
178
|
+
}
|
|
179
|
+
useLoginByCellphone
|
|
180
|
+
isPopup
|
|
181
|
+
/>
|
|
182
|
+
)}
|
|
183
|
+
{modalPageToShow === 'signup' && (
|
|
184
|
+
<SignUpForm
|
|
185
|
+
elementLinkToLogin={
|
|
186
|
+
<a
|
|
187
|
+
onClick={
|
|
188
|
+
(e) => handleCustomModalClick(e, { page: 'login' })
|
|
189
|
+
} href='#'
|
|
190
|
+
>{t('LOGIN', theme?.defaultLanguages?.LOGIN || 'Login')}
|
|
191
|
+
</a>
|
|
192
|
+
}
|
|
193
|
+
useLoginByCellphone
|
|
194
|
+
useChekoutFileds
|
|
195
|
+
handleSuccessSignup={handleSuccessSignup}
|
|
196
|
+
isPopup
|
|
197
|
+
/>
|
|
198
|
+
)}
|
|
199
|
+
{modalPageToShow === 'forgotpassword' && (
|
|
200
|
+
<ForgotPasswordForm
|
|
201
|
+
elementLinkToLogin={
|
|
202
|
+
<a
|
|
203
|
+
onClick={
|
|
204
|
+
(e) => handleCustomModalClick(e, { page: 'login' })
|
|
205
|
+
} href='#'
|
|
206
|
+
>{t('LOGIN', theme?.defaultLanguages?.LOGIN || 'Login')}
|
|
207
|
+
</a>
|
|
208
|
+
}
|
|
209
|
+
isPopup
|
|
210
|
+
/>
|
|
211
|
+
)}
|
|
103
212
|
</Modal>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<AfterComponent key={i} {...props} />))}
|
|
107
|
-
{props.afterElements?.map((AfterElement, i) => (
|
|
108
|
-
<React.Fragment key={i}>
|
|
109
|
-
{AfterElement}
|
|
110
|
-
</React.Fragment>))}
|
|
111
|
-
</>
|
|
213
|
+
)}
|
|
214
|
+
</HeroContainer>
|
|
112
215
|
)
|
|
113
216
|
}
|