Skip to content

Commit

Permalink
Remove useCallback (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
wweitzel authored Oct 14, 2023
1 parent ac86ef7 commit 956a75c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 3 additions & 6 deletions src/pages/Fixture.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {useNavigate, useParams} from 'react-router-dom';
import {useCallback, useEffect, useState} from 'react';
import {GetFixtureResponse, getFixture as _getFixture} from '../lib/api/fixtures';
import {useEffect, useState} from 'react';
import {GetFixtureResponse, getFixture} from '../lib/api/fixtures';
import {Header} from '../components/Header';
import {GetGoalsResponse, getGoals as _getGoals} from '../lib/api/goals';
import {GetGoalsResponse, getGoals} from '../lib/api/goals';
import {getPreferredTheme} from '../lib/utils';
import Video from '../components/Video';
import {FixtureRow} from '../components/FixturesList';
Expand All @@ -11,9 +11,6 @@ function Fixture() {
const {fixtureId} = useParams();
const navigate = useNavigate();

const getFixture = useCallback(_getFixture, []);
const getGoals = useCallback(_getGoals, []);

const [getFixtureResponse, setGetFixtureResponse] = useState<GetFixtureResponse>();
const [getGoalsResponse, setGetGoalsResponse] = useState<GetGoalsResponse>();

Expand Down
6 changes: 2 additions & 4 deletions src/pages/Goal.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import '../index.css';
import {getGoal as _getGoal, GetGoalResponse} from '../lib/api/goals';
import {getGoal, GetGoalResponse} from '../lib/api/goals';
import Video from '../components/Video';

import {useCallback, useEffect, useState} from 'react';
import {useEffect, useState} from 'react';
import {useNavigate, useParams} from 'react-router-dom';
import {Header} from '../components/Header';
import {getPreferredTheme} from '../lib/utils';
Expand All @@ -11,8 +11,6 @@ function Goal() {
const {goalId} = useParams();
const navigate = useNavigate();

const getGoal = useCallback(_getGoal, []);

const [getGoalResponse, setGetGoalResponse] = useState<GetGoalResponse>();

function navigateHome() {
Expand Down

0 comments on commit 956a75c

Please sign in to comment.