diff --git a/src/pages/Team/Team.tsx b/src/pages/Team/Team.tsx index 3e900cd..bad1d53 100644 --- a/src/pages/Team/Team.tsx +++ b/src/pages/Team/Team.tsx @@ -62,7 +62,7 @@ export const _Team = (props: AbstractTeamType) => { return Object.assign({ inStarting: false, upcomingMatches: displayWeekMatches }, pick(p, playerProps), pick(p.selection, selectionProps)); }); - const teamName = teamResult.team.name; + const teamName = useMemo(() => teamResult && teamResult.team.name, [teamResult]); const captainPlayer = teamResult.players.find((p: Player) => p && p.selection && p.selection.captain === 1); const captainId = captainPlayer && captainPlayer.id;