Skip to content

Commit 6eb1c21

Browse files
authored
Merge pull request #238 from w3bdesign/development
Development
2 parents e36b9af + 3c3d60c commit 6eb1c21

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

pages/produkt/[slug].js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,10 @@ const Produkt = ({ product }) => {
3333

3434
export 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 {

utils/const/GQL_MUTATIONS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {gql} from '@apollo/client';
1+
import { gql } from '@apollo/client';
22

33
export const ADD_TO_CART = gql`
44
mutation($input: AddToCartInput!) {

utils/const/GQL_QUERIES.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {gql} from '@apollo/client';
1+
import { gql } from '@apollo/client';
22

33
export const GET_SINGLE_PRODUCT = gql`
44
query Product($id: ID!) {

0 commit comments

Comments
 (0)