Added images for cdn and edit Imagepreload
All checks were successful
Build frontend / build (push) Successful in 25s
All checks were successful
Build frontend / build (push) Successful in 25s
This commit is contained in:
@ -1,14 +1,16 @@
|
||||
// DepartmentDetail5.jsx
|
||||
import React, { useState, useEffect, useRef, useCallback } from "react";
|
||||
import { motion, AnimatePresence } from "framer-motion";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import d18 from "../../../../src/assets/Images/d18.jpg";
|
||||
import d25 from "../../../../src/assets/Images/d25.jpeg";
|
||||
import d26 from "../../../../src/assets/Images/d26.jpeg";
|
||||
// import d18 from "../../../../src/assets/Images/d18.jpg";
|
||||
// import d25 from "../../../../src/assets/Images/d25.jpeg";
|
||||
// import d26 from "../../../../src/assets/Images/d26.jpeg";
|
||||
|
||||
|
||||
const d18="https://i.imgur.com/ZhYek8J.jpeg";
|
||||
const d25="https://i.imgur.com/Bte4bPE.jpeg";
|
||||
const d26="https://i.imgur.com/QlbXMye.jpeg";
|
||||
|
||||
|
||||
/**
|
||||
* ProjectsTimeline: same logic as original, accepts rtl prop to flip text-align and small behaviors.
|
||||
*/
|
||||
function ProjectsTimeline({
|
||||
projects,
|
||||
mainTitle = "المشاريع المنفذة",
|
||||
@ -308,7 +310,6 @@ function ProjectsTimeline({
|
||||
);
|
||||
}
|
||||
|
||||
/** fallback timeline (used if translations missing) */
|
||||
const defaultProjects = [
|
||||
{
|
||||
year: "2009-2010",
|
||||
@ -358,7 +359,6 @@ export default function DepartmentDetail5() {
|
||||
const { t, i18n } = useTranslation();
|
||||
const [active, setActive] = useState(null);
|
||||
|
||||
// direction: rely on i18n.dir() if available, otherwise language prefix
|
||||
const isRTL = typeof i18n.dir === "function" ? i18n.dir() === "rtl" : (i18n.language || "").startsWith("ar");
|
||||
const dir = isRTL ? "rtl" : "ltr";
|
||||
|
||||
@ -367,7 +367,6 @@ export default function DepartmentDetail5() {
|
||||
{ id: 3, title: t("departmentDetail5.buttons.3"), key: "works", img: d26 }
|
||||
];
|
||||
|
||||
// expertise items (translation array)
|
||||
const expertiseItemsRaw = t("departmentDetail5.expertiseItems", { returnObjects: true });
|
||||
const expertiseItems = Array.isArray(expertiseItemsRaw) && expertiseItemsRaw.length > 0 ? expertiseItemsRaw : [
|
||||
"إجراء الفحوصات غير الإتلافية (NDT) للكشف عن العيوب الخفية في المكونات المعدنية.",
|
||||
@ -393,7 +392,6 @@ export default function DepartmentDetail5() {
|
||||
return { icon, text };
|
||||
});
|
||||
|
||||
// timeline translations or fallback
|
||||
const timelineProjectsRaw = t("departmentDetail5.projectsTimeline.defaultProjects", { returnObjects: true });
|
||||
const timelineProjects = Array.isArray(timelineProjectsRaw) && timelineProjectsRaw.length > 0 ? timelineProjectsRaw : defaultProjects;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user