Skip to content

Commit

Permalink
fix: simplified click handler
Browse files Browse the repository at this point in the history
  • Loading branch information
partisaani committed Jan 29, 2025
1 parent a651412 commit 2cedfc7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/component/itinerary/navigator/NaviStarter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Button from '@hsl-fi/button';
import PropTypes from 'prop-types';
import React, { useCallback } from 'react';
import React from 'react';
import { FormattedMessage, intlShape } from 'react-intl';
import { configShape } from '../../../util/shapes';
import Icon from '../../Icon';
Expand All @@ -9,10 +9,7 @@ import { useLogo } from './hooks/useLogo';
const NaviStarter = ({ time, startItinerary }, { config, intl }) => {
const { logo } = useLogo(config.trafficLightGraphic);

const handleClick = useCallback(
() => startItinerary(Date.now()),
[startItinerary],
);
const handleClick = () => startItinerary(Date.now());

return (
<div className="navi-initializer-container">
Expand Down

0 comments on commit 2cedfc7

Please sign in to comment.