From 49f9fe191f2fbb1fc5c2ae4098cd6a31ff7b413f Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Mon, 24 Nov 2025 04:25:45 -0800 Subject: [PATCH] refactor: simplify profile type definitions in ProfileCard, ProfileEditor, and Dashboard components for improved code clarity --- src/components/ProfileCard.tsx | 2 +- src/components/ProfileEditor.tsx | 2 +- src/pages/Dashboard.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx index 37e001a..2f331c3 100644 --- a/src/components/ProfileCard.tsx +++ b/src/components/ProfileCard.tsx @@ -30,7 +30,7 @@ export function ProfileStatisticPills({ } interface ProfileCardContentProps { - profile: Doc<'profiles'> + profile: Doc } export function ProfileCardContent({ profile }: ProfileCardContentProps) { diff --git a/src/components/ProfileEditor.tsx b/src/components/ProfileEditor.tsx index 12f9caf..6191e21 100644 --- a/src/components/ProfileEditor.tsx +++ b/src/components/ProfileEditor.tsx @@ -18,7 +18,7 @@ interface ProfileFormValues { } interface ProfileEditorProps { - initialData?: Doc<'profiles'> + initialData?: Doc onSave: () => void onCancel: () => void } diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index 98b0092..b8d7b47 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -18,7 +18,7 @@ export default function Dashboard() { const removeProfile = useMutation(api.profiles.remove) const [isCreating, setIsCreating] = useState(false) - const handleEdit = (profile: Doc<'profiles'>) => { + const handleEdit = (profile: Doc) => { navigate(`/dashboard/profiles/${profile._id}`) }