forked from Transparency/kgroad-frontend2
		
	fixed bug with latitude and longitude
This commit is contained in:
		
							parent
							
								
									006a1a7b7b
								
							
						
					
					
						commit
						c54131197e
					
				| @ -5,7 +5,7 @@ | |||||||
|   "scripts": { |   "scripts": { | ||||||
|     "dev": "next dev", |     "dev": "next dev", | ||||||
|     "build": "next build", |     "build": "next build", | ||||||
|     "start": "next start -p 8004", |     "start": "next start -p 3000", | ||||||
|     "lint": "next lint" |     "lint": "next lint" | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|  | |||||||
| @ -11,7 +11,6 @@ import React from "react"; | |||||||
| 
 | 
 | ||||||
| const Personal = async () => { | const Personal = async () => { | ||||||
|   const session = await getServerSession(authConfig); |   const session = await getServerSession(authConfig); | ||||||
|   console.log(session?.expires_in); |  | ||||||
|   const getProfile = async () => { |   const getProfile = async () => { | ||||||
|     const Authorization = `Bearer ${session?.access_token}`; |     const Authorization = `Bearer ${session?.access_token}`; | ||||||
|     const config = { |     const config = { | ||||||
|  | |||||||
| @ -6,18 +6,6 @@ import { apiInstance } from "./apiConfig"; | |||||||
| import { IRefresh, ITokens } from "../types/token-type"; | import { IRefresh, ITokens } from "../types/token-type"; | ||||||
| import GoogleProvider from "next-auth/providers/google"; | import GoogleProvider from "next-auth/providers/google"; | ||||||
| 
 | 
 | ||||||
| const verifyToken = async (access_token: string) => { |  | ||||||
|   const res = await apiInstance.post("/token/verify/", { |  | ||||||
|     token: access_token, |  | ||||||
|   }); |  | ||||||
| 
 |  | ||||||
|   if ([200, 201].includes(res.status)) { |  | ||||||
|     return true; |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   return false; |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| const refreshToken = async (token: JWT): Promise<JWT> => { | const refreshToken = async (token: JWT): Promise<JWT> => { | ||||||
|   const UTC = new Date(); |   const UTC = new Date(); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -110,10 +110,10 @@ const ReportForm = () => { | |||||||
|     }); |     }); | ||||||
|     formData.append("latitude1", latLng[0].lat.toString()); |     formData.append("latitude1", latLng[0].lat.toString()); | ||||||
|     formData.append("longitude1", latLng[0].lng.toString()); |     formData.append("longitude1", latLng[0].lng.toString()); | ||||||
|     // if (latLng.length === 2) {
 |     if (latLng.length === 2) { | ||||||
|     formData.append("latitude2", latLng[1].lat.toString()); |       formData.append("latitude2", latLng[1].lat.toString()); | ||||||
|     formData.append("longitude2", latLng[1].lng.toString()); |       formData.append("longitude2", latLng[1].lng.toString()); | ||||||
|     // }
 |     } | ||||||
| 
 | 
 | ||||||
|     try { |     try { | ||||||
|       setLoader(true); |       setLoader(true); | ||||||
|  | |||||||
| @ -79,7 +79,7 @@ | |||||||
|           a { |           a { | ||||||
|             display: flex; |             display: flex; | ||||||
|             font-size: 20px; |             font-size: 20px; | ||||||
|             color: rgb(50, 48, 58); |             color: rgb(72, 159, 225); | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user