fix: improving organization-form.tsx UX/UI and removed the card.

This commit is contained in:
charlesgauthereau
2026-01-11 12:41:39 +01:00
parent be8f3bd98c
commit 2d6be20b30
@@ -1,6 +1,5 @@
"use client"; "use client";
import {Card, CardContent, CardHeader} from "@/components/ui/card";
import { import {
FormControl, FormControl,
FormDescription, FormDescription,
@@ -22,7 +21,6 @@ import {
} from "@/components/wrappers/dashboard/organization/organization-form/organization-form.schema"; } from "@/components/wrappers/dashboard/organization/organization-form/organization-form.schema";
import {MemberWithUser, OrganizationWithMembers} from "@/db/schema/03_organization"; import {MemberWithUser, OrganizationWithMembers} from "@/db/schema/03_organization";
import { import {
deleteOrganizationAction,
updateOrganizationAction updateOrganizationAction
} from "@/components/wrappers/dashboard/organization/organization.action"; } from "@/components/wrappers/dashboard/organization/organization.action";
import {toast} from "sonner"; import {toast} from "sonner";
@@ -95,9 +93,6 @@ export const OrganizationForm = (props: organizationFormProps) => {
return ( return (
<Card>
<CardHeader></CardHeader>
<CardContent>
<Form <Form
form={form} form={form}
className="flex flex-col gap-4" className="flex flex-col gap-4"
@@ -162,9 +157,11 @@ export const OrganizationForm = (props: organizationFormProps) => {
</FormItem> </FormItem>
)} )}
/> />
<Button>{isCreate ? `Create Organization` : `Update Organization`}</Button> <div className="flex justify-end">
<Button type="submit">
{isCreate ? "Create" : "Update"}
</Button>
</div>
</Form> </Form>
</CardContent>
</Card>
); );
}; };