Deskripsi:
- Upload foto profil ke storage
- Upload background profile ke storge
## No Issue
This commit is contained in:
2024-09-25 14:04:18 +08:00
parent 5670feb08c
commit 827b7c7bc1
54 changed files with 812 additions and 936 deletions

View File

@@ -5,14 +5,17 @@ import { useShallowEffect } from "@mantine/hooks";
import { useState } from "react";
import ComponentGlobal_Loader from "./loader";
type IRadius = "xs" | "sm" | "md" | "lg" | "xl";
export function ComponentGlobal_LoadImage({
url,
maw,
h,
radius,
}: {
url: string;
maw?: number;
maw?: number | string;
h?: number;
radius?: IRadius;
}) {
const [isImage, setIsImage] = useState<boolean | null>(null);
@@ -34,7 +37,7 @@ export function ComponentGlobal_LoadImage({
if (isImage === null)
return (
<Center h={h ? h : 250}>
<Center h={250}>
<ComponentGlobal_Loader variant="dots" size={50} />
</Center>
);
@@ -42,7 +45,7 @@ export function ComponentGlobal_LoadImage({
if (!isImage)
return (
<>
<Center h={250}>
<Center h={250} >
<Image
alt="No Image"
maw={150}
@@ -56,24 +59,18 @@ export function ComponentGlobal_LoadImage({
return (
<>
{h ? (
<Image
height={h}
alt="Image"
maw={maw ? maw : 200}
m={"auto"}
p={"xs"}
src={url}
/>
) : (
<Image
alt="Image"
maw={maw ? maw : 200}
m={"auto"}
p={"xs"}
src={url}
/>
)}
<Box h={h ? h : 250}>
<Center h={"100%"}>
<Image
radius={radius ? radius : 0}
alt="Image"
maw={maw ? maw : 200}
m={"auto"}
p={"xs"}
src={url}
/>
</Center>
</Box>
</>
);
}