second final commit

This commit is contained in:
= 2023-05-28 22:42:22 +03:00
parent ca0568e62d
commit 0c4be9e763
4 changed files with 7 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 349 KiB

View File

@ -7,10 +7,9 @@ import axios from "axios";
// }); // });
export const backend = axios.create({ export const backend = axios.create({
baseURL: 'https://0e06-92-100-146-65.ngrok-free.app/api/', baseURL: 'https://0e06-92-100-146-65.ngrok-free.app/api/',
timeout: 100000, timeout: 100000,
headers: {'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjg3NjEwNTg3LCJpYXQiOjE2ODUwMTg1ODcsImp0aSI6IjZhY2E2NDJkYWM0NzQyYmZhNGRjM2UzNjdiZTlhMzZhIiwidXNlcl9pZCI6OH0.JsmCZTvNXuL3VCgntvaDDtnA7u9eBeR6WFfgaosXWZo'} headers: {'Authorization': 'Bearer ' + localStorage.getItem('token')}
}); }
)

View File

@ -46,8 +46,7 @@ export const EventCard:React.FC<EventCardIE> = (props) =>{
<img className="hotelImg" src='/icons/not_found.jpeg'></img> <img className="hotelImg" src='/icons/not_found.jpeg'></img>
<h5>{props.title}</h5> <h5>{props.title}</h5>
<div className="hotelCardRow"> <div className="hotelCardRow">
<div>{props.description}</div> <div>{props.description.length > 50? props.description.slice(0,100)+'...': props.description}</div>
<div>{category[props.category as keyof typeof category]}</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -26,11 +26,11 @@ export const MyMap: React.FC<MapIE> = (props) =>{
const [route, setRoute] = useState() const [route, setRoute] = useState()
useEffect(()=>{ if (route == undefined){
axios.get('https://api.mapbox.com/directions/v5/mapbox/walking/'+pathString+'?alternatives=true&continue_straight=true&geometries=geojson&language=en&overview=simplified&steps=true&access_token=pk.eyJ1IjoiZmlyZXNpZWh0IiwiYSI6ImNrdW9kemYzbTB4ZGkycHAxbXN2YnIzaGMifQ.G0fl-qVbecucfOvn8OtU4Q').then( axios.get('https://api.mapbox.com/directions/v5/mapbox/walking/'+pathString+'?alternatives=true&continue_straight=true&geometries=geojson&language=en&overview=simplified&steps=true&access_token=pk.eyJ1IjoiZmlyZXNpZWh0IiwiYSI6ImNrdW9kemYzbTB4ZGkycHAxbXN2YnIzaGMifQ.G0fl-qVbecucfOvn8OtU4Q').then(
(data:any) => setRoute(data.data.routes[0].geometry) (data:any) => setRoute(data.data.routes[0].geometry)
) )
}) }