Skip to content

Commit

Permalink
add remaining statc props
Browse files Browse the repository at this point in the history
Signed-off-by: Janus Reith <mail@janusreith.de>
  • Loading branch information
Janus Reith authored and janus-reith committed May 19, 2020
1 parent 9294d5b commit cfeccf9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pages/profile/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import withAddressBook from "containers/address/withAddressBook";
import { withApollo } from "lib/apollo/withApollo";
import ErrorPage from "../_error";

import fetchPrimaryShop from "staticUtils/shop/fetchPrimaryShop";
import fetchAllTags from "staticUtils/tags/fetchAllTags";

const styles = (theme) => ({
accountProfileInfoContainer: {
marginBottom: theme.spacing(4)
Expand Down Expand Up @@ -70,4 +73,13 @@ class ProfileAddressBookPage extends Component {
}
}

export async function getStaticProps() {
return {
props: {
...await fetchPrimaryShop("en"),
...await fetchAllTags()
}
};
}

export default withApollo()(withStyles(styles)(withAddressBook(inject("authStore", "uiStore")(ProfileAddressBookPage))));
12 changes: 12 additions & 0 deletions pages/profile/orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import withAddressBook from "containers/address/withAddressBook";
import { withApollo } from "lib/apollo/withApollo";
import ErrorPage from "../_error";

import fetchPrimaryShop from "staticUtils/shop/fetchPrimaryShop";
import fetchAllTags from "staticUtils/tags/fetchAllTags";

const styles = (theme) => ({
accountProfileInfoContainer: {
marginBottom: theme.spacing(4)
Expand Down Expand Up @@ -70,4 +73,13 @@ class ProfileOrdersPage extends Component {
}
}

export async function getStaticProps() {
return {
props: {
...await fetchPrimaryShop("en"),
...await fetchAllTags()
}
};
}

export default withApollo()(withStyles(styles)(withAddressBook(inject("authStore", "uiStore")(ProfileOrdersPage))));

0 comments on commit cfeccf9

Please sign in to comment.