From 3eacc27312c37ef9d6f1e465d2639720084967d9 Mon Sep 17 00:00:00 2001 From: Eric Robsky Huntley Date: Tue, 27 Feb 2024 09:50:28 -0500 Subject: [PATCH] further typescript cleanup --- src/components/Footer.astro | 9 ++++++--- src/components/Navbar.astro | 5 ++++- src/components/Organization.astro | 4 ++-- src/components/People.astro | 14 +++++++++++++- src/components/Person.astro | 4 ++-- 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/components/Footer.astro b/src/components/Footer.astro index b3a79de..1387048 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,12 +1,15 @@ --- import { Icon } from 'astro-icon/components' -import comp from "../config.json"; - interface Props { - navItems: object[]; + navItems: [{ + path: string; + title: string; + }]; } +import comp from "../config.json"; + const { navItems } = Astro.props; --- diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index d780cd2..ebe3ed2 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -1,6 +1,9 @@ --- interface Props { - navItems: object[]; + navItems: [{ + path: string; + title: string; + }]; } const {navItems} = Astro.props; diff --git a/src/components/Organization.astro b/src/components/Organization.astro index d5ed485..018f48f 100644 --- a/src/components/Organization.astro +++ b/src/components/Organization.astro @@ -12,10 +12,10 @@ interface Props { state?: string; postal?: string; }; - socials?: { + socials?: [{ url?: string; name?: string; - }; + }]; }; } diff --git a/src/components/People.astro b/src/components/People.astro index c6b2ab2..8fc472a 100644 --- a/src/components/People.astro +++ b/src/components/People.astro @@ -2,7 +2,19 @@ import Person from '@components/Person.astro'; interface Props { - people: object[]; + people: [{ + name: string; + creds?: string[]; + pronouns?: string; + roles?: string[]; + email: string; + bio: string; + skills: string[]; + socials?: [{ + url?: string; + name?: string; + }]; + }] } const { people } = Astro.props; diff --git a/src/components/Person.astro b/src/components/Person.astro index 9ba65f0..75f892e 100644 --- a/src/components/Person.astro +++ b/src/components/Person.astro @@ -9,10 +9,10 @@ interface Props { email: string; bio: string; skills: string[]; - socials?: { + socials?: [{ url?: string; name?: string; - }; + }]; }; }