refactor: simplify button usage in AnnuncioInteractions and ContattoAnnuncio components
This commit is contained in:
parent
cfbeadb93b
commit
0327957b3b
2 changed files with 6 additions and 5 deletions
|
|
@ -4,8 +4,7 @@ import { useRouter } from "next/router";
|
|||
import toast from "react-hot-toast";
|
||||
import { ContattoAnnuncio } from "~/components/annuncio-interactions/contatto_modal";
|
||||
import LoadingButton from "~/components/custom_ui/loading-button";
|
||||
import { Button, buttonVariants } from "~/components/ui/button";
|
||||
import { cn } from "~/lib/utils";
|
||||
import { Button } from "~/components/ui/button";
|
||||
import { useAnnuncio } from "~/providers/AnnuncioProvider";
|
||||
import { useServizio } from "~/providers/ServizioProvider";
|
||||
import type { SessionContextType } from "~/providers/SessionProvider";
|
||||
|
|
@ -48,13 +47,15 @@ export const AnnuncioInteractions = ({
|
|||
<span className="w-full text-center text-sm">oppure</span>
|
||||
<Link
|
||||
aria-label="Login"
|
||||
className={cn(buttonVariants({ variant: "default" }))}
|
||||
href={{
|
||||
pathname: "/login",
|
||||
query: { redirect: router.asPath },
|
||||
}}
|
||||
>
|
||||
<LogIn className="mr-1 size-7" /> Accedi se hai un account
|
||||
<Button className="w-full">
|
||||
<LogIn />
|
||||
<span>Accedi se hai un account</span>
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export const ContattoAnnuncio = () => {
|
|||
<Credenza>
|
||||
<CredenzaTrigger asChild>
|
||||
<Button className="w-full" variant="destructive">
|
||||
<MessageCircleQuestion className="size-6" /> Contattaci
|
||||
<MessageCircleQuestion /> Contattaci
|
||||
</Button>
|
||||
</CredenzaTrigger>
|
||||
<CredenzaContent className="max-h-[90vh]">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue