Skip to content

Commit

Permalink
Update team colors
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenyeargin committed Feb 11, 2025
1 parent 5c0d8c3 commit 22db7a9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/team/[slug]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export const metadata = {
export default async function SchedulePage({ params }) {
const { slug } = await params;
let team = getTeamDataByAbbreviation(slug?.toUpperCase(), true);
if (!team || team.abbreviation === 'NHL') {
if (!team.teamId || team.abbreviation === 'NHL') {
team = getTeamDataBySlug(slug);
}

if (!team || team.abbreviation === 'NHL') {
if (!team.teamId || team.abbreviation === 'NHL') {
return (
<div className="py-10 text-center text-2xl" style={{ minHeight: '60vh'}}>
Team not found matching {slug}.
Expand Down
28 changes: 27 additions & 1 deletion src/app/utils/teamData.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,33 @@ const teamData = [
teamColor: '#041e42',
secondaryTeamColor: '#296ec8',
teamId: 52,
}
},
// International
{
name: 'Canada',
abbreviation: 'CAN',
teamColor: '#c8102e',
secondaryTeamColor: '#ddcba4',
},
{
name: 'Finland',
abbreviation: 'FIN',
teamColor: '#041e42',
secondaryTeamColor: '#ffb81c',
},
{
name: 'Sweden',
abbreviation: 'SWE',
teamColor: '#006EB3',
secondaryTeamColor: '#041e42',
},
{
name: 'USA',
abbreviation: 'USA',
teamColor: '#003087',
secondaryTeamColor: '#c8102e',
},

];

const defaultTeam = (isHome) => {
Expand Down

0 comments on commit 22db7a9

Please sign in to comment.