From aef26916e2ac808652244e60326507fe19448761 Mon Sep 17 00:00:00 2001 From: gearnode Date: Wed, 26 Feb 2025 13:15:58 +0100 Subject: [PATCH] Fix eslint type props Signed-off-by: gearnode --- apps/console/src/components/TeamSwitcher.tsx | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/console/src/components/TeamSwitcher.tsx b/apps/console/src/components/TeamSwitcher.tsx index c1b0b7c60..3eac4bbdb 100644 --- a/apps/console/src/components/TeamSwitcher.tsx +++ b/apps/console/src/components/TeamSwitcher.tsx @@ -43,6 +43,19 @@ export const teamSwitcherFragment = graphql` type Organization = TeamSwitcher_organizations$data["organizations"]["edges"][0]["node"]; +const LogoComponent = ({ + org, + className, +}: { + org: Organization; + className?: string; +}) => { + if (org.logoUrl) { + return {org.name}; + } + return null; +}; + export function TeamSwitcher({ organizations, }: { @@ -58,7 +71,7 @@ export function TeamSwitcher({ useEffect(() => { if (data.organizations && data.organizations.edges.length > 0) { const org = data.organizations.edges.find( - (edge) => edge.node.id === organizationId, + (edge) => edge.node.id === organizationId ); if (org) { setCurrentOrganization(org.node); @@ -70,19 +83,6 @@ export function TeamSwitcher({ return null; } - const LogoComponent = ({ - org, - className, - }: { - org: Organization; - className?: string; - }) => { - if (org.logoUrl) { - return {org.name}; - } - return null; - }; - const handleOrganizationSwitch = (org: Organization) => { navigate(`/organizations/${org.id}`); };