Skip to content

Commit

Permalink
feat(web): show exchange arrows after closing side panel (#6695)
Browse files Browse the repository at this point in the history
* feat(web): show exchange arrows after closing side panel

* typo--
  • Loading branch information
tonypls authored Apr 25, 2024
1 parent 19f2b46 commit 93fe4a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/features/panels/LeftPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ function MobileHeader() {

function OuterPanel({ children }: { children: React.ReactNode }) {
const [isOpen, setOpen] = useAtom(leftPanelOpenAtom);
const onCollapse = () => setOpen(!isOpen);
const location = useLocation();

const onCollapse = () => setOpen(!isOpen);

return (
<aside
data-test-id="left-panel"
Expand Down
6 changes: 6 additions & 0 deletions web/src/features/panels/zone/ZoneHeaderTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { CountryFlag } from 'components/Flag';
import { TimeDisplay } from 'components/TimeDisplay';
import TooltipWrapper from 'components/tooltips/TooltipWrapper';
import { mapMovingAtom } from 'features/map/mapAtoms';
import { useSetAtom } from 'jotai';
import { HiArrowLeft } from 'react-icons/hi2';
import { Link } from 'react-router-dom';
import { getCountryName, getFullZoneName, getZoneName } from 'translation/translation';
Expand All @@ -24,13 +26,17 @@ export default function ZoneHeaderTitle({ zoneId }: ZoneHeaderTitleProps) {
const countryName = getCountryName(zoneId);
const disclaimer = getDisclaimer(zoneId);
const showCountryPill = zoneId.includes('-') && !zoneName.includes(countryName);
const setIsMapMoving = useSetAtom(mapMovingAtom);

const onNavigateBack = () => setIsMapMoving(false);

return (
<div className="flex w-full grow flex-row overflow-hidden pb-2 pl-2">
<Link
className="text-3xl self-center py-4 pr-4"
to={returnToMapLink}
data-test-id="left-panel-back-button"
onClick={onNavigateBack}
>
<HiArrowLeft />
</Link>
Expand Down

0 comments on commit 93fe4a8

Please sign in to comment.