mirror of
https://github.com/MeshEnvy/mesh-forge.git
synced 2026-08-12 03:42:49 +02:00
refactor: simplify profile type definitions in ProfileCard, ProfileEditor, and Dashboard components for improved code clarity
This commit is contained in:
@@ -30,7 +30,7 @@ export function ProfileStatisticPills({
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ProfileCardContentProps {
|
interface ProfileCardContentProps {
|
||||||
profile: Doc<'profiles'>
|
profile: Doc
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ProfileCardContent({ profile }: ProfileCardContentProps) {
|
export function ProfileCardContent({ profile }: ProfileCardContentProps) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ interface ProfileFormValues {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ProfileEditorProps {
|
interface ProfileEditorProps {
|
||||||
initialData?: Doc<'profiles'>
|
initialData?: Doc
|
||||||
onSave: () => void
|
onSave: () => void
|
||||||
onCancel: () => void
|
onCancel: () => void
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export default function Dashboard() {
|
|||||||
const removeProfile = useMutation(api.profiles.remove)
|
const removeProfile = useMutation(api.profiles.remove)
|
||||||
const [isCreating, setIsCreating] = useState(false)
|
const [isCreating, setIsCreating] = useState(false)
|
||||||
|
|
||||||
const handleEdit = (profile: Doc<'profiles'>) => {
|
const handleEdit = (profile: Doc) => {
|
||||||
navigate(`/dashboard/profiles/${profile._id}`)
|
navigate(`/dashboard/profiles/${profile._id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user