Skip to content

Commit dafe9a3

Browse files
authored
Merge pull request #13 from iamsharzil/new-category-url
updated category url
2 parents 69b5159 + 29fe2e9 commit dafe9a3

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

config/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export const SERVER = process.env.NEXT_PUBLIC_GRAPHQL_URL;
2+
export const CATEGORY_URL = process.env.NEXT_PUBLIC_CATEGORY_URL;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"next": "latest",
2828
"next-cookies": "^2.0.3",
2929
"nprogress": "^0.2.0",
30-
"react": "^16.12.0",
31-
"react-dom": "^16.12.0",
30+
"react": "^17.0.2",
31+
"react-dom": "^17.0.2",
3232
"react-fade-in": "^1.1.0",
3333
"react-hook-form": "^5.7.2",
3434
"react-lottie": "^1.2.3",
@@ -47,7 +47,7 @@
4747
"@types/react-dom": "^16.9.4",
4848
"@types/react-redux": "^7.1.9",
4949
"@types/redux-persist": "^4.3.1",
50-
"typescript": "3.7.3"
50+
"typescript": "^4.5.3"
5151
},
5252
"license": "ISC"
5353
}

pages/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { initializeApollo } from 'lib/apolloClient';
1010
import { CATEGORY_LIST_QUERY } from 'lib/graphql/category';
1111

1212
import { IProduct } from 'interfaces/product';
13+
import { CATEGORY_URL } from 'config';
1314

1415
const container = {
1516
hidden: { opacity: 1, scale: 0 },
@@ -26,7 +27,7 @@ const container = {
2627

2728
const IndexPage: NextPage = () => {
2829
const { loading, error, data } = useQuery(CATEGORY_LIST_QUERY, {
29-
variables: { eq: 'shop-now' },
30+
variables: { eq: CATEGORY_URL },
3031
notifyOnNetworkStatusChange: true,
3132
});
3233

@@ -64,7 +65,7 @@ export async function getStaticProps() {
6465
await apolloClient.query({
6566
query: CATEGORY_LIST_QUERY,
6667
// URL OF THE CATEGORY
67-
variables: { eq: 'shop-now' },
68+
variables: { eq: CATEGORY_URL },
6869
});
6970

7071
return {

tsconfig.json

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
{
22
"compilerOptions": {
33
"baseUrl": ".",
4-
"allowJs": true,
4+
"allowJs": false,
55
"alwaysStrict": true,
66
"esModuleInterop": true,
77
"forceConsistentCasingInFileNames": true,
88
"isolatedModules": true,
99
"jsx": "preserve",
10-
"lib": ["dom", "es2017"],
10+
"lib": [
11+
"dom",
12+
"es2017"
13+
],
1114
"module": "esnext",
1215
"moduleResolution": "node",
1316
"noEmit": true,
@@ -16,9 +19,15 @@
1619
"noUnusedParameters": true,
1720
"resolveJsonModule": true,
1821
"skipLibCheck": true,
19-
"strict": true,
20-
"target": "esnext"
22+
"strict": false,
23+
"target": "esnext",
24+
"incremental": true
2125
},
22-
"exclude": ["node_modules"],
23-
"include": ["**/*.ts", "**/*.tsx"]
26+
"exclude": [
27+
"node_modules"
28+
],
29+
"include": [
30+
"**/*.ts",
31+
"**/*.tsx"
32+
]
2433
}

0 commit comments

Comments
 (0)