Skip to content

Commit

Permalink
Merge pull request #22 from sanam2405/ts-migration
Browse files Browse the repository at this point in the history
clean build for deployment
  • Loading branch information
sanam2405 authored Mar 27, 2024
2 parents 0f5390a + 513464e commit 183e221
Show file tree
Hide file tree
Showing 4 changed files with 393 additions and 399 deletions.
37 changes: 16 additions & 21 deletions ts-frontend/src/components/Map.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-var-requires */
import React, { useState, useEffect, useContext } from 'react'
import React, { useState, useContext } from 'react'

import Box from '@mui/material/Box'
import Slider from '@mui/material/Slider'
Expand All @@ -27,11 +27,6 @@ const containerStyle = {
height: '100vh',
}

const center = {
lat: 22.6405969,
lng: 88.4145109,
}

function Map() {
const navigate = useNavigate()
const apiKey = import.meta.env.VITE_GOOGLE_API_KEY
Expand All @@ -43,18 +38,18 @@ function Map() {
googleMapsApiKey: apiKey,
})

const [currentCenter, setCurrentCenter] = useState({
lat: 22.54905,
lng: 88.37816,
})
const [location, setLocation] = useState({
const [currentCenter] = useState({
lat: 22.54905,
lng: 88.37816,
})
const [locationReceived, setLocationReceived] = useState({
const [location] = useState({
lat: 22.54905,
lng: 88.37816,
})
// const [locationReceived, setLocationReceived] = useState({
// lat: 22.54905,
// lng: 88.37816,
// })

const [age, setAge] = useState(0)
const [gender, setGender] = useState('Male')
Expand Down Expand Up @@ -149,19 +144,19 @@ function Map() {
// }
// }, [socket])

const [map, setMap] = React.useState(null)
// const [map, setMap] = React.useState(null)

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const onLoad = React.useCallback((map: any) => {
const bounds = new window.google.maps.LatLngBounds(center)
map.fitBounds(bounds)
setMap(map)
}, [])
// const onLoad = React.useCallback((map: any) => {
// const bounds = new window.google.maps.LatLngBounds(center)
// map.fitBounds(bounds)
// setMap(map)
// }, [])

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const onUnmount = React.useCallback((map: any) => {
setMap(null)
}, [])
// const onUnmount = React.useCallback((map: any) => {
// setMap(null)
// }, [])

const distances = [
{
Expand Down
2 changes: 1 addition & 1 deletion ts-frontend/src/components/UserBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface UserBannerProps {

function UserBanner({ username, name, dpLink }: UserBannerProps) {
const [changePic, setChangePic] = useState<boolean>(false)
const handleOpen3 = () => setChangePic(true)
// const handleOpen3 = () => setChangePic(true)
const handleClose3 = () => setChangePic(false)

// Modal custom stylesheet
Expand Down
4 changes: 2 additions & 2 deletions ts-frontend/src/components/UserCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import React from 'react'
import '../styles/UserCard.css'
import { useNavigate } from 'react-router-dom'
// import { useNavigate } from 'react-router-dom'

const PORT = import.meta.env.VITE_PORT || 5050
const BASE_API_URI = `http://localhost:${PORT}`
Expand All @@ -29,7 +29,7 @@ function UserCard({
users,
setUsers,
}: UserCardProps) {
const navigate = useNavigate()
// const navigate = useNavigate()

const handleFollow = (id: string) => {
fetch(`${BASE_API_URI}/api/follow`, {
Expand Down
Loading

0 comments on commit 183e221

Please sign in to comment.