File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import Router from "translations/i18nRouter";
1616import PageLoading from "components/PageLoading" ;
1717import { withApollo } from "lib/apollo/withApollo" ;
1818
19- import { locales } from "translations/config" ;
2019import fetchPrimaryShop from "staticUtils/shop/fetchPrimaryShop" ;
2120import fetchTranslations from "staticUtils/translations/fetchTranslations" ;
2221
@@ -177,12 +176,12 @@ class CartPage extends Component {
177176}
178177
179178/**
180- * Static props for the cart route
179+ * Server props for the cart route
181180 *
182181 * @param {String } lang - the shop's language
183182 * @returns {Object } props
184183 */
185- export async function getStaticProps ( { params : { lang } } ) {
184+ export async function getServerSideProps ( { params : { lang } } ) {
186185 return {
187186 props : {
188187 ...await fetchPrimaryShop ( lang ) ,
@@ -191,16 +190,4 @@ export async function getStaticProps({ params: { lang } }) {
191190 } ;
192191}
193192
194- /**
195- * Static paths for the cart route
196- *
197- * @returns {Object } paths
198- */
199- export async function getStaticPaths ( ) {
200- return {
201- paths : locales . map ( ( locale ) => ( { params : { lang : locale } } ) ) ,
202- fallback : false
203- } ;
204- }
205-
206193export default withApollo ( ) ( withStyles ( styles ) ( withCart ( inject ( "uiStore" ) ( CartPage ) ) ) ) ;
You can’t perform that action at this time.
0 commit comments