Reworked profile with pfp upload etc

This commit is contained in:
pascalyazid committed 2026-05-15 18:37:11 +02:00
1 parent c56d6d0d3a
commit 347f4b0999
5 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ import Image from "next/image";
const initialState: UploadAvatarState = null; const initialState: UploadAvatarState = null;
export function AvatarUpload({ avatarUrl }: { avatarUrl: string | null }) { export function AvatarUpload({ avatarUrl }: Readonly<{ avatarUrl: string | null }>) {
const [state, action, pending] = useActionState( const [state, action, pending] = useActionState(
uploadAvatarAction, uploadAvatarAction,
initialState, initialState,
+1 -1
View File
@@ -11,7 +11,7 @@ import { updateNameAction, type UpdateNameState } from "./actions";
const initialState: UpdateNameState = null; const initialState: UpdateNameState = null;
export function EditableName({ currentName }: { currentName: string }) { export function EditableName({ currentName }: Readonly<{ currentName: string }>) {
const [editing, setEditing] = useState(false); const [editing, setEditing] = useState(false);
const [state, action, pending] = useActionState( const [state, action, pending] = useActionState(
updateNameAction, updateNameAction,
+2 -2
View File
@@ -115,12 +115,12 @@ function DetailRow({
value, value,
mono, mono,
badge, badge,
}: { }: Readonly<{
label: string; label: string;
value: string; value: string;
mono?: boolean; mono?: boolean;
badge?: "green" | "yellow"; badge?: "green" | "yellow";
}) { }>) {
return ( return (
<div className="flex items-center justify-between px-6 py-3.5"> <div className="flex items-center justify-between px-6 py-3.5">
<dt className="text-sm text-neutral-500">{label}</dt> <dt className="text-sm text-neutral-500">{label}</dt>
+1 -2
View File
@@ -3,7 +3,7 @@
import { useState, useCallback } from "react"; import { useState, useCallback } from "react";
import { QRCodeSVG } from "qrcode.react"; import { QRCodeSVG } from "qrcode.react";
export function ShareProfileButton({ userId, shareUrl }: { userId: string; shareUrl: string }) { export function ShareProfileButton({ userId, shareUrl }: Readonly<{ userId: string; shareUrl: string }>) {
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const [copied, setCopied] = useState(false); const [copied, setCopied] = useState(false);
@@ -65,7 +65,6 @@ export function ShareProfileButton({ userId, shareUrl }: { userId: string; share
value={shareUrl} value={shareUrl}
size={200} size={200}
level="M" level="M"
includeMargin={false}
/> />
</div> </div>
+1
View File
@@ -0,0 +1 @@
export { cn } from "@/utils/assets/shadcn";