diff --git a/package-lock.json b/package-lock.json
index a209699..88bf2af 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,6 +16,7 @@
"draft-js": "^0.11.7",
"jalaali-js": "^1.2.3",
"jalali-moment": "^3.3.10",
+ "leaflet": "^1.7.1",
"lord-icon-element": "^3.3.3",
"lottie-web": "^5.8.1",
"mapir-react-component": "^2.0.1",
@@ -28,6 +29,7 @@
"react-dropzone": "^11.4.2",
"react-icons": "^4.3.1",
"react-indiana-drag-scroll": "^2.1.0",
+ "react-leaflet": "^3.2.5",
"react-multi-date-picker": "^3.3.0",
"react-redux": "^7.2.6",
"react-router-dom": "^6.2.1",
@@ -2833,6 +2835,16 @@
"node": ">= 8"
}
},
+ "node_modules/@react-leaflet/core": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-1.1.1.tgz",
+ "integrity": "sha512-7PGLWa9MZ5x/cWy8EH2VzI4T8q5WpuHbixzCDXqixP/WyqwIrg5NDUPgYuFnB4IEIZF+6nA265mYzswFo/h1Pw==",
+ "peerDependencies": {
+ "leaflet": "^1.7.1",
+ "react": "^17.0.1",
+ "react-dom": "^17.0.1"
+ }
+ },
"node_modules/@react-pdf-viewer/core": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@react-pdf-viewer/core/-/core-3.1.2.tgz",
@@ -11403,6 +11415,11 @@
"language-subtag-registry": "~0.3.2"
}
},
+ "node_modules/leaflet": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.7.1.tgz",
+ "integrity": "sha512-/xwPEBidtg69Q3HlqPdU3DnrXQOvQU/CCHA1tcDQVzOwm91YMYaILjNp7L4Eaw5Z4sOYdbBz6koWyibppd8Zqw=="
+ },
"node_modules/leven": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
@@ -14436,6 +14453,19 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
},
+ "node_modules/react-leaflet": {
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/react-leaflet/-/react-leaflet-3.2.5.tgz",
+ "integrity": "sha512-Z3KZ+4SijsRbbrt2I1a3ZDY6+V6Pm91eYTdxTN18G6IOkFRsJo1BuSPLFnyFrlF3WDjQFPEcTPkEgD1VEeAoBg==",
+ "dependencies": {
+ "@react-leaflet/core": "^1.1.1"
+ },
+ "peerDependencies": {
+ "leaflet": "^1.7.1",
+ "react": "^17.0.1",
+ "react-dom": "^17.0.1"
+ }
+ },
"node_modules/react-mapbox-gl": {
"version": "4.8.6",
"resolved": "https://registry.npmjs.org/react-mapbox-gl/-/react-mapbox-gl-4.8.6.tgz",
@@ -19533,6 +19563,12 @@
}
}
},
+ "@react-leaflet/core": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-1.1.1.tgz",
+ "integrity": "sha512-7PGLWa9MZ5x/cWy8EH2VzI4T8q5WpuHbixzCDXqixP/WyqwIrg5NDUPgYuFnB4IEIZF+6nA265mYzswFo/h1Pw==",
+ "requires": {}
+ },
"@react-pdf-viewer/core": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@react-pdf-viewer/core/-/core-3.1.2.tgz",
@@ -25844,6 +25880,11 @@
"language-subtag-registry": "~0.3.2"
}
},
+ "leaflet": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.7.1.tgz",
+ "integrity": "sha512-/xwPEBidtg69Q3HlqPdU3DnrXQOvQU/CCHA1tcDQVzOwm91YMYaILjNp7L4Eaw5Z4sOYdbBz6koWyibppd8Zqw=="
+ },
"leven": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
@@ -27910,6 +27951,14 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
},
+ "react-leaflet": {
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/react-leaflet/-/react-leaflet-3.2.5.tgz",
+ "integrity": "sha512-Z3KZ+4SijsRbbrt2I1a3ZDY6+V6Pm91eYTdxTN18G6IOkFRsJo1BuSPLFnyFrlF3WDjQFPEcTPkEgD1VEeAoBg==",
+ "requires": {
+ "@react-leaflet/core": "^1.1.1"
+ }
+ },
"react-mapbox-gl": {
"version": "4.8.6",
"resolved": "https://registry.npmjs.org/react-mapbox-gl/-/react-mapbox-gl-4.8.6.tgz",
diff --git a/package.json b/package.json
index 5526417..c1b6087 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
"draft-js": "^0.11.7",
"jalaali-js": "^1.2.3",
"jalali-moment": "^3.3.10",
+ "leaflet": "^1.7.1",
"lord-icon-element": "^3.3.3",
"lottie-web": "^5.8.1",
"mapir-react-component": "^2.0.1",
@@ -23,6 +24,7 @@
"react-dropzone": "^11.4.2",
"react-icons": "^4.3.1",
"react-indiana-drag-scroll": "^2.1.0",
+ "react-leaflet": "^3.2.5",
"react-multi-date-picker": "^3.3.0",
"react-redux": "^7.2.6",
"react-router-dom": "^6.2.1",
diff --git a/src/App.js b/src/App.js
index 51c7a5f..157ef7a 100644
--- a/src/App.js
+++ b/src/App.js
@@ -631,8 +631,11 @@ function App() {
}
}
}
- let loginStorage = localStorage.getItem('login')
- const [LOGIN,setLOGIN]=useState(true);
+ let loginStorage = localStorage.getItem('userData');
+ let userData = JSON.parse(loginStorage);
+ console.log(loginStorage == null);
+ console.log(userData)
+ const [LOGIN,setLOGIN]=useState(loginStorage == undefined ? false : true);
const activeLogin=()=>{
setLOGIN(true)
localStorage.setItem('login', true)
@@ -645,9 +648,9 @@ function App() {
localStorage.setItem('login', false)
};
- useEffect(() => {
- setLOGIN(true);
- }, [loginStorage])
+ // useEffect(() => {
+ // setLOGIN(true);
+ // }, [loginStorage])
//--UserFullInfo---------------------
const [ActiveUserFullInfo, setActiveUserFullInfo] = useState(false);
@@ -667,14 +670,17 @@ function App() {
Easily customizable.
+