From a3287359a7383dda78580c299902ebcf36da6165 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 23:16:57 +0000 Subject: [PATCH] Changes --- src/pages/Account.tsx | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/pages/Account.tsx b/src/pages/Account.tsx index 55360c8..cfe0cb7 100644 --- a/src/pages/Account.tsx +++ b/src/pages/Account.tsx @@ -12,18 +12,15 @@ import Header from "@/components/Header"; import { LogOut, Save } from "lucide-react"; const profileSchema = z.object({ - company_name: z.string().trim().max(100, { message: "Företagsnamn får max vara 100 tecken" }).optional(), address: z.string().trim().max(500, { message: "Adress får max vara 500 tecken" }).optional(), }); interface ProfileData { - company_name: string; address: string; } const Account = () => { const [profile, setProfile] = useState({ - company_name: "", address: "", }); const [isLoading, setIsLoading] = useState(true); @@ -47,7 +44,7 @@ const Account = () => { try { const { data, error } = await supabase .from("profiles") - .select("company_name, address") + .select("address") .eq("user_id", user!.id) .maybeSingle(); @@ -60,7 +57,6 @@ const Account = () => { }); } else if (data) { setProfile({ - company_name: data.company_name || "", address: data.address || "", }); } @@ -88,7 +84,6 @@ const Account = () => { const { error } = await supabase .from("profiles") .update({ - company_name: profile.company_name || null, address: profile.address || null, }) .eq("user_id", user!.id); @@ -143,19 +138,14 @@ const Account = () => {
- + - setProfile({ ...profile, company_name: e.target.value }) - } - placeholder="Ditt företag eller e-postadress" + id="email" + type="email" + value={user?.email || ""} + disabled + className="bg-muted" /> -

- Inloggad som: {user?.email} -