mirror of
https://github.com/task-17-lct/frontend.git
synced 2024-11-22 02:46:33 +03:00
second final commit
This commit is contained in:
parent
ca0568e62d
commit
0c4be9e763
Binary file not shown.
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 349 KiB |
|
@ -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/',
|
||||
timeout: 100000,
|
||||
headers: {'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjg3NjEwNTg3LCJpYXQiOjE2ODUwMTg1ODcsImp0aSI6IjZhY2E2NDJkYWM0NzQyYmZhNGRjM2UzNjdiZTlhMzZhIiwidXNlcl9pZCI6OH0.JsmCZTvNXuL3VCgntvaDDtnA7u9eBeR6WFfgaosXWZo'}
|
||||
});
|
||||
|
||||
|
||||
headers: {'Authorization': 'Bearer ' + localStorage.getItem('token')}
|
||||
}
|
||||
)
|
|
@ -46,8 +46,7 @@ export const EventCard:React.FC<EventCardIE> = (props) =>{
|
|||
<img className="hotelImg" src='/icons/not_found.jpeg'></img>
|
||||
<h5>{props.title}</h5>
|
||||
<div className="hotelCardRow">
|
||||
<div>{props.description}</div>
|
||||
<div>{category[props.category as keyof typeof category]}</div>
|
||||
<div>{props.description.length > 50? props.description.slice(0,100)+'...': props.description}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -26,11 +26,11 @@ export const MyMap: React.FC<MapIE> = (props) =>{
|
|||
|
||||
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(
|
||||
(data:any) => setRoute(data.data.routes[0].geometry)
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user