feat: update page titles and descriptions for improved SEO and user experience
- Updated Italian translations for "Area Riservata" description in it.ts - Added <Head> components with appropriate titles for the following pages: - Admin Annunci - Admin Banners - Admin Blacklist - Admin Chats - Admin Etichette - Admin Flags - Admin Impostazioni - Admin Ordini - Admin Potenziali - Admin Prezziario - Admin Storage - Admin Testi Stringhe - Admin Utenti - Allegati - User Chat - Comunicazioni - Ordini - Profilo - Removed unused translation hooks from several components
This commit is contained in:
parent
ea8f9fe0fa
commit
a4f822d462
23 changed files with 384 additions and 379 deletions
|
|
@ -11,7 +11,6 @@ import { LoadingPage } from "~/components/loading";
|
||||||
import { SiteHeader } from "~/components/navbar/site-header";
|
import { SiteHeader } from "~/components/navbar/site-header";
|
||||||
import { UserViewProvider } from "~/lib/userViewContext";
|
import { UserViewProvider } from "~/lib/userViewContext";
|
||||||
import { cn } from "~/lib/utils";
|
import { cn } from "~/lib/utils";
|
||||||
import { useTranslation } from "~/providers/I18nProvider";
|
|
||||||
import {
|
import {
|
||||||
EnforcedSessionContext,
|
EnforcedSessionContext,
|
||||||
useSession,
|
useSession,
|
||||||
|
|
@ -161,7 +160,6 @@ export const AreaRiservataLayoutUserView = ({
|
||||||
}: {
|
}: {
|
||||||
children: ReactNode & { props: { userId: UsersId } };
|
children: ReactNode & { props: { userId: UsersId } };
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation();
|
|
||||||
const session = useSession();
|
const session = useSession();
|
||||||
const props = children.props as { userId: UsersId };
|
const props = children.props as { userId: UsersId };
|
||||||
if (session.status === "pending") {
|
if (session.status === "pending") {
|
||||||
|
|
@ -178,11 +176,7 @@ export const AreaRiservataLayoutUserView = ({
|
||||||
<UserViewProvider userId={props.userId}>
|
<UserViewProvider userId={props.userId}>
|
||||||
<EnforcedSessionContext.Provider value={session as ValidSession}>
|
<EnforcedSessionContext.Provider value={session as ValidSession}>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t.heads.area_riservata_titolo}</title>
|
<title>User View - Infoalloggi.it</title>
|
||||||
<meta
|
|
||||||
content={t.heads.area_riservata_description}
|
|
||||||
name="description"
|
|
||||||
/>
|
|
||||||
</Head>
|
</Head>
|
||||||
<div className="flex h-auto w-full flex-col md:flex-row">
|
<div className="flex h-auto w-full flex-col md:flex-row">
|
||||||
<Sidebar
|
<Sidebar
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ export const AnnuncioCard = ({ className }: { className?: string }) => {
|
||||||
isAdmin ? (
|
isAdmin ? (
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<Collapsible className="space-y-2">
|
<Collapsible className="space-y-2">
|
||||||
<CollapsibleTrigger>
|
<CollapsibleTrigger asChild>
|
||||||
<Button variant="outline">
|
<Button variant="outline">
|
||||||
<Toolbox />
|
<Toolbox />
|
||||||
<span>Azioni Utente</span>
|
<span>Azioni Utente</span>
|
||||||
|
|
@ -97,7 +97,7 @@ export const AnnuncioDisplay = ({
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"grid @md:grid-cols-[12rem_1fr] grid-cols-[7rem_1fr] gap-x-4 gap-y-2 rounded-md md:max-w-3xl md:border md:border-white md:bg-[#e6e9ec]/50 lg:gap-x-4 xl:gap-x-6 dark:md:border-primary dark:md:bg-card",
|
"grid @md:grid-cols-[12rem_1fr] grid-cols-[7rem_1fr] gap-x-4 gap-y-2 rounded-md bg-[#e6e9ec]/50 md:max-w-3xl md:border md:border-white lg:gap-x-4 xl:gap-x-6 dark:md:border-primary dark:md:bg-card",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,7 @@ export const ServizioContent = () => {
|
||||||
servizioId={servizio.servizio_id}
|
servizioId={servizio.servizio_id}
|
||||||
userId={userId}
|
userId={userId}
|
||||||
>
|
>
|
||||||
<AnnuncioCard className="rounded-md border-primary" />
|
<AnnuncioCard className="max-w-4xl rounded-md border-primary" />
|
||||||
</ServizioAnnuncioProvider>
|
</ServizioAnnuncioProvider>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
@ -342,7 +342,6 @@ export const ServizioContent = () => {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-4">
|
||||||
<div className="grid grid-cols-1 gap-3 lg:grid-cols-2">
|
|
||||||
{servizio.annunci.map((data) => {
|
{servizio.annunci.map((data) => {
|
||||||
return (
|
return (
|
||||||
<ServizioAnnuncioProvider
|
<ServizioAnnuncioProvider
|
||||||
|
|
@ -351,14 +350,10 @@ export const ServizioContent = () => {
|
||||||
servizioId={servizio.servizio_id}
|
servizioId={servizio.servizio_id}
|
||||||
userId={userId}
|
userId={userId}
|
||||||
>
|
>
|
||||||
<AnnuncioCard className="rounded-md border-primary" />
|
<AnnuncioCard className="max-w-4xl rounded-md border-primary" />
|
||||||
</ServizioAnnuncioProvider>
|
</ServizioAnnuncioProvider>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{servizio.annunci.length % 2 === 1 && (
|
|
||||||
<div className="size-full rounded-md border border-(--pattern-fg) bg-[repeating-linear-gradient(45deg,var(--pattern-fg)_0,var(--pattern-fg)_1px,transparent_0,transparent_50%)] bg-size-[10px_10px] bg-fixed opacity-10 [--pattern-fg:#696969] dark:[--pattern-fg:#e1e1e1]" />
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex items-center justify-center">
|
<div className="flex items-center justify-center">
|
||||||
<AnnunciCompatibili />
|
<AnnunciCompatibili />
|
||||||
|
|
|
||||||
|
|
@ -552,7 +552,7 @@ export const en: LangDict = {
|
||||||
heads: {
|
heads: {
|
||||||
annunci_description: "Search for properties",
|
annunci_description: "Search for properties",
|
||||||
annunci_titolo: "Solutions - Infoalloggi.it",
|
annunci_titolo: "Solutions - Infoalloggi.it",
|
||||||
area_riservata_description: "Access your personal area",
|
area_riservata_description: "Personal Area Infoalloggi.it",
|
||||||
area_riservata_titolo: "Personal Area - Infoalloggi.it",
|
area_riservata_titolo: "Personal Area - Infoalloggi.it",
|
||||||
chi_siamo_titolo: "Who we are - Infoalloggi.it",
|
chi_siamo_titolo: "Who we are - Infoalloggi.it",
|
||||||
contatti_titolo: "Contacts - Infoalloggi.it",
|
contatti_titolo: "Contacts - Infoalloggi.it",
|
||||||
|
|
|
||||||
|
|
@ -556,7 +556,7 @@ export const it: LangDict = {
|
||||||
heads: {
|
heads: {
|
||||||
annunci_description: "Ricerca immobili",
|
annunci_description: "Ricerca immobili",
|
||||||
annunci_titolo: "Annunci - Infoalloggi.it",
|
annunci_titolo: "Annunci - Infoalloggi.it",
|
||||||
area_riservata_description: "Accedi alla tua area riservata",
|
area_riservata_description: "Area Riservata Infoalloggi.it",
|
||||||
area_riservata_titolo: "Area Riservata - Infoalloggi.it",
|
area_riservata_titolo: "Area Riservata - Infoalloggi.it",
|
||||||
chi_siamo_titolo: "Chi Siamo - Infoalloggi.it",
|
chi_siamo_titolo: "Chi Siamo - Infoalloggi.it",
|
||||||
contatti_titolo: "Contatti - Infoalloggi.it",
|
contatti_titolo: "Contatti - Infoalloggi.it",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { CodeSquare, RefreshCcw, TriangleAlert } from "lucide-react";
|
import { CodeSquare, RefreshCcw, TriangleAlert } from "lucide-react";
|
||||||
|
import Head from "next/head";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { Confirm } from "~/components/confirm";
|
import { Confirm } from "~/components/confirm";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
|
|
@ -41,6 +42,11 @@ const Admin_Annunci: NextPageWithLayout = () => {
|
||||||
if (isLoading) return <LoadingPage />;
|
if (isLoading) return <LoadingPage />;
|
||||||
if (!data) return <Status500 />;
|
if (!data) return <Status500 />;
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Annunci - Infoalloggi.it</title>
|
||||||
|
</Head>
|
||||||
|
|
||||||
<div className="mx-1 flex-1 overflow-auto">
|
<div className="mx-1 flex-1 overflow-auto">
|
||||||
<div className="mx-auto pt-4">
|
<div className="mx-auto pt-4">
|
||||||
<div className="mx-3 items-start justify-between md:flex">
|
<div className="mx-3 items-start justify-between md:flex">
|
||||||
|
|
@ -88,6 +94,7 @@ const Admin_Annunci: NextPageWithLayout = () => {
|
||||||
<AnnunciTable data={data} />
|
<AnnunciTable data={data} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { Plus, RefreshCcw } from "lucide-react";
|
import { Plus, RefreshCcw } from "lucide-react";
|
||||||
|
import Head from "next/head";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
|
|
@ -36,6 +37,10 @@ const AdminBanners: NextPageWithLayout = () => {
|
||||||
if (!data) return <Status500 />;
|
if (!data) return <Status500 />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Banners - Infoalloggi.it</title>
|
||||||
|
</Head>
|
||||||
<div className="mx-1 flex-1 overflow-auto">
|
<div className="mx-1 flex-1 overflow-auto">
|
||||||
<div className="mx-auto pt-4">
|
<div className="mx-auto pt-4">
|
||||||
<div className="mx-auto items-start justify-between px-2 md:flex">
|
<div className="mx-auto items-start justify-between px-2 md:flex">
|
||||||
|
|
@ -81,6 +86,7 @@ const AdminBanners: NextPageWithLayout = () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default AdminBanners;
|
export default AdminBanners;
|
||||||
|
|
@ -147,7 +153,7 @@ const EditModal = ({
|
||||||
return (
|
return (
|
||||||
<Dialog onOpenChange={setOpen} open={open}>
|
<Dialog onOpenChange={setOpen} open={open}>
|
||||||
<DialogTrigger asChild />
|
<DialogTrigger asChild />
|
||||||
<DialogContent className="sm:max-w-[425px]">
|
<DialogContent className="sm:max-w-106.25">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
{!initial ? "Aggiungi Banner" : "Modifica Valori"}
|
{!initial ? "Aggiungi Banner" : "Modifica Valori"}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { Plus, RefreshCcw } from "lucide-react";
|
import { Plus, RefreshCcw } from "lucide-react";
|
||||||
import type { GetServerSideProps } from "next";
|
import type { GetServerSideProps } from "next";
|
||||||
|
import Head from "next/head";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
|
|
@ -37,6 +38,10 @@ const AdminBlacklist: NextPageWithLayout = () => {
|
||||||
if (!data) return <Status500 />;
|
if (!data) return <Status500 />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Utenti - Infoalloggi.it</title>
|
||||||
|
</Head>
|
||||||
<div className="mx-1 flex-1 overflow-auto">
|
<div className="mx-1 flex-1 overflow-auto">
|
||||||
<div className="mx-auto pt-4">
|
<div className="mx-auto pt-4">
|
||||||
<div className="mx-auto items-start justify-between px-2 md:flex">
|
<div className="mx-auto items-start justify-between px-2 md:flex">
|
||||||
|
|
@ -82,6 +87,7 @@ const AdminBlacklist: NextPageWithLayout = () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default AdminBlacklist;
|
export default AdminBlacklist;
|
||||||
|
|
@ -151,7 +157,7 @@ const EditModal = ({
|
||||||
return (
|
return (
|
||||||
<Dialog onOpenChange={setOpen} open={open}>
|
<Dialog onOpenChange={setOpen} open={open}>
|
||||||
<DialogTrigger asChild />
|
<DialogTrigger asChild />
|
||||||
<DialogContent className="sm:max-w-[425px]">
|
<DialogContent className="sm:max-w-106.25">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
{!initial ? "Aggiungi Ban" : "Modifica Valori"}
|
{!initial ? "Aggiungi Ban" : "Modifica Valori"}
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,11 @@ import { LoadingPage } from "~/components/loading";
|
||||||
import { SiteHeader } from "~/components/navbar/site-header";
|
import { SiteHeader } from "~/components/navbar/site-header";
|
||||||
import { Status500 } from "~/components/status-page";
|
import { Status500 } from "~/components/status-page";
|
||||||
import type { NextPageWithLayout } from "~/pages/_app";
|
import type { NextPageWithLayout } from "~/pages/_app";
|
||||||
import { useTranslation } from "~/providers/I18nProvider";
|
|
||||||
import { useSession } from "~/providers/SessionProvider";
|
import { useSession } from "~/providers/SessionProvider";
|
||||||
import { TrpcAuthedFetchingIstance } from "~/server/utils/ssgHelper";
|
import { TrpcAuthedFetchingIstance } from "~/server/utils/ssgHelper";
|
||||||
import { api } from "~/utils/api";
|
import { api } from "~/utils/api";
|
||||||
|
|
||||||
const AdminChats: NextPageWithLayout = () => {
|
const AdminChats: NextPageWithLayout = () => {
|
||||||
const { t } = useTranslation();
|
|
||||||
const session = useSession();
|
const session = useSession();
|
||||||
|
|
||||||
const { data: activeChats, isLoading: isLoadingActiveChats } =
|
const { data: activeChats, isLoading: isLoadingActiveChats } =
|
||||||
|
|
@ -38,8 +36,7 @@ const AdminChats: NextPageWithLayout = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t.heads.area_riservata_titolo}</title>
|
<title>Chat - Infoalloggi.it</title>
|
||||||
<meta content={t.heads.area_riservata_description} name="description" />
|
|
||||||
</Head>
|
</Head>
|
||||||
<div className="flex h-full w-full flex-col md:flex-row">
|
<div className="flex h-full w-full flex-col md:flex-row">
|
||||||
<Sidebar
|
<Sidebar
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { Plus, RefreshCcw } from "lucide-react";
|
import { Plus, RefreshCcw } from "lucide-react";
|
||||||
import type { GetServerSideProps } from "next";
|
import type { GetServerSideProps } from "next";
|
||||||
|
import Head from "next/head";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
|
|
@ -38,6 +39,11 @@ const AdminEtichette: NextPageWithLayout = () => {
|
||||||
if (!data) return <Status500 />;
|
if (!data) return <Status500 />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Etichette - Infoalloggi.it</title>
|
||||||
|
</Head>
|
||||||
|
|
||||||
<div className="mx-1 flex-1 overflow-auto">
|
<div className="mx-1 flex-1 overflow-auto">
|
||||||
<div className="mx-auto pt-4">
|
<div className="mx-auto pt-4">
|
||||||
<div className="mx-3 items-start justify-between md:flex">
|
<div className="mx-3 items-start justify-between md:flex">
|
||||||
|
|
@ -82,6 +88,7 @@ const AdminEtichette: NextPageWithLayout = () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default AdminEtichette;
|
export default AdminEtichette;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { Plus, RefreshCcw } from "lucide-react";
|
import { Plus, RefreshCcw } from "lucide-react";
|
||||||
import type { GetServerSideProps } from "next";
|
import type { GetServerSideProps } from "next";
|
||||||
|
import Head from "next/head";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
|
|
@ -37,6 +38,10 @@ const AdminFlags: NextPageWithLayout = () => {
|
||||||
if (!data) return <Status500 />;
|
if (!data) return <Status500 />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Flags - Infoalloggi.it</title>
|
||||||
|
</Head>
|
||||||
<div className="mx-1 flex-1 overflow-auto">
|
<div className="mx-1 flex-1 overflow-auto">
|
||||||
<div className="mx-auto pt-4">
|
<div className="mx-auto pt-4">
|
||||||
<div className="mx-3 items-start justify-between md:flex">
|
<div className="mx-3 items-start justify-between md:flex">
|
||||||
|
|
@ -81,6 +86,7 @@ const AdminFlags: NextPageWithLayout = () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default AdminFlags;
|
export default AdminFlags;
|
||||||
|
|
@ -149,7 +155,7 @@ const EditModal = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog onOpenChange={setOpen} open={open}>
|
<Dialog onOpenChange={setOpen} open={open}>
|
||||||
<DialogContent className="sm:max-w-[425px]">
|
<DialogContent className="sm:max-w-106.25">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>{initial ? "Modifica" : "Aggiungi"}</DialogTitle>
|
<DialogTitle>{initial ? "Modifica" : "Aggiungi"}</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,13 @@
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
import type { NextPageWithLayout } from "~/pages/_app";
|
import type { NextPageWithLayout } from "~/pages/_app";
|
||||||
import { useTranslation } from "~/providers/I18nProvider";
|
|
||||||
import { api } from "~/utils/api";
|
import { api } from "~/utils/api";
|
||||||
|
|
||||||
const Impostazioni: NextPageWithLayout = () => {
|
const Impostazioni: NextPageWithLayout = () => {
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t.heads.area_riservata_titolo}</title>
|
<title>Impostazioni - Infoalloggi.it</title>
|
||||||
<meta content={t.heads.area_riservata_description} name="description" />
|
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<div className="mx-3 flex flex-1 flex-col gap-4 overflow-auto pt-5">
|
<div className="mx-3 flex flex-1 flex-col gap-4 overflow-auto pt-5">
|
||||||
|
|
@ -27,23 +23,6 @@ const Impostazioni: NextPageWithLayout = () => {
|
||||||
};
|
};
|
||||||
export default Impostazioni;
|
export default Impostazioni;
|
||||||
|
|
||||||
// export const getServerSideProps = (async (context) => {
|
|
||||||
// const access_token = context.req.cookies.access_token;
|
|
||||||
|
|
||||||
// const helpers = await TrpcAuthedFetchingIstance({ access_token });
|
|
||||||
// if (helpers) {
|
|
||||||
|
|
||||||
// return {
|
|
||||||
// props: {
|
|
||||||
// trpcState: helpers.trpc.dehydrate(),
|
|
||||||
// },
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
// return {
|
|
||||||
// props: {},
|
|
||||||
// };
|
|
||||||
// }) satisfies GetServerSideProps;
|
|
||||||
|
|
||||||
Impostazioni.getLayout = function getLayout(page) {
|
Impostazioni.getLayout = function getLayout(page) {
|
||||||
return <AreaRiservataLayout>{page}</AreaRiservataLayout>;
|
return <AreaRiservataLayout>{page}</AreaRiservataLayout>;
|
||||||
};
|
};
|
||||||
|
|
@ -53,7 +32,7 @@ const StripeSection = () => {
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return <div>Loading...</div>;
|
return <div>Loading...</div>;
|
||||||
}
|
}
|
||||||
console.log(data);
|
|
||||||
return (
|
return (
|
||||||
<div className="rounded-lg border p-4">
|
<div className="rounded-lg border p-4">
|
||||||
<h4 className="mb-2 font-semibold text-lg">
|
<h4 className="mb-2 font-semibold text-lg">
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,10 @@ import { LoadingPage } from "~/components/loading";
|
||||||
import { Status500 } from "~/components/status-page";
|
import { Status500 } from "~/components/status-page";
|
||||||
import { OrdiniTable } from "~/components/tables/orders-table";
|
import { OrdiniTable } from "~/components/tables/orders-table";
|
||||||
import type { NextPageWithLayout } from "~/pages/_app";
|
import type { NextPageWithLayout } from "~/pages/_app";
|
||||||
import { useTranslation } from "~/providers/I18nProvider";
|
|
||||||
import { TrpcAuthedFetchingIstance } from "~/server/utils/ssgHelper";
|
import { TrpcAuthedFetchingIstance } from "~/server/utils/ssgHelper";
|
||||||
import { api } from "~/utils/api";
|
import { api } from "~/utils/api";
|
||||||
|
|
||||||
const Ordini: NextPageWithLayout = () => {
|
const Ordini: NextPageWithLayout = () => {
|
||||||
const { t } = useTranslation();
|
|
||||||
const { data, isLoading } = api.servizio.getOrdini.useQuery({});
|
const { data, isLoading } = api.servizio.getOrdini.useQuery({});
|
||||||
|
|
||||||
if (isLoading) return <LoadingPage />;
|
if (isLoading) return <LoadingPage />;
|
||||||
|
|
@ -19,8 +17,7 @@ const Ordini: NextPageWithLayout = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t.heads.area_riservata_titolo}</title>
|
<title>Ordini - Infoalloggi.it</title>
|
||||||
<meta content={t.heads.area_riservata_description} name="description" />
|
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<div className="mx-3 flex flex-1 flex-col gap-4 overflow-auto pt-5">
|
<div className="mx-3 flex flex-1 flex-col gap-4 overflow-auto pt-5">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
|
import Head from "next/head";
|
||||||
import { NewColumn } from "~/components/area-riservata/potenziali";
|
import { NewColumn } from "~/components/area-riservata/potenziali";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
import { LoadingPage } from "~/components/loading";
|
import { LoadingPage } from "~/components/loading";
|
||||||
|
|
@ -19,6 +20,9 @@ const PotenzialiBoard = dynamic(
|
||||||
const AdminPotenziali: NextPageWithLayout = () => {
|
const AdminPotenziali: NextPageWithLayout = () => {
|
||||||
return (
|
return (
|
||||||
<PotenzialiProvider>
|
<PotenzialiProvider>
|
||||||
|
<Head>
|
||||||
|
<title>Potenziali - Infoalloggi.it</title>
|
||||||
|
</Head>
|
||||||
<div className="mx-1 flex-1 overflow-auto">
|
<div className="mx-1 flex-1 overflow-auto">
|
||||||
<div className="mx-auto pt-4">
|
<div className="mx-auto pt-4">
|
||||||
<div className="mx-3 flex-wrap items-start justify-between pb-5 sm:flex">
|
<div className="mx-3 flex-wrap items-start justify-between pb-5 sm:flex">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { RefreshCcw } from "lucide-react";
|
import { RefreshCcw } from "lucide-react";
|
||||||
|
import Head from "next/head";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
|
|
@ -39,6 +40,11 @@ const Admin_Prezziario: NextPageWithLayout = () => {
|
||||||
if (isLoading) return <LoadingPage />;
|
if (isLoading) return <LoadingPage />;
|
||||||
if (!data) return <Status500 />;
|
if (!data) return <Status500 />;
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Prezziario - Infoalloggi.it</title>
|
||||||
|
</Head>
|
||||||
|
|
||||||
<div className="mx-1 flex-1 overflow-auto">
|
<div className="mx-1 flex-1 overflow-auto">
|
||||||
<div className="mx-auto pt-4">
|
<div className="mx-auto pt-4">
|
||||||
<div className="mx-3 items-start justify-between md:flex">
|
<div className="mx-3 items-start justify-between md:flex">
|
||||||
|
|
@ -70,6 +76,7 @@ const Admin_Prezziario: NextPageWithLayout = () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -109,7 +116,7 @@ const NewPrezzoModal = () => {
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button variant="outline">Aggiungi Servizio</Button>
|
<Button variant="outline">Aggiungi Servizio</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent className="sm:max-w-[425px]">
|
<DialogContent className="sm:max-w-106.25">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Aggiungi Servizio</DialogTitle>
|
<DialogTitle>Aggiungi Servizio</DialogTitle>
|
||||||
<DialogDescription className="sr-only">Edit</DialogDescription>
|
<DialogDescription className="sr-only">Edit</DialogDescription>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { ChevronsUpDown, RefreshCcw } from "lucide-react";
|
import { ChevronsUpDown, RefreshCcw } from "lucide-react";
|
||||||
import type { GetServerSideProps } from "next";
|
import type { GetServerSideProps } from "next";
|
||||||
|
import Head from "next/head";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
|
|
@ -77,6 +78,9 @@ const AdminStorage: NextPageWithLayout = () => {
|
||||||
//magari query amche file ownership per poter filtrare in tab se da admin o da utente o una lista di utenti a cui è visibile il file
|
//magari query amche file ownership per poter filtrare in tab se da admin o da utente o una lista di utenti a cui è visibile il file
|
||||||
return (
|
return (
|
||||||
<StorageTableProvider>
|
<StorageTableProvider>
|
||||||
|
<Head>
|
||||||
|
<title>Allegati - Infoalloggi.it</title>
|
||||||
|
</Head>
|
||||||
<div className="mx-1 flex-1 overflow-auto">
|
<div className="mx-1 flex-1 overflow-auto">
|
||||||
<div className="mx-auto py-8">
|
<div className="mx-auto py-8">
|
||||||
<StorageTableHeader
|
<StorageTableHeader
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { Plus, RefreshCcw } from "lucide-react";
|
import { Plus, RefreshCcw } from "lucide-react";
|
||||||
import type { GetServerSideProps } from "next";
|
import type { GetServerSideProps } from "next";
|
||||||
|
import Head from "next/head";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
|
|
@ -37,6 +38,10 @@ const AdminTestiStringhe: NextPageWithLayout = () => {
|
||||||
if (!data) return <Status500 />;
|
if (!data) return <Status500 />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Testi e Stringhe - Infoalloggi.it</title>
|
||||||
|
</Head>
|
||||||
<div className="mx-1 flex-1 overflow-auto">
|
<div className="mx-1 flex-1 overflow-auto">
|
||||||
<div className="mx-auto pt-4">
|
<div className="mx-auto pt-4">
|
||||||
<div className="mx-auto items-start justify-between px-2 md:flex">
|
<div className="mx-auto items-start justify-between px-2 md:flex">
|
||||||
|
|
@ -82,6 +87,7 @@ const AdminTestiStringhe: NextPageWithLayout = () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { RefreshCcw } from "lucide-react";
|
import { RefreshCcw } from "lucide-react";
|
||||||
import type { GetServerSideProps } from "next";
|
import type { GetServerSideProps } from "next";
|
||||||
|
import Head from "next/head";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
import { LoadingPage } from "~/components/loading";
|
import { LoadingPage } from "~/components/loading";
|
||||||
|
|
@ -32,6 +33,10 @@ const Admin_Utenti: NextPageWithLayout = () => {
|
||||||
if (isLoading) return <LoadingPage />;
|
if (isLoading) return <LoadingPage />;
|
||||||
if (!data) return <Status500 />;
|
if (!data) return <Status500 />;
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Utenti - Infoalloggi.it</title>
|
||||||
|
</Head>
|
||||||
<div className="mx-1 flex-1 overflow-auto">
|
<div className="mx-1 flex-1 overflow-auto">
|
||||||
<div className="mx-auto pt-4">
|
<div className="mx-auto pt-4">
|
||||||
<div className="mx-3 items-start justify-between md:flex">
|
<div className="mx-3 items-start justify-between md:flex">
|
||||||
|
|
@ -53,6 +58,7 @@ const Admin_Utenti: NextPageWithLayout = () => {
|
||||||
<UsersTable data={data} />
|
<UsersTable data={data} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,15 @@ import Head from "next/head";
|
||||||
import { AllegatiComp } from "~/components/area-riservata/allegati";
|
import { AllegatiComp } from "~/components/area-riservata/allegati";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
import type { NextPageWithLayout } from "~/pages/_app";
|
import type { NextPageWithLayout } from "~/pages/_app";
|
||||||
import { useTranslation } from "~/providers/I18nProvider";
|
|
||||||
import { useEnforcedSession } from "~/providers/SessionProvider";
|
import { useEnforcedSession } from "~/providers/SessionProvider";
|
||||||
|
|
||||||
const Allegati: NextPageWithLayout = () => {
|
const Allegati: NextPageWithLayout = () => {
|
||||||
const { t } = useTranslation();
|
|
||||||
const session = useEnforcedSession();
|
const session = useEnforcedSession();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t.heads.area_riservata_titolo}</title>
|
<title>Allegati - Infoalloggi.it</title>
|
||||||
<meta content={t.heads.area_riservata_description} name="description" />
|
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<div className="grow p-4">
|
<div className="grow p-4">
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import Chat from "~/components/chat/chat";
|
||||||
import { LoadingPage } from "~/components/loading";
|
import { LoadingPage } from "~/components/loading";
|
||||||
import { SiteHeader } from "~/components/navbar/site-header";
|
import { SiteHeader } from "~/components/navbar/site-header";
|
||||||
import type { NextPageWithLayout } from "~/pages/_app";
|
import type { NextPageWithLayout } from "~/pages/_app";
|
||||||
import { useTranslation } from "~/providers/I18nProvider";
|
|
||||||
import type { ChatsChatid } from "~/schemas/public/Chats";
|
import type { ChatsChatid } from "~/schemas/public/Chats";
|
||||||
import type { Session } from "~/server/api/trpc";
|
import type { Session } from "~/server/api/trpc";
|
||||||
import { TrpcAuthedFetchingIstance } from "~/server/utils/ssgHelper";
|
import { TrpcAuthedFetchingIstance } from "~/server/utils/ssgHelper";
|
||||||
|
|
@ -21,13 +20,10 @@ const UserChat: NextPageWithLayout<UserChatProps> = ({
|
||||||
chatId,
|
chatId,
|
||||||
session,
|
session,
|
||||||
}: UserChatProps) => {
|
}: UserChatProps) => {
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t.heads.area_riservata_titolo}</title>
|
<title>Chat - Infoalloggi.it</title>
|
||||||
<meta content={t.heads.area_riservata_description} name="description" />
|
|
||||||
</Head>
|
</Head>
|
||||||
<div className="h-full flex-1 grow">
|
<div className="h-full flex-1 grow">
|
||||||
<div className="flex h-full w-full flex-row">
|
<div className="flex h-full w-full flex-row">
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,15 @@ import Head from "next/head";
|
||||||
import { EmailAccordion } from "~/components/area-riservata/comunicazioni";
|
import { EmailAccordion } from "~/components/area-riservata/comunicazioni";
|
||||||
import { AreaRiservataLayout } from "~/components/Layout";
|
import { AreaRiservataLayout } from "~/components/Layout";
|
||||||
import type { NextPageWithLayout } from "~/pages/_app";
|
import type { NextPageWithLayout } from "~/pages/_app";
|
||||||
import { useTranslation } from "~/providers/I18nProvider";
|
|
||||||
import { useEnforcedSession } from "~/providers/SessionProvider";
|
import { useEnforcedSession } from "~/providers/SessionProvider";
|
||||||
|
|
||||||
const Comunicazioni: NextPageWithLayout = () => {
|
const Comunicazioni: NextPageWithLayout = () => {
|
||||||
const { t } = useTranslation();
|
|
||||||
const session = useEnforcedSession();
|
const session = useEnforcedSession();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t.heads.area_riservata_titolo}</title>
|
<title>Comunicazioni - Infoalloggi.it</title>
|
||||||
<meta content={t.heads.area_riservata_description} name="description" />
|
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<div className="mx-auto max-w-8xl grow p-4">
|
<div className="mx-auto max-w-8xl grow p-4">
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,17 @@ import { LoadingPage } from "~/components/loading";
|
||||||
import { Status500 } from "~/components/status-page";
|
import { Status500 } from "~/components/status-page";
|
||||||
import { OrdiniTable } from "~/components/tables/orders-table";
|
import { OrdiniTable } from "~/components/tables/orders-table";
|
||||||
import type { NextPageWithLayout } from "~/pages/_app";
|
import type { NextPageWithLayout } from "~/pages/_app";
|
||||||
import { useTranslation } from "~/providers/I18nProvider";
|
|
||||||
import { useEnforcedSession } from "~/providers/SessionProvider";
|
import { useEnforcedSession } from "~/providers/SessionProvider";
|
||||||
import type { UsersId } from "~/schemas/public/Users";
|
import type { UsersId } from "~/schemas/public/Users";
|
||||||
import { TrpcAuthedFetchingIstance } from "~/server/utils/ssgHelper";
|
import { TrpcAuthedFetchingIstance } from "~/server/utils/ssgHelper";
|
||||||
import { api } from "~/utils/api";
|
import { api } from "~/utils/api";
|
||||||
|
|
||||||
const Ordini: NextPageWithLayout = () => {
|
const Ordini: NextPageWithLayout = () => {
|
||||||
const { t } = useTranslation();
|
|
||||||
const session = useEnforcedSession();
|
const session = useEnforcedSession();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t.heads.area_riservata_titolo}</title>
|
<title>Ordini - Infoalloggi.it</title>
|
||||||
<meta content={t.heads.area_riservata_description} name="description" />
|
|
||||||
</Head>
|
</Head>
|
||||||
<SessionWrapper userId={session.user.id} />
|
<SessionWrapper userId={session.user.id} />
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,10 @@ import { ProfileFormAccount } from "~/forms/FormProfilo_Account";
|
||||||
import { ProfileFormAnagrafica } from "~/forms/FormProfilo_Anagrafica";
|
import { ProfileFormAnagrafica } from "~/forms/FormProfilo_Anagrafica";
|
||||||
import type { NextPageWithLayout } from "~/pages/_app";
|
import type { NextPageWithLayout } from "~/pages/_app";
|
||||||
import { CatastoProvider } from "~/providers/CatastoProvider";
|
import { CatastoProvider } from "~/providers/CatastoProvider";
|
||||||
import { useTranslation } from "~/providers/I18nProvider";
|
|
||||||
import { useEnforcedSession } from "~/providers/SessionProvider";
|
import { useEnforcedSession } from "~/providers/SessionProvider";
|
||||||
import { api } from "~/utils/api";
|
import { api } from "~/utils/api";
|
||||||
|
|
||||||
const Dashboard: NextPageWithLayout = () => {
|
const Dashboard: NextPageWithLayout = () => {
|
||||||
const { t } = useTranslation();
|
|
||||||
const { user } = useEnforcedSession();
|
const { user } = useEnforcedSession();
|
||||||
|
|
||||||
const { data: userData, isLoading } = api.users.getClientProfilo.useQuery({
|
const { data: userData, isLoading } = api.users.getClientProfilo.useQuery({
|
||||||
|
|
@ -35,8 +33,7 @@ const Dashboard: NextPageWithLayout = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t.heads.area_riservata_titolo}</title>
|
<title>Profilo - Infoalloggi.it</title>
|
||||||
<meta content={t.heads.area_riservata_description} name="description" />
|
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<div className="mx-auto w-full max-w-5xl grow p-4">
|
<div className="mx-auto w-full max-w-5xl grow p-4">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue