Skip to content

Commit

Permalink
Merge pull request #49 from RJ-SMTR/hotifx/2.1.6-ajuste-de-bug-das-rotas
Browse files Browse the repository at this point in the history
hotfix/2.1.6-rota-ficava-no-mapa-arrumado
  • Loading branch information
gmartinsoc authored Dec 26, 2022
2 parents 9a0c7da + 4df81af commit 86fef99
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "base-project",
"private": true,
"version": "2.1.5",
"version": "2.1.6",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
5 changes: 5 additions & 0 deletions src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ import styles from './styles.module.scss'
import { useContext, useEffect, useState} from 'react'
import { CodeContext } from '../../hooks/getCode'
import { TripContext } from '../../hooks/getTrips'
import { ShapeContext } from '../../hooks/getShape'
import { useNavigate } from 'react-router-dom'
import { ThemeContext } from '../../hooks/getTheme'
import { RoutesContext } from '../../hooks/getRoutes'

export function Header(props) {
let navigate = useNavigate()
const { code, setCode } = useContext(CodeContext)
const { setTrip } = useContext(TripContext)
const {setPoints} = useContext(ShapeContext)
const {theme} = useContext(ThemeContext)
const [newCode, setNewCode] = useState("")
const [value, setValue] = useState('')
Expand All @@ -21,6 +24,7 @@ export function Header(props) {
setTrip('')
setCode("")
navigate('/')
setPoints("")

}

Expand All @@ -32,6 +36,7 @@ export function Header(props) {
setNewCode(event.target.value)
setTrip('')
setValue()
setPoints("")

}

Expand Down
9 changes: 8 additions & 1 deletion src/components/SequenceCard/SequenceCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,27 @@ import { Oval } from 'react-loader-spinner'
import { RoutesContext } from '../../hooks/getRoutes'
import { GrClose } from 'react-icons/gr'
import { ThemeContext } from '../../hooks/getTheme'
import { ShapeContext } from '../../hooks/getShape'


export function SequenceCard() {

const { setTrip, sequenceInfo, stopInfo } = useContext(TripContext)
const {stopId} = useContext(RoutesContext)
const {theme} = useContext(ThemeContext)
const { setPoints } = useContext(ShapeContext)
function clearMapInfo() {
setTrip('')
setPoints('')
}


return (
<>
<div className="fixed bottom-0 translate-x-1/2 right-1/2 w-11/12 z-[401]">
<div className={styles.sequenceCard}>
<div className='flex justify-end'>
<button onClick={() => setTrip('')}>
<button onClick={() => clearMapInfo()}>
<GrClose/>
</button>
</div>
Expand Down

0 comments on commit 86fef99

Please sign in to comment.