Skip to content

Commit 2665211

Browse files
author
vivek-gofynd
committed
Fix critical issues and formating changes
1 parent 39c0258 commit 2665211

File tree

11 files changed

+106
-123
lines changed

11 files changed

+106
-123
lines changed

App.jsx

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,11 @@
1-
import React from "react";
21
import { Home } from "./pages/Home";
3-
4-
const globalStyles = `
5-
html {
6-
height: 100%;
7-
width: 100%;
8-
font-size: 8px;
9-
}
10-
11-
body {
12-
margin: 0;
13-
font-family: 'Inter', sans-serif;
14-
background-color: #f8f8f8 !important;
15-
width: 100%;
16-
height: 100%;
17-
-webkit-font-smoothing: antialiased;
18-
}
19-
20-
.root {
21-
font-family: 'Inter', sans-serif;
22-
}
23-
24-
/* Common utility classes */
25-
.flex-column {
26-
display: flex;
27-
flex-direction: column;
28-
}
29-
30-
.flex-row {
31-
display: flex;
32-
flex-direction: row;
33-
align-items: center;
34-
gap: 10px;
35-
}
36-
37-
.mr-r-12 {
38-
margin-right: 12px;
39-
}
40-
41-
.cl-RoyalBlue {
42-
color: #2e31be;
43-
margin-left: 2px;
44-
}
45-
46-
.loader {
47-
display: flex;
48-
flex-direction: column;
49-
justify-content: center;
50-
align-items: center;
51-
}
52-
53-
.loader img {
54-
height: 100px;
55-
}
56-
`;
2+
import "./pages/style/global.css";
573

584
function App() {
595
return (
60-
<>
61-
<style>{globalStyles}</style>
62-
<div className="root">
63-
<Home />
64-
</div>
65-
</>
6+
<div className="root">
7+
<Home />
8+
</div>
669
);
6710
}
6811

index.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import router from "./router";
66
const root = ReactDOM.createRoot(document.getElementById("root"));
77
root.render(
88
<React.StrictMode>
9-
<RouterProvider router={router} />
9+
<RouterProvider
10+
router={router}
11+
future={{
12+
v7_startTransition: true,
13+
}}
14+
/>
1015
</React.StrictMode>
1116
);

package-lock.json

Lines changed: 14 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pages/Home.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React, { useState, useEffect } from "react";
22
import { useParams } from 'react-router-dom';
33
import "./style/home.css";
4-
import greenDot from "../public/assets/green-dot.svg";
5-
import grayDot from "../public/assets/grey-dot.svg";
6-
import DEFAULT_NO_IMAGE from "../public/assets/default_icon_listing.png";
7-
import loaderGif from "../public/assets/loader.gif";
4+
import greenDot from "../assets/green-dot.svg";
5+
import grayDot from "../assets/grey-dot.svg";
6+
import DEFAULT_NO_IMAGE from "../assets/default_icon_listing.png";
7+
import loaderGif from "../assets/loader.gif";
88
import axios from "axios";
99
import urlJoin from "url-join";
1010

@@ -20,7 +20,7 @@ export const Home = () => {
2020

2121
useEffect(() => {
2222
isApplicationLaunch() ? fetchApplicationProducts() : fetchProducts();
23-
}, [application_id]);
23+
}, [application_id, company_id]);
2424

2525
const fetchProducts = async () => {
2626
setPageLoading(true);

pages/style/global.css

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
html {
2+
height: 100%;
3+
width: 100%;
4+
font-size: 8px;
5+
}
6+
7+
body {
8+
margin: 0;
9+
font-family: 'Inter', sans-serif;
10+
background-color: #f8f8f8 !important;
11+
width: 100%;
12+
height: 100%;
13+
-webkit-font-smoothing: antialiased;
14+
}
15+
16+
@media (max-width: 768px) {
17+
body {
18+
-webkit-tap-highlight-color: transparent;
19+
}
20+
}
21+
22+
.root {
23+
font-family: 'Inter', sans-serif;
24+
}
25+
26+
/* Common utility classes */
27+
.flex-column {
28+
display: flex;
29+
flex-direction: column;
30+
}
31+
32+
.flex-row {
33+
display: flex;
34+
flex-direction: row;
35+
align-items: center;
36+
gap: 10px;
37+
}
38+
39+
.mr-r-12 {
40+
margin-right: 12px;
41+
}
42+
43+
.cl-RoyalBlue {
44+
color: #2e31be;
45+
margin-left: 2px;
46+
}
47+
48+
.loader {
49+
display: flex;
50+
flex-direction: column;
51+
justify-content: center;
52+
align-items: center;
53+
}
54+
55+
.loader img {
56+
height: 100px;
57+
}

pages/style/home.css

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
html {
2-
height: 100%;
3-
width: 100%;
4-
font-size: 8px;
5-
}
6-
7-
body {
8-
margin: 0;
9-
font-family: Inter;
10-
background-color: #f8f8f8 !important;
11-
width: 100%;
12-
height: 100%;
13-
@media (max-width: 768px) {
14-
-webkit-tap-highlight-color: transparent;
15-
}
16-
}
17-
181
.products-container {
192
position: relative;
203
box-sizing: border-box;
@@ -112,19 +95,3 @@ body {
11295
.product-category {
11396
font-size: 12px;
11497
}
115-
116-
.cl-RoyalBlue {
117-
color: #2e31be;
118-
margin-left: 2px;
119-
}
120-
121-
.loader {
122-
display: flex;
123-
flex-direction: column;
124-
justify-content: center;
125-
align-items: center;
126-
}
127-
128-
.loader img {
129-
height: 100px
130-
}

0 commit comments

Comments
 (0)