refactor(CardAnnuncio, CarouselAnnuncio): Improve class order for better styling consistency
delete(MotivazioneTransitorio): Remove unused component to clean up codebase
This commit is contained in:
parent
967935f0a8
commit
11b74ed6dc
2 changed files with 3 additions and 69 deletions
|
|
@ -75,7 +75,7 @@ export const CardAnnuncio = ({
|
|||
//target="_blank"
|
||||
href={`/annuncio/${codice}`} //duration-700 ease-in-out animate-in fade-in
|
||||
>
|
||||
<div className="group relative text-clip rounded-md outline outline-neutral-300 overflow-clip">
|
||||
<div className="group relative overflow-clip text-clip rounded-md outline outline-neutral-300">
|
||||
{stato === "Trattativa" && (
|
||||
<div>
|
||||
<div className="absolute z-20 h-56 w-full">
|
||||
|
|
@ -273,7 +273,7 @@ export const CarouselAnnuncio = ({
|
|||
<ImageFlbk
|
||||
alt={img}
|
||||
className={cn(
|
||||
" w-full rounded-md object-cover aspect-square max-h-92 sm:max-h-80",
|
||||
"aspect-square max-h-92 w-full rounded-md object-cover sm:max-h-80",
|
||||
immagini.length === 1 && "object-contain",
|
||||
)}
|
||||
height={400}
|
||||
|
|
|
|||
|
|
@ -1,66 +0,0 @@
|
|||
import { Circle, CircleCheck } from "lucide-react";
|
||||
import {
|
||||
Accordion,
|
||||
AccordionContent,
|
||||
AccordionItem,
|
||||
AccordionTrigger,
|
||||
} from "~/components/ui/accordion";
|
||||
import { Separator } from "~/components/ui/separator";
|
||||
import { UploadModal } from "~/components/upload_modal";
|
||||
import { cn } from "~/lib/utils";
|
||||
import { useTranslation } from "~/providers/I18nProvider";
|
||||
import type { UsersId } from "~/schemas/public/Users";
|
||||
|
||||
export const MotivazioneTransitorio = ({
|
||||
value,
|
||||
onValueChange,
|
||||
userId,
|
||||
}: {
|
||||
value: string | undefined;
|
||||
onValueChange: (v: string) => void;
|
||||
userId: UsersId;
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Accordion
|
||||
collapsible
|
||||
onValueChange={(v) => {
|
||||
onValueChange(v);
|
||||
}}
|
||||
type="single"
|
||||
value={value}
|
||||
>
|
||||
{t.preferenze.motivazioni_mappings.map((option) => (
|
||||
<AccordionItem key={option.id} value={option.id}>
|
||||
<AccordionTrigger
|
||||
className={cn(
|
||||
value === option.id &&
|
||||
"text-primary underline underline-offset-2",
|
||||
)}
|
||||
>
|
||||
<div className={cn("flex items-center justify-start gap-2")}>
|
||||
{value === option.id ? (
|
||||
<CircleCheck className="size-5 stroke-primary" />
|
||||
) : (
|
||||
<Circle className="size-5 stroke-muted-foreground" />
|
||||
)}
|
||||
{option.title}
|
||||
</div>
|
||||
</AccordionTrigger>
|
||||
<AccordionContent>
|
||||
<div className="rounded-lg border border-border p-4">
|
||||
<p>{option.text}</p>
|
||||
{option.cta && (
|
||||
<>
|
||||
<Separator className="my-4" />
|
||||
<UploadModal isAdmin={false} userId={userId} />
|
||||
<p>{option.cta_label}</p>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</AccordionContent>
|
||||
</AccordionItem>
|
||||
))}
|
||||
</Accordion>
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue