This repository has been archived by the owner on Jul 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #615 from mirumee/refactor/change-app-directory-st…
…ructure Change main app directories structure
- Loading branch information
Showing
27 changed files
with
109 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import * as React from "react"; | ||
import { Route, Switch } from "react-router-dom"; | ||
|
||
import { CheckoutLogin, NotFound } from "../../components"; | ||
import UserAccount, * as accountPaths from "../../userAccount/routes"; | ||
import { OrderDetails } from "../../userAccount/views"; | ||
import { Account, AccountConfirm } from "../../views/Account"; | ||
import { ArticlePage } from "../../views/Article"; | ||
import { CartPage } from "../../views/Cart"; | ||
import { CategoryPage } from "../../views/Category"; | ||
import { CollectionPage } from "../../views/Collection"; | ||
import { HomePage } from "../../views/Home"; | ||
import OrderConfirmation from "../../views/OrderConfirmation/View"; | ||
import { ProductPage } from "../../views/Product"; | ||
import { SearchPage } from "../../views/Search"; | ||
|
||
import { PasswordReset } from "../../@next/components/views"; | ||
|
||
import * as paths from "./paths"; | ||
|
||
export const Routes: React.FC = () => ( | ||
<Switch> | ||
<Route exact path={paths.baseUrl} component={HomePage} /> | ||
<Route path={paths.searchUrl} component={SearchPage} /> | ||
<Route path={paths.categoryUrl} component={CategoryPage} /> | ||
<Route path={paths.collectionUrl} component={CollectionPage} /> | ||
<Route path={paths.productUrl} component={ProductPage} /> | ||
<Route path={paths.cartUrl} component={CartPage} /> | ||
<Route path={paths.checkoutLoginUrl} component={CheckoutLogin} /> | ||
<Route path={paths.pageUrl} component={ArticlePage} /> | ||
<Route path={accountPaths.baseUrl} component={UserAccount} /> | ||
<Route path={accountPaths.userOrderDetailsUrl} component={OrderDetails} /> | ||
<Route path={paths.guestOrderDetailsUrl} component={OrderDetails} /> | ||
<Route path={paths.orderConfirmationUrl} component={OrderConfirmation} /> | ||
<Route path={paths.accountUrl} component={Account} /> | ||
<Route path={paths.accountConfirmUrl} component={AccountConfirm} /> | ||
<Route path={paths.orderHistoryUrl} component={Account} /> | ||
<Route path={paths.addressBookUrl} component={Account} /> | ||
<Route path={paths.paymentOptionsUrl} component={Account} /> | ||
<Route path={paths.passwordResetUrl} component={PasswordReset} /> | ||
<Route component={NotFound} /> | ||
</Switch> | ||
); | ||
|
||
export default Routes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./paths"; | ||
export * from "./AppRoutes"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const slugUrl = ":slug([a-z-0-9]+)/:id([0-9]+)/"; | ||
export const baseUrl = "/"; | ||
export const searchUrl = `${baseUrl}search/`; | ||
export const categoryUrl = `${baseUrl}category/${slugUrl}`; | ||
export const collectionUrl = `${baseUrl}collection/${slugUrl}`; | ||
export const productUrl = `${baseUrl}product/${slugUrl}`; | ||
export const cartUrl = `${baseUrl}cart/:token?/`; | ||
export const checkoutLoginUrl = `${baseUrl}login/`; | ||
export const pageUrl = `${baseUrl}page/:slug/`; | ||
export const guestOrderDetailsUrl = `/order-history/:token/`; | ||
export const orderConfirmationUrl = `${baseUrl}order-confirmation/`; | ||
export const accountUrl = `${baseUrl}account/`; | ||
export const accountConfirmUrl = `${baseUrl}account-confirm/`; | ||
export const orderHistoryUrl = `${baseUrl}order-history/`; | ||
export const addressBookUrl = `${baseUrl}address-book/`; | ||
export const paymentOptionsUrl = `${baseUrl}payment-options/`; | ||
export const passwordResetUrl = `${baseUrl}reset-password/`; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as CheckoutApp } from "./CheckoutApp"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.