File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed
Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,10 @@ const Produkt = ({ product }) => {
3333
3434export default withRouter ( Produkt ) ;
3535
36- export async function getServerSideProps ( context ) {
37- let {
38- query : { slug, productId } ,
39- } = context ;
40-
41- const id = productId ;
42-
36+ export async function getServerSideProps ( { query : { productId } } ) {
4337 const res = await client . query ( {
4438 query : GET_SINGLE_PRODUCT ,
45- variables : { id } ,
39+ variables : { productId } ,
4640 } ) ;
4741
4842 return {
Original file line number Diff line number Diff line change 1- import { gql } from '@apollo/client' ;
1+ import { gql } from '@apollo/client' ;
22
33export const ADD_TO_CART = gql `
44 mutation($input: AddToCartInput!) {
Original file line number Diff line number Diff line change 1- import { gql } from '@apollo/client' ;
1+ import { gql } from '@apollo/client' ;
22
33export const GET_SINGLE_PRODUCT = gql `
44 query Product($id: ID!) {
You can’t perform that action at this time.
0 commit comments