Reworked profile with pfp upload etc
This commit is contained in:
1 parent
c56d6d0d3a
commit
347f4b0999
5 files changed
+6
-6
No files matched your search
@@ -6,7 +6,7 @@ import Image from "next/image";
|
||||
|
||||
const initialState: UploadAvatarState = null;
|
||||
|
||||
export function AvatarUpload({ avatarUrl }: { avatarUrl: string | null }) {
|
||||
export function AvatarUpload({ avatarUrl }: Readonly<{ avatarUrl: string | null }>) {
|
||||
const [state, action, pending] = useActionState(
|
||||
uploadAvatarAction,
|
||||
initialState,
|
||||
|
||||
@@ -11,7 +11,7 @@ import { updateNameAction, type UpdateNameState } from "./actions";
|
||||
|
||||
const initialState: UpdateNameState = null;
|
||||
|
||||
export function EditableName({ currentName }: { currentName: string }) {
|
||||
export function EditableName({ currentName }: Readonly<{ currentName: string }>) {
|
||||
const [editing, setEditing] = useState(false);
|
||||
const [state, action, pending] = useActionState(
|
||||
updateNameAction,
|
||||
|
||||
@@ -115,12 +115,12 @@ function DetailRow({
|
||||
value,
|
||||
mono,
|
||||
badge,
|
||||
}: {
|
||||
}: Readonly<{
|
||||
label: string;
|
||||
value: string;
|
||||
mono?: boolean;
|
||||
badge?: "green" | "yellow";
|
||||
}) {
|
||||
}>) {
|
||||
return (
|
||||
<div className="flex items-center justify-between px-6 py-3.5">
|
||||
<dt className="text-sm text-neutral-500">{label}</dt>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { useState, useCallback } from "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 [copied, setCopied] = useState(false);
|
||||
|
||||
@@ -65,7 +65,6 @@ export function ShareProfileButton({ userId, shareUrl }: { userId: string; share
|
||||
value={shareUrl}
|
||||
size={200}
|
||||
level="M"
|
||||
includeMargin={false}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export { cn } from "@/utils/assets/shadcn";
|
||||
Reference in new issue
Block a user