-
Notifications
You must be signed in to change notification settings - Fork 212
Expand file tree
/
Copy pathindex.tsx
More file actions
80 lines (73 loc) · 2.64 KB
/
index.tsx
File metadata and controls
80 lines (73 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
/*
* Copyright (c) 2024, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
// Third-Party
import React from 'react'
import loadable from '@loadable/component'
// Components
import {Skeleton} from '@chakra-ui/react'
// Page fallback
const fallback = <Skeleton height="75vh" width="100%" />
// Page Loadables
const Account = loadable(() => import('overridable!./account'), {fallback})
const Cart = loadable(() => import('overridable!./cart'), {fallback})
const Checkout = loadable(() => import('overridable!./checkout'), {
fallback
})
// const CheckoutConfirmation = loadable(() => import('overridable!./checkout/confirmation'), {
// fallback
// })
const Home = loadable(() => import('overridable!./home'), {fallback})
const Login = loadable(() => import('overridable!./login'), {fallback})
const Registration = loadable(() => import('overridable!./registration'), {
fallback
})
// const ResetPassword = loadable(() => import('overridable!./reset-password'), {fallback})
const LoginRedirect = loadable(() => import('overridable!./login-redirect'), {fallback})
const ProductDetail = loadable(() => import('overridable!./product-detail'), {fallback})
const ProductList = loadable(() => import('overridable!./product-list'), {
fallback
})
const SocialLoginRedirect = loadable(() => import('overridable!./social-login-redirect'), {
fallback
})
const PageNotFound = loadable(() => import('overridable!./page-not-found'), {
fallback
})
// const Wishlist = loadable(() => import('overridable!./account/wishlist'), {
// fallback
// })
// NOTE: Apply "displayName" for easy filtering. This is a widely use pattern to allow filtering without
// triggering the loadable logic. Please note that we want to keep these in aligned with name in the
// component itself.
Account.displayName = 'Account'
// Cart.displayName = 'Cart'
Checkout.displayName = 'Checkout'
// CheckoutConfirmation.displayName = 'CheckoutConfirmation'
Home.displayName = 'Home'
Login.displayName = 'Login'
Registration.displayName = 'Registration'
// ResetPassword.displayName = 'ResetPassword'
LoginRedirect.displayName = 'LoginRedirect'
ProductDetail.displayName = 'ProductDetail'
ProductList.displayName = 'ProductList'
SocialLoginRedirect.displayName = 'SocialLoginRedirect'
PageNotFound.displayName = 'PageNotFound'
export {
Account,
Cart,
Checkout,
// CheckoutConfirmation,
Home,
Login,
Registration,
// ResetPassword,
LoginRedirect,
ProductDetail,
ProductList,
PageNotFound,
SocialLoginRedirect
}