-
- {user.name[0]}
- {user.image ? : null}
-
-
{
- const fileInput = document.createElement("input");
- fileInput.type = "file";
- fileInput.accept = "image/*";
- // @ts-ignore
- fileInput.onchange = handleImageUpload;
- fileInput.click();
- }}
- className="cursor-pointer absolute inset-0 flex justify-center items-center opacity-0 transition-opacity hover:opacity-100 hover:bg-gray-500 hover:bg-opacity-50 rounded-full size-14"
- >
-
-
-
- );
-};
diff --git a/src/components/wrappers/dashboard/profile2/avatar/avatar.action.ts b/src/components/wrappers/dashboard/profile2/avatar/avatar.action.ts
deleted file mode 100644
index d44cc2a2..00000000
--- a/src/components/wrappers/dashboard/profile2/avatar/avatar.action.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-"use server";
-import { db } from "@/db";
-import {userAction} from "@/lib/safe-actions/actions";
-import { eq } from "drizzle-orm";
-import { z } from "zod";
-import * as drizzleDb from "@/db";
-
-
-export const updateImageUserAction = userAction.schema(z.string()).action(async ({ parsedInput, ctx }) => {
- const [updatedUser] = await db.update(drizzleDb.schemas.user).set({ image: parsedInput }).where(eq(drizzleDb.schemas.user.id, ctx.user.id)).returning();
-
- return {
- data: updatedUser,
- };
-});
diff --git a/src/components/wrappers/dashboard/profile2/button-delete-account/button-delete-account.tsx b/src/components/wrappers/dashboard/profile2/button-delete-account/button-delete-account.tsx
index ad96f327..852ba1a9 100644
--- a/src/components/wrappers/dashboard/profile2/button-delete-account/button-delete-account.tsx
+++ b/src/components/wrappers/dashboard/profile2/button-delete-account/button-delete-account.tsx
@@ -58,4 +58,4 @@ export const ButtonDeleteAccount = (props: ButtonDeleteAccountProps) => {
);
-};
+};
\ No newline at end of file
diff --git a/src/components/wrappers/dashboard/profile2/button-delete-account/delete-account.action.ts b/src/components/wrappers/dashboard/profile2/button-delete-account/delete-account.action.ts
index 9da0376b..a9214f0f 100644
--- a/src/components/wrappers/dashboard/profile2/button-delete-account/delete-account.action.ts
+++ b/src/components/wrappers/dashboard/profile2/button-delete-account/delete-account.action.ts
@@ -33,4 +33,4 @@ export const deleteUserAction = userAction.schema(z.string()).action(async ({ pa
return {
data: deletedUser,
};
-});
+});
\ No newline at end of file
diff --git a/src/components/wrappers/dashboard/profile2/user-avatar/user-avatar.tsx b/src/components/wrappers/dashboard/profile2/user-avatar/user-avatar.tsx
deleted file mode 100644
index 6e26d4f6..00000000
--- a/src/components/wrappers/dashboard/profile2/user-avatar/user-avatar.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
-import { currentUser } from "@/lib/auth/current-user";
-import { notFound } from "next/navigation";
-
-export type UserAvatarProps = {};
-
-export const UserAvatar = async () => {
- const user = await currentUser();
-
- if (!user) {
- return notFound();
- }
-
- return (
-