feat: enhance user dashboards and pages with improved layout and styling
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
20e50d5c6d
commit
8834932345
5 changed files with 33 additions and 8 deletions
|
|
@ -66,8 +66,13 @@ export const UserDashboard = ({ userId }: { userId: UsersId }) => {
|
||||||
if (isLoading) return <LoadingPage />;
|
if (isLoading) return <LoadingPage />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex w-full flex-1 flex-col items-start justify-center gap-4 overflow-auto p-2 md:gap-6">
|
<div className="mx-1 mt-2 flex w-full flex-1 flex-col items-start justify-center gap-4 overflow-auto p-2 md:gap-6">
|
||||||
<h3 className="font-bold text-2xl">Le tue ricerche</h3>
|
<h3 className="font-bold text-2xl">
|
||||||
|
Le tue ricerche:{" "}
|
||||||
|
<span className="font-normal text-xl">
|
||||||
|
(seleziona una per visualizzarne i dettagli)
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
|
||||||
<div className="flex w-full flex-1 grow flex-col space-y-5">
|
<div className="flex w-full flex-1 grow flex-col space-y-5">
|
||||||
<ServizioList data={data || []} isAdmin={false} userId={userId} />
|
<ServizioList data={data || []} isAdmin={false} userId={userId} />
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,11 @@ export const UserHeaderSection = ({
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent align="end" className="w-56" forceMount>
|
<DropdownMenuContent
|
||||||
|
align="end"
|
||||||
|
className="w-56 border-accent"
|
||||||
|
forceMount
|
||||||
|
>
|
||||||
{user.isAdmin ? (
|
{user.isAdmin ? (
|
||||||
<>
|
<>
|
||||||
<DropdownMenuLabel className="font-normal">
|
<DropdownMenuLabel className="font-normal">
|
||||||
|
|
@ -180,12 +184,21 @@ const Items = ({
|
||||||
<DropdownMenuItem className="p-0" key={item.href}>
|
<DropdownMenuItem className="p-0" key={item.href}>
|
||||||
<Link
|
<Link
|
||||||
aria-label={`Link to ${item.title}`}
|
aria-label={`Link to ${item.title}`}
|
||||||
className="flex h-full w-full items-center gap-3 px-2 py-1.5"
|
className={cn(
|
||||||
|
"flex h-full w-full items-center gap-3 px-2 py-1.5",
|
||||||
|
item.href === "/area-riservata/dashboard" &&
|
||||||
|
"rounded-md bg-primary font-medium text-primary-foreground",
|
||||||
|
)}
|
||||||
href={item.href}
|
href={item.href}
|
||||||
onClick={() => setOpen(false)}
|
onClick={() => setOpen(false)}
|
||||||
>
|
>
|
||||||
<IconMatrix
|
<IconMatrix
|
||||||
className={cn("size-6", item.icon.className)}
|
className={cn(
|
||||||
|
"size-6",
|
||||||
|
item.icon.className,
|
||||||
|
item.href === "/area-riservata/dashboard" &&
|
||||||
|
"text-primary-foreground",
|
||||||
|
)}
|
||||||
type={item.icon.icon}
|
type={item.icon.icon}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ const Allegati: NextPageWithLayout = () => {
|
||||||
<title>Allegati - Infoalloggi.it</title>
|
<title>Allegati - Infoalloggi.it</title>
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<div className="grow p-4">
|
<div className="mx-1 mt-2 max-w-8xl grow p-2">
|
||||||
<AllegatiComp isAdmin={session.user.isAdmin} userId={session.user.id} />
|
<AllegatiComp isAdmin={session.user.isAdmin} userId={session.user.id} />
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ const Comunicazioni: NextPageWithLayout = () => {
|
||||||
<title>Comunicazioni - Infoalloggi.it</title>
|
<title>Comunicazioni - Infoalloggi.it</title>
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<div className="mx-auto max-w-8xl grow p-4">
|
<div className="mx-auto mt-1 max-w-8xl grow p-2">
|
||||||
<div className="p-1">
|
<div className="p-1">
|
||||||
<h1 className="font-bold text-2xl">Comunicazioni</h1>
|
<h1 className="font-bold text-2xl">Comunicazioni</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
|
import OnboardingDemo from "~/components/onboarding";
|
||||||
|
|
||||||
const Test = () => {
|
const Test = () => {
|
||||||
return <main className="flex flex-col gap-4 p-8">test</main>;
|
return (
|
||||||
|
<main className="flex flex-col gap-4 p-8">
|
||||||
|
test
|
||||||
|
<OnboardingDemo />
|
||||||
|
</main>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Test;
|
export default Test;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue