diff --git a/pages/[lang]/cart.js b/pages/[lang]/cart.js index 2f3489fda6..87720fedbb 100644 --- a/pages/[lang]/cart.js +++ b/pages/[lang]/cart.js @@ -177,12 +177,12 @@ class CartPage extends Component { } /** - * Static props for the cart route + * Server props for the cart route * * @param {String} lang - the shop's language * @returns {Object} props */ -export async function getStaticProps({ params: { lang } }) { +export async function getServerSideProps({ params: { lang } }) { return { props: { ...await fetchPrimaryShop(lang), @@ -191,16 +191,4 @@ export async function getStaticProps({ params: { lang } }) { }; } -/** - * Static paths for the cart route - * - * @returns {Object} paths - */ -export async function getStaticPaths() { - return { - paths: locales.map((locale) => ({ params: { lang: locale } })), - fallback: false - }; -} - export default withApollo()(withStyles(styles)(withCart(inject("uiStore")(CartPage))));