fix some bug in some blocks

This commit is contained in:
mr.sabri
2026-07-23 06:55:21 +03:30
parent 89fbd6d158
commit edb3e10469
65 changed files with 1565 additions and 1476 deletions
+23 -18
View File
@@ -151,6 +151,7 @@ interface Feature216Props {
const Feature216 = ({ className }: Feature216Props) => {
const [buttonPosition, setButtonPosition] = useState<number>(0);
// Rightmost tab in RTL (`justify-start`) is the first item.
const [tabValue, setTabValue] = useState<TabValue>(TAB_ITEMS[0].value);
const triggerRefs = useRef<HTMLButtonElement[]>([]);
const imageRef = useRef<HTMLDivElement | null>(null);
@@ -198,6 +199,8 @@ const Feature216 = ({ className }: Feature216Props) => {
setTabValue(value as TabValue);
};
const currentIndex = getCurrentTabIndex();
return (
<section dir="rtl" lang="fa" className={cn("py-32", className)}>
<div className="container">
@@ -205,7 +208,7 @@ const Feature216 = ({ className }: Feature216Props) => {
شاخص‌های کلیدی را یکجا ببینید
</h2>
<Tabs value={tabValue} onValueChange={onValueChange} className="w-full">
<TabsList className="hidden !h-auto w-full items-end gap-12 bg-transparent pb-10 xl:flex">
<TabsList className="hidden !h-auto w-full !justify-start items-end gap-12 bg-transparent pb-10 xl:flex">
{TAB_ITEMS.map((trigger, index) => {
const Icon = trigger.icon;
@@ -259,32 +262,34 @@ const Feature216 = ({ className }: Feature216Props) => {
</p>
</TabsContent>
))}
<div
className="absolute start-0 translate-y-1/2"
style={{ bottom: buttonPosition }}
>
<Button
variant="secondary"
disabled={getCurrentTabIndex() === 0}
onClick={() => handleTabNavigation("prev")}
size="lg"
className="size-12 -translate-x-1/2 rounded-full border shadow-lg rtl:translate-x-1/2"
>
<ArrowLeft className="rtl:rotate-180" />
</Button>
</div>
{/* Physical left (end in RTL): previous — moves toward rightmost tabs */}
<div
className="absolute end-0 translate-y-1/2"
style={{ bottom: buttonPosition }}
>
<Button
variant="secondary"
disabled={getCurrentTabIndex() === TAB_ITEMS.length - 1}
onClick={() => handleTabNavigation("next")}
disabled={currentIndex <= 0}
onClick={() => handleTabNavigation("prev")}
size="lg"
className="size-12 translate-x-1/2 rounded-full border shadow-lg rtl:-translate-x-1/2"
>
<ArrowRight className="rtl:rotate-180" />
<ArrowRight />
</Button>
</div>
{/* Physical right (start in RTL): next — moves toward leftmost tabs */}
<div
className="absolute start-0 translate-y-1/2"
style={{ bottom: buttonPosition }}
>
<Button
variant="secondary"
disabled={currentIndex >= TAB_ITEMS.length - 1}
onClick={() => handleTabNavigation("next")}
size="lg"
className="size-12 -translate-x-1/2 rounded-full border shadow-lg rtl:translate-x-1/2"
>
<ArrowLeft />
</Button>
</div>
</div>