diff --git a/src/agenda/presentation/component/CardEvent.jsx b/src/agenda/presentation/component/CardEvent.jsx index 6505acdd3368429c3b159328c4f64b4a253b91ab..7118d74bed6465656320d58a309f52ba9d821c0b 100644 --- a/src/agenda/presentation/component/CardEvent.jsx +++ b/src/agenda/presentation/component/CardEvent.jsx @@ -22,7 +22,6 @@ function CardEvent({ event, joinEvent, leaveEvent, deleteEvent, shareEvent, data setLeaveEventBtn(!isLeaveEventBtn); }; - console.log(event); const joinEventFunction = (e, type) => joinEvent(e, type); diff --git a/src/agenda/presentation/component/EventDetails.jsx b/src/agenda/presentation/component/EventDetails.jsx index 4511e19f03b4b11e2ec2571aa3723dd4c0afa2ad..650d79eba3eb911f5f53cc34cbba131981f35435 100644 --- a/src/agenda/presentation/component/EventDetails.jsx +++ b/src/agenda/presentation/component/EventDetails.jsx @@ -40,7 +40,6 @@ function EventDetails({ event, mode, joinEvent, leaveEvent }) { ); }; - console.log(event); const changeRole = event.isFollowed && ( <button diff --git a/src/agenda/presentation/component/form/OrganizesThis.jsx b/src/agenda/presentation/component/form/OrganizesThis.jsx index 4ce8c3d241cbc1a7dd64c205ccab66fa0b348804..9aadccbbab6939a57efc0e9381195a89c133ffb9 100644 --- a/src/agenda/presentation/component/form/OrganizesThis.jsx +++ b/src/agenda/presentation/component/form/OrganizesThis.jsx @@ -11,7 +11,6 @@ function OrganizesThis({ results, callBackGetList, valueCallBack, editData, setS const [uniqueId, setUniqueId] = useState(0); const [remainingResults, setRemainingResults] = useState([]); const [value, setValue] = useState([]); - // console.log(results); useEffect(() => { if (editData !== undefined || editData == "") { diff --git a/src/core/presentation/component/CustomDrawer.jsx b/src/core/presentation/component/CustomDrawer.jsx index 144f796233e1f00f224c2b004f44822eccfbe26b..e1f25e4a8e4e711b3be3d9a5fe8e60d4fc148143 100644 --- a/src/core/presentation/component/CustomDrawer.jsx +++ b/src/core/presentation/component/CustomDrawer.jsx @@ -3,47 +3,46 @@ import MiniCardIcon from "./MiniCardIcon"; import PropTypes from 'prop-types'; import { Link } from "preact-router"; -function CustomDrawer({ isOpenDrawer, openAndCloseDrawer, openPageTitle, placement, children, iconActionPage, overflowType }) { - - return ( - <Drawer - overlay={true} - size={550} - placement={placement} - open={isOpenDrawer} - onClose={openAndCloseDrawer} - className={`rounded-bl-lg rounded-tl-lg px-4 py-2 bg-gray-200 dark:bg-gray-900 opacity-100 w-full h-full ${overflowType == undefined ? "overflow-auto" : overflowType}`} - > - <div className="flex items-center justify-between"> - <MiniCardIcon className={"bg-lime-600 dark:bg-gray-600 text-white cursor-pointer"} icon={"fa fa-close"} onClick={openAndCloseDrawer} /> - { - openPageTitle && ( - <Link - href={"/login"} - > - <div className="inline-flex w-auto h-8 mr-0 px-1 text-sm space-x-1 items-center cursor-pointer justify-center bg-lime-600 text-white dark:text-gray-300 transition-colors duration-150 dark:bg-gray-600 rounded-lg focus:shadow-outline"> - <span> {openPageTitle} </span> - {iconActionPage == undefined || iconActionPage == true ? - <i class="fa-solid fa-arrow-up-right-from-square"></i> : - null +function CustomDrawer({ isOpenDrawer, openAndCloseDrawer, openPageTitle, placement, children, iconActionPage, overflowType, link, dataToGet }) { + return ( + <Drawer + overlay={true} + size={550} + placement={placement} + open={isOpenDrawer} + onClose={openAndCloseDrawer} + className={`rounded-bl-lg rounded-tl-lg px-4 py-2 bg-gray-200 dark:bg-gray-900 opacity-100 w-full h-full ${overflowType == undefined ? "overflow-auto" : overflowType}`} + > + <div className="flex items-center justify-between"> + <MiniCardIcon className={"bg-lime-600 dark:bg-gray-600 text-white cursor-pointer"} icon={"fa fa-close"} onClick={openAndCloseDrawer} /> + { + openPageTitle && ( + <Link + href={`/profile/${link}?array=${encodeURIComponent(JSON.stringify(dataToGet))}`} + > + <div className="inline-flex w-auto h-8 mr-0 px-1 text-sm space-x-1 items-center cursor-pointer justify-center bg-lime-600 text-white dark:text-gray-300 transition-colors duration-150 dark:bg-gray-600 rounded-lg focus:shadow-outline"> + <span> {openPageTitle} </span> + {iconActionPage == undefined || iconActionPage == true ? + <i class="fa-solid fa-arrow-up-right-from-square"></i> : + null + } + </div> + </Link> + ) } - </div> - </Link> - ) - } - </div> + </div> - {children} + {children} - </Drawer> + </Drawer> - ); + ); } CustomDrawer.propTypes = { - openPageTitle: PropTypes.string.isRequired, - children: PropTypes.node.isRequired, - placement: PropTypes.string + openPageTitle: PropTypes.string.isRequired, + children: PropTypes.node.isRequired, + placement: PropTypes.string }; export default CustomDrawer; \ No newline at end of file diff --git a/src/core/presentation/component/input/InputSimple.jsx b/src/core/presentation/component/input/InputSimple.jsx index c558b6d9d5c1089b8797fb9a9c7c3c338792234a..8934b297b77dfc4f4a1499f80a2f4dadc3832fe4 100644 --- a/src/core/presentation/component/input/InputSimple.jsx +++ b/src/core/presentation/component/input/InputSimple.jsx @@ -24,7 +24,6 @@ function InputSimple({ label, type, ctrl, value, placeholder, defaultValue, my, if (type === 'url') { setIsValid(isValidURL(newValue)); // Vérifier si l'URL est valide et mettre à jour l'état isValid en conséquence - console.log(isValidURL(newValue)); } if (newValue === "" && ctrl != undefined) { diff --git a/src/news/presentation/component/Login.jsx b/src/news/presentation/component/Login.jsx index 4f39af44c7b38dd168bc1397e15ad8b8a7a60656..aa3a44e73c98a289618d4bc2e07d056ae4311140 100644 --- a/src/news/presentation/component/Login.jsx +++ b/src/news/presentation/component/Login.jsx @@ -37,7 +37,6 @@ const Login = () => { authenticated() .then(() => route('/')) .catch(reason => { - console.log('reason', reason); route('/login', true); }); @@ -57,7 +56,6 @@ const Login = () => { let requestObj = authenticate(email, password); await requestObj .then(async (response) => { - console.log('response', JSON.stringify(response)); if (response.data.status == 404) { setMessage("L'email ou le mot de passe est incorrect."); return; diff --git a/src/news/presentation/container/CommentList.jsx b/src/news/presentation/container/CommentList.jsx index 3af82b58c34a46d44d310b4905746df0e341ea30..02f19b83773afc86be8048475de6102314331af2 100755 --- a/src/news/presentation/container/CommentList.jsx +++ b/src/news/presentation/container/CommentList.jsx @@ -5,7 +5,6 @@ import ReponseList from "../container/ReponseList"; import { addComments, addaction, deleteCommments, getComments, updateComment } from "../../infrastructure/api/news-api"; export default function CommentList({ articleComments, idNews, imageConnected }) { - // console.log(imageConnected); const [selectedReponse, setSelectedReponse] = useState(null); const [loading, setloading] = useState(false) diff --git a/src/profile/presentation/component/AllAction.jsx b/src/profile/presentation/component/AllAction.jsx index c952542e8134735a7dd3db1c5cd347fec32925b8..6524af0bb4257a750e8aed5efca917b0f9137985 100644 --- a/src/profile/presentation/component/AllAction.jsx +++ b/src/profile/presentation/component/AllAction.jsx @@ -21,25 +21,29 @@ function AllAction({ tabsProps }) { return ( <> - <div className="border-b rounded-t-lg border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900 mb-2"> + <div className="w-full border-b rounded-t-lg border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900 mb-2"> <ul className="flex flex-wrap -mb-px text-sm font-medium text-center text-gray-500 dark:text-gray-400"> <li className="me-2 cursor-pointer" onClick={() => changetabs('journal')}> <div className={tabs === 'journal' ? activeTabs : noActiveTabs} aria-current="page"> <i className="fa-regular fa-newspaper mr-2"></i> Actualités </div> </li> - <li className="me-2 cursor-pointer" onClick={() => changetabs('agenda')}> - <div className={tabs === 'agenda' ? activeTabs : noActiveTabs}> - <i className="fa-solid fa-calendar-day mr-2"></i> Agenda + <li className="me-2 cursor-pointer" onClick={() => changetabs('projectsPoi')}> + <div className={tabs === 'projectsPoi' ? activeTabs : noActiveTabs}> + <i className="fa-solid fa-lightbulb mr-2"></i> Projets & Poi </div> </li> </ul> </div> {tabs === 'journal' ? ( - <div className='h-[calc(100vh-160px)] overflow-auto'> + <div className='h-[calc(100vh-160px)] overflow-auto w-full'> <ListArticle articleProps={[]} /> </div> + ) : tabs === 'projectsPoi' ? ( + <div className='h-[calc(100vh-160px)] overflow-auto w-full'> + Lorem ipsum dolor, sit amet consectetur adipisicing elit. Eligendi dignissimos praesentium ex saepe enim sequi corrupti assumenda fugit quasi eveniet suscipit ullam consequuntur a omnis soluta incidunt, veritatis, magni minus. + </div> ) : tabs === 'parametre' ? ( <> <Settings /> diff --git a/src/profile/presentation/component/Info.jsx b/src/profile/presentation/component/Info.jsx index 9217eb9be04070726c84171862e8f9b7c5d2d6b4..ffcfd973d9b3dc99ec59000158d85106e5c63658 100644 --- a/src/profile/presentation/component/Info.jsx +++ b/src/profile/presentation/component/Info.jsx @@ -1,4 +1,4 @@ -import React from 'react' +import React, { useEffect } from 'react' import MapDetaille from '../../../searchAll/presentation/component/MapDetaille' import DateTimeOpen from '../../../searchAll/presentation/component/DateTimeOpen' import { USER_CONNECTED } from '../../../core/application/constant/common'; @@ -13,39 +13,40 @@ import moment from "../../../core/application/helpers/moment"; import AdressDetaille from '../../../agenda/presentation/component/form/AdressDetaille'; function Info({ element }) { + console.log(element) const [showModal, setshowModal] = useState(false) const [titleModal, settitleModal] = useState("") const [block, setblock] = useState("") // Description - const [shortDescription, setshortDescription] = useState(element.shortDescription) - const [description, setdescription] = useState(element.description) + const [shortDescription, setshortDescription] = useState(element?.shortDescription) + const [description, setdescription] = useState(element?.description) // Info - const [name, setname] = useState(element.name) - const [birthDate, setbirthDate] = useState(moment(element.birthDate).format('YYYY-MM-DD')) + const [name, setname] = useState(element?.name) + const [birthDate, setbirthDate] = useState(moment.unix(element?.birthDate?.sec).format('YYYY-MM-DD')) const [fixe, setfixe] = useState( - element.telephone && element.telephone.fixe ? ( - element.telephone.fixe[0] + element?.telephone && element?.telephone.fixe ? ( + element?.telephone.fixe[0] ) : ( "" ) ) const [mobile, setmobile] = useState( - element.telephone && element.telephone.mobile ? ( - element.telephone.mobile[0] + element?.telephone && element?.telephone.mobile ? ( + element?.telephone.mobile[0] ) : ( "" ) ) - const [url, seturl] = useState(element.url ? element.url : '') - const [tags, settags] = useState(element.tags) - const [email, setemail] = useState(element.email ? element.email : "Non renseigné(e)") + const [url, seturl] = useState(element?.url ? element?.url : '') + const [tags, settags] = useState(element?.tags) + const [email, setemail] = useState(element?.email ? element?.email : "Non renseigné(e)") const [urlCtrl, seturlCtrl] = useState(false) const [urlNetworkCtrl, seturlNetworkCtrl] = useState({}) const socialNetworkKeys = ['gitlab', 'github', 'twitter', 'facebook', 'instagram', 'diaspora', 'mastodon', 'telegram', 'signal']; const initialState = socialNetworkKeys.reduce((acc, key) => { - acc[key] = element.socialNetwork?.[key] ?? ''; + acc[key] = element?.socialNetwork?.[key] ?? ''; return acc; }, {}); @@ -58,6 +59,36 @@ function Info({ element }) { }, }; + useEffect(() => { + if (element) { + setname(element?.name); + setbirthDate(moment.unix(element?.birthDate?.sec).format('YYYY-MM-DD')); + setshortDescription(element?.shortDescription) + setdescription(element?.description) + seturl(element?.url ? element?.url : '') + settags(element?.tags) + setemail(element?.email ? element?.email : "Non renseigné(e)") + const initialState = socialNetworkKeys.reduce((acc, key) => { + acc[key] = element?.socialNetwork?.[key] ?? ''; + return acc; + }, {}); + setfixe( + element?.telephone && element?.telephone.fixe ? ( + element?.telephone.fixe[0] + ) : ( + "" + ) + ) + setmobile( + element?.telephone && element?.telephone.mobile ? ( + element?.telephone.mobile[0] + ) : ( + "" + ) + ) + } + }, [element]); + const modalShowUpdateDescription = () => { setblock("descriptions") setshowModal(true) @@ -75,7 +106,7 @@ function Info({ element }) { const valideUpdateBlock = async () => { if (block == 'descriptions') { - const response = await updateBlockDescription(block, element.collection, shortDescription, description, undefined, USER_CONNECTED.id, "") + const response = await updateBlockDescription(block, element?.collection, shortDescription, description, undefined, USER_CONNECTED.id, "") if (response.data.result === true) { toast.success(<div dangerouslySetInnerHTML={{ __html: response.data.resultGoods.msg }} />, toastOptions); } @@ -92,7 +123,7 @@ function Info({ element }) { result += '1'; } if (result == '1') { - const response = await updateBlockInfo(block, element.collection, name, birthDate, fixe, mobile, url, tags, email, undefined, USER_CONNECTED.id, "") + const response = await updateBlockInfo(block, element?.collection, name, birthDate, fixe, mobile, url, tags, email, undefined, USER_CONNECTED.id, "") if (response.data.result === true) { toast.success(<div dangerouslySetInnerHTML={{ __html: response.data.resultGoods.msg }} />, toastOptions); setshowModal(false) @@ -108,7 +139,7 @@ function Info({ element }) { } else if (block == 'network') { const response = await updateBlockNetwork( block, - element.collection, + element?.collection, socialNetworkState.gitlab, socialNetworkState.github, socialNetworkState.twitter, @@ -151,19 +182,25 @@ function Info({ element }) { setshowModal(true) settitleModal("MODIFIER VOS COORDONNÉES") } + + if (typeof element !== 'object') { + // Si props.isValid n'est pas un objet, affichez un message d'erreur dans la console et retournez null + console.error('isValid prop must be an object.'); + return null; + } return ( <> <div className='px-4'> <div className="p-2 text-gray-900 dark:text-gray-300"> <ol className="relative border-s border-lime-600 dark:border-gray-800 mb-5"> - <li className={`ms-6 w-full mb-4 ${element.id == USER_CONNECTED.id ? ' hover:p-2 hover:dark:bg-gray-800 hover:rounded-lg group' : ''}`}> + <li className={`ms-6 w-full mb-4 ${element?.id == USER_CONNECTED.id ? ' hover:p-2 hover:dark:bg-gray-800 hover:rounded-lg group' : ''}`}> <span className="absolute flex items-center justify-center w-6 h-6 rounded-full -start-3 ring-8 ring-white dark:ring-gray-800 bg-lime-600 text-gray-100"> <i className="fa-solid fa-file-lines"></i> </span> <div className='flex justify-between'> <h3 className="flex items-center text-base font-semibold dark:text-gray-200">DESCRIPTIONS</h3> <i - className={`flex items-center fas fa-pencil fa-sm cursor-pointer opacity-0 ${element.id == USER_CONNECTED.id ? 'group-hover:opacity-100' : ''}`} + className={`flex items-center fas fa-pencil fa-sm cursor-pointer opacity-0 ${element?.id == USER_CONNECTED.id ? 'group-hover:opacity-100' : ''}`} onClick={modalShowUpdateDescription} > </i> @@ -178,13 +215,13 @@ function Info({ element }) { </span> </li> - <li className={`ms-6 w-full ${element.id == USER_CONNECTED.id ? ' hover:p-2 hover:dark:bg-gray-800 hover:rounded-lg group' : ''}`}> + <li className={`ms-6 w-full ${element?.id == USER_CONNECTED.id ? ' hover:p-2 hover:dark:bg-gray-800 hover:rounded-lg group' : ''}`}> <span className="absolute flex items-center justify-center w-6 h-6 rounded-full -start-3 ring-8 ring-white dark:ring-gray-800 bg-lime-600 text-gray-100"> <i className="fa-solid fa-address-book"></i> </span> <div className='flex justify-between'> <h3 className="flex items-center mb-1 text-base font-semibold dark:text-gray-200">INFORMATIONS GÉNÉRALES</h3> - <i className={`flex items-center fas fa-pencil fa-sm cursor-pointer opacity-0 ${element.id == USER_CONNECTED.id ? 'group-hover:opacity-100' : ''}`} + <i className={`flex items-center fas fa-pencil fa-sm cursor-pointer opacity-0 ${element?.id == USER_CONNECTED.id ? 'group-hover:opacity-100' : ''}`} onClick={modalShowUpdateInfo} > @@ -220,7 +257,7 @@ function Info({ element }) { )} </span> </p> - {element.collection == "organizations" || element.collection == "citoyens" && + {element?.collection == "organizations" || element?.collection == "citoyens" && <> <p className="mb-2 text-sm font-normal"> <span> @@ -254,17 +291,17 @@ function Info({ element }) { </p> </li> - <li className={`ms-6 my-2 w-full ${element.id == USER_CONNECTED.id ? ' hover:p-2 hover:dark:bg-gray-800 hover:rounded-lg group' : ''}`}> + <li className={`ms-6 my-2 w-full ${element?.id == USER_CONNECTED.id ? ' hover:p-2 hover:dark:bg-gray-800 hover:rounded-lg group' : ''}`}> <span className="absolute flex items-center justify-center w-6 h-6 rounded-full -start-3 ring-8 ring-white dark:ring-gray-800 bg-lime-600 text-gray-100"> <i className="fa-solid fa-circle-nodes"></i> </span> <div className='flex justify-between'> <h3 className="flex items-center mb-1 text-base font-semibold dark:text-gray-200">RÉSEAUX SOCIAUX</h3> - <i className={`flex items-center fas fa-pencil fa-sm cursor-pointer opacity-0 ${element.id == USER_CONNECTED.id ? 'group-hover:opacity-100' : ''}`} + <i className={`flex items-center fas fa-pencil fa-sm cursor-pointer opacity-0 ${element?.id == USER_CONNECTED.id ? 'group-hover:opacity-100' : ''}`} onClick={modalShowUpdateNetwork} ></i> </div> - {element.socialNetwork ? ( + {element?.socialNetwork ? ( <div className="flex flex-wrap justify-center gap-2"> {Object.keys(socialNetworkState).map((key, index) => ( socialNetworkState[key] !== '' && ( @@ -279,40 +316,40 @@ function Info({ element }) { )} </li> - {element.openingHours || element.endDate && element.startDate && element.collection != "poi" && element.collection != "citoyens" ? + {element?.openingHours || element?.endDate && element?.startDate && element?.collection != "poi" && element?.collection != "citoyens" ? <DateTimeOpen - type={element.collection} - startDate={element.startDate} - endDate={element.endDate} - openingHours={element.openingHours} - /> : element.collection != "poi" && element.collection != "citoyens" ? + type={element?.collection} + startDate={element?.startDate} + endDate={element?.endDate} + openingHours={element?.openingHours} + /> : element?.collection != "poi" && element?.collection != "citoyens" ? <li className="mb-4 ms-6"> <span className="absolute flex items-center justify-center w-6 h-6 rounded-full -start-3 ring-8 ring-white dark:ring-gray-800 bg-lime-600 text-gray-100"> <i className="fa-solid fa-clock"></i> </span> - <h3 className="flex items-center mb-1 text-base font-semibold dark:text-gray-200">{element.collection == "projects" ? "QUAND" : "HEURE D'OUVERTURE"}</h3> + <h3 className="flex items-center mb-1 text-base font-semibold dark:text-gray-200">{element?.collection == "projects" ? "QUAND" : "HEURE D'OUVERTURE"}</h3> Non renseigné(e) </li> : null } - <li className={`ms-6 w-full ${element.id == USER_CONNECTED.id ? ' hover:p-2 hover:dark:bg-gray-800 hover:rounded-lg group' : ''}`}> + <li className={`ms-6 w-full ${element?.id == USER_CONNECTED.id ? ' hover:p-2 hover:dark:bg-gray-800 hover:rounded-lg group' : ''}`}> <span className="absolute flex items-center justify-center w-6 h-6 rounded-full -start-3 ring-8 ring-white dark:ring-gray-800 bg-lime-600 text-gray-100"> <i className="fa-solid fa-location-dot"></i> </span> <div className='flex justify-between'> <h3 className="flex items-center mb-1 text-base font-semibold dark:text-gray-200">ADRESSE</h3> - <i className={`flex items-center fas fa-pencil fa-sm cursor-pointer opacity-0 ${element.id == USER_CONNECTED.id ? 'group-hover:opacity-100' : ''}`} + <i className={`flex items-center fas fa-pencil fa-sm cursor-pointer opacity-0 ${element?.id == USER_CONNECTED.id ? 'group-hover:opacity-100' : ''}`} onClick={modalShowUpdateAdresse} ></i> </div> - {element.address && element.geo ? + {element?.address && element?.geo ? <> <span className='text-sm font-normal'> - {element.address.streetAddress} / {element.address.addressLocality} / {element.address.level1Name} + {element?.address.streetAddress} / {element?.address.addressLocality} / {element?.address.level1Name} </span> <MapDetaille - latitude={element.geo.latitude} - longitude={element.geo.longitude} + latitude={element?.geo.latitude} + longitude={element?.geo.longitude} /> </> : <> diff --git a/src/profile/presentation/container/ProfileApp.jsx b/src/profile/presentation/container/ProfileApp.jsx index d60f8f07a706d7d1bda194030b3eb784dea0935e..0c1a20a3027d817723ed7efe18f93921dbd6a07a 100644 --- a/src/profile/presentation/container/ProfileApp.jsx +++ b/src/profile/presentation/container/ProfileApp.jsx @@ -1,17 +1,16 @@ import StateContext from "../../../core/context/state-context"; -import Navbar from "../../../core/presentation/component/Navbar"; import AppLayout from "../../../core/presentation/container/AppLayout"; import { configureStates } from "../../application/state/index" import ProfileIndex from "./ProfileIndex"; export function ProfileApp(props) { + const exemple = props.matches?.array; return ( <> <StateContext.Provider value={configureStates()}> - {/* <Navbar /> */} <AppLayout hideDefault={"hidden"}> - <div className="px-2 mx-auto max-w-screen-xl min-w-screen-xl flex mt-5 overflow-hidden"> - <ProfileIndex slug={props.matches.slug}/> + <div className="max-w-screen-xl min-w-screen-xl flex mt-5 overflow-hidden"> + <ProfileIndex slug={props.matches.slug} data={exemple != undefined && JSON.parse(exemple)}/> </div> </AppLayout> </StateContext.Provider> diff --git a/src/profile/presentation/container/ProfileIndex.jsx b/src/profile/presentation/container/ProfileIndex.jsx index 87649564697434c1991190ea97ba11b7dc3d1ad4..136644801b97187f456c8231f4118673f39ca487 100644 --- a/src/profile/presentation/container/ProfileIndex.jsx +++ b/src/profile/presentation/container/ProfileIndex.jsx @@ -5,27 +5,29 @@ import AsPdcAndPdp from '../../../core/presentation/component/AsPdcAndPdp' import { useState } from 'preact/hooks' import { useAuth } from '../../../core/context/auth-context' -function ProfileIndex({ slug }) { +function ProfileIndex({ slug, data }) { const { user } = useAuth(); const [changeTabs, setchangeTabs] = useState("") let dataProfile = []; if (slug == 'me') { dataProfile = user + } else { + dataProfile = data } return ( <> <div className="w-full flex flex-col md:flex-row"> <div className='w-full md:w-1/3 -mt-2 bg-white dark:bg-gray-900 rounded-b-lg md:flex-col md:order-1'> <AsPdcAndPdp - collection={dataProfile.collection} - profilMediumImageUrl={dataProfile.profilMediumImageUrl} - profilBannerUrl={dataProfile.profilBannerUrl} + collection={dataProfile?.collection} + profilMediumImageUrl={dataProfile?.profilMediumImageUrl} + profilBannerUrl={dataProfile?.profilBannerUrl} changeTabs={(e) => setchangeTabs(e)} /> <div className='px-4'> <div className="mt-8 flex flex-col items-center"> <h4 className="text-xl font-bold text-navy-700 dark:text-gray-200"> - {dataProfile.name} + {dataProfile?.name} </h4> </div> <div className='h-[calc(100vh-350px)] overflow-y-auto overflow-x-hidden'> diff --git a/src/profile/presentation/container/Settings.jsx b/src/profile/presentation/container/Settings.jsx index a13b3d766ad672a4d3b1ce606de50f0ad12a9d57..e2e435e2c572925fca2bc1ad901613c7d6df0264 100644 --- a/src/profile/presentation/container/Settings.jsx +++ b/src/profile/presentation/container/Settings.jsx @@ -156,7 +156,7 @@ function Settings() { } return ( - <div className="w-full h-auto rounded-lg text-gray-50 bg-gray-800 flex flex-col space-y-2 text-xs p-3"> + <div className="w-full h-auto rounded-lg text-gray-50 bg-gray-800 flex flex-col text-xs p-3"> {/* user information */} {Object.entries(settings).map(([settingKey, initialValue]) => ( <div diff --git a/src/project/application/state/index.js b/src/project/application/state/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/project/application/state/projectState.js b/src/project/application/state/projectState.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/project/index.jsx b/src/project/index.jsx new file mode 100644 index 0000000000000000000000000000000000000000..219afbcc569e8764de8a796f15508bbd13842a33 --- /dev/null +++ b/src/project/index.jsx @@ -0,0 +1,7 @@ +import "preact/debug"; +import { render } from "preact" +import "../core/assets/css/main.css" +import "../core/assets/css/markdown.css" +import { ProjectApp } from "./presentation/container/ProjectApp" + +render(<ProjectApp />, document.getElementById('project-app')) \ No newline at end of file diff --git a/src/project/infrastructure/api/project-api.js b/src/project/infrastructure/api/project-api.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/project/infrastructure/constant/api-endpoints.js b/src/project/infrastructure/constant/api-endpoints.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/project/presentation/component/Card.jsx b/src/project/presentation/component/Card.jsx new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/project/presentation/container/ProjectApp.jsx b/src/project/presentation/container/ProjectApp.jsx new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/register/presentation/container/RegisterForm.jsx b/src/register/presentation/container/RegisterForm.jsx index cb4e08bf5d9c617f8ed0e169481b6caa91802af3..4d49b22398e6148ee2ee427d43406bf806beae8b 100644 --- a/src/register/presentation/container/RegisterForm.jsx +++ b/src/register/presentation/container/RegisterForm.jsx @@ -30,15 +30,6 @@ function RegisterForm() { color: '#fff', }, }; - console.log( - name, - username, - email, - pwd, - repwd, - regleconfidentianl, - regleconfidentianl1 - ); const registerBtn = async () => { let resultCtrl = ''; @@ -87,7 +78,6 @@ function RegisterForm() { } else { toast.error('Veuillez vérifier les champs', toastOptions); } - console.log(resultCtrl); } return ( diff --git a/src/searchAll/presentation/component/Card.jsx b/src/searchAll/presentation/component/Card.jsx index c3ee89dbf069c389e07c9a8037cad465e37cedc6..c1d1b3ba51d283f5abb52cd245aa28f9142d6fac 100644 --- a/src/searchAll/presentation/component/Card.jsx +++ b/src/searchAll/presentation/component/Card.jsx @@ -3,10 +3,9 @@ import { BASE_URL, USER_CONNECTED } from '../../../core/application/constant/com import defaultImage from "../../../core/assets/images/defaultImage.png"; import { Tooltip } from 'react-tooltip'; -function Card({ isAuthenticated, element, openShareModal, action, jointAction, leaveAction, openRightDetailleFunction }) { +function Card({ isAuthenticated, element, openShareModal, action, jointAction, leaveAction, openRightDetailleFunction, user }) { let backgroundColor; let icon; - if (element.type === 'NGO') { backgroundColor = 'bg-lime-600'; icon = 'fa-solid fa-users text-gray-200'; @@ -81,8 +80,8 @@ function Card({ isAuthenticated, element, openShareModal, action, jointAction, l </div> ) : null; - const isFollower = element.links && element.links.followers && element.links.followers[USER_CONNECTED.id] !== undefined; - const isContributor = element.links && element.links.contributors && element.links.contributors[USER_CONNECTED.id] !== undefined; + const isFollower = element.links && element.links.followers && element.links.followers[user._id.$id] !== undefined; + const isContributor = element.links && element.links.contributors && element.links.contributors[user._id.$id] !== undefined; let buttonText = ""; let actionOnClick = () => { }; diff --git a/src/searchAll/presentation/component/CarousselTags.jsx b/src/searchAll/presentation/component/CarousselTags.jsx index 858dcc447b0de6da16843df39f775b1344a60edf..f876f656d4c7f914fad5acc289d3fb86960d5164 100644 --- a/src/searchAll/presentation/component/CarousselTags.jsx +++ b/src/searchAll/presentation/component/CarousselTags.jsx @@ -11,7 +11,6 @@ function CarousselTags({ tagsSearchValue, tagsSearchDefaultValue }) { }, [tagsSearchDefaultValue]) const handleClick = (value) => { - console.log('loremmmmmmmmmm'); if (value.some(tag => tags.includes(tag))) { const updatedTags = tags.filter(tag => !value.includes(tag)); settags(updatedTags); @@ -23,83 +22,86 @@ function CarousselTags({ tagsSearchValue, tagsSearchDefaultValue }) { } return ( - <Carousel - className="rounded-xl w-full h-full md:h-[110px] overflow-hidden" - navigation={({ setActiveIndex, activeIndex, length }) => ( - <div className="absolute bottom-1 left-2/4 z-30 flex -translate-x-2/4 gap-2"> - {new Array(length).fill("").map((_, i) => ( - <span - key={i} - className={`hover:bg-lime-600 z-50 block h-1 cursor-pointer rounded-2xl transition-all content-[''] ${activeIndex === i ? "w-8 h-2 bg-lime-600" : "w-4 h-2 bg-white/50" - }`} - onClick={() => setActiveIndex(i)} - /> - ))} - </div> - )} - prevArrow={({ handlePrev }) => ( - <IconButton - onClick={handlePrev} - className="!absolute top-1/2 -left-3 -mt-1 -translate-y-2/4 bg-transparent h-full" - > - <i style={{ fontSize: 22 }} class="fa-solid fa-chevron-left text-lime-600 dark:text-gray-200"></i> - </IconButton> - )} - nextArrow={({ handleNext }) => ( - <IconButton - onClick={handleNext} - className="!absolute top-1/2 right-0 -translate-y-2/4 bg-transparent h-full" - > - <i style={{ fontSize: 22 }} class="fa-solid fa-chevron-right text-lime-600 dark:text-gray-200"></i> - </IconButton> - )} - > - <div class="mx-10 md:grid md:grid-cols-6 lg:grid-cols-6 gap-4 space-y-4 md:space-y-0 overflow-hidden"> - {TagsType.slice(0, 6).map(({ value, image, label }) => ( - <div - className={`bg-gray-900 h-28 shadow-xl rounded-bl-lg rounded-lg overflow-hidden transform cursor-pointer ${value.some((tag) => tags.includes(tag)) ? 'border-2 border-lime-600' : '' - }`} - > - <div className="relative" onClick={() => handleClick(value)}> - <img - src={image} - className="h-28 w-full object-cover rounded-lg rounded-br-lg bg-gray-300 dark:bg-gray-700 transform hover:scale-105 transition duration-1000" + <> + <h1 className="mb-4 z-0 -mt-2 text-xl font-bold leading-none tracking-tight text-gray-700 dark:text-gray-200">Thematiques</h1> + <Carousel + className="rounded-xl w-full h-full md:h-[110px] overflow-hidden" + navigation={({ setActiveIndex, activeIndex, length }) => ( + <div className="absolute bottom-1 left-2/4 z-30 flex -translate-x-2/4 gap-2"> + {new Array(length).fill("").map((_, i) => ( + <span + key={i} + className={`hover:bg-lime-600 z-30 block h-1 cursor-pointer rounded-2xl transition-all content-[''] ${activeIndex === i ? "w-8 h-2 bg-lime-600" : "w-4 h-2 bg-white/50" + }`} + onClick={() => setActiveIndex(i)} /> - <div className="text-gray-100 font-bold text-center"> - <h1 className="absolute dark:text-gray-200 text-xs bottom-0 w-full text-center backdrop-blur-sm bg-gray-800 bg-opacity-75 rounded-bl-lg rounded-br-lg"> - <div className='py-1'> - {label} - </div> - </h1> + ))} + </div> + )} + prevArrow={({ handlePrev }) => ( + <IconButton + onClick={handlePrev} + className="!absolute top-1/2 -left-3 -mt-1 -translate-y-2/4 bg-transparent h-full" + > + <i style={{ fontSize: 22 }} class="fa-solid fa-chevron-left text-lime-600 dark:text-gray-200"></i> + </IconButton> + )} + nextArrow={({ handleNext }) => ( + <IconButton + onClick={handleNext} + className="!absolute top-1/2 right-0 -translate-y-2/4 bg-transparent h-full" + > + <i style={{ fontSize: 22 }} class="fa-solid fa-chevron-right text-lime-600 dark:text-gray-200"></i> + </IconButton> + )} + > + <div class="mx-10 md:grid md:grid-cols-6 lg:grid-cols-6 gap-4 space-y-4 md:space-y-0 overflow-hidden"> + {TagsType.slice(0, 6).map(({ value, image, label }) => ( + <div + className={`bg-gray-900 h-28 shadow-xl rounded-bl-lg rounded-lg overflow-hidden transform cursor-pointer ${value.some((tag) => tags.includes(tag)) ? 'border-2 border-lime-600' : '' + }`} + > + <div className="relative" onClick={() => handleClick(value)}> + <img + src={image} + className="h-28 w-full object-cover rounded-lg rounded-br-lg bg-gray-300 dark:bg-gray-700 transform hover:scale-105 transition duration-1000" + /> + <div className="text-gray-100 font-bold text-center"> + <h1 className="absolute dark:text-gray-200 text-xs bottom-0 w-full text-center backdrop-blur-sm bg-gray-800 bg-opacity-75 rounded-bl-lg rounded-br-lg"> + <div className='py-1'> + {label} + </div> + </h1> + </div> </div> </div> - </div> - ))} - </div> + ))} + </div> - <div class="mx-10 md:grid md:grid-cols-6 lg:grid-cols-6 gap-4 space-y-4 md:space-y-0 overflow-hidden"> - {TagsType.slice(6).map(({ value, image, label }) => ( - <div - className={`bg-gray-900 h-28 shadow-xl rounded-bl-lg rounded-lg overflow-hidden transform cursor-pointer ${value.some((tag) => tags.includes(tag)) ? 'border-2 border-lime-600' : '' - }`} - > - <div className="relative" onClick={() => handleClick(value)}> - <img - src={image} - className="h-28 w-full object-cover rounded-lg rounded-br-lg bg-gray-300 dark:bg-gray-700 transform hover:scale-105 transition duration-1000" - /> - <div className="text-gray-100 font-bold text-center"> - <h1 className="absolute dark:text-gray-200 text-xs bottom-0 w-full text-center backdrop-blur-sm bg-gray-800 bg-opacity-75 rounded-bl-lg rounded-br-lg"> - <div className='py-1'> - {label} - </div> - </h1> + <div class="mx-10 md:grid md:grid-cols-6 lg:grid-cols-6 gap-4 space-y-4 md:space-y-0 overflow-hidden"> + {TagsType.slice(6).map(({ value, image, label }) => ( + <div + className={`bg-gray-900 h-28 shadow-xl rounded-bl-lg rounded-lg overflow-hidden transform cursor-pointer ${value.some((tag) => tags.includes(tag)) ? 'border-2 border-lime-600' : '' + }`} + > + <div className="relative" onClick={() => handleClick(value)}> + <img + src={image} + className="h-28 w-full object-cover rounded-lg rounded-br-lg bg-gray-300 dark:bg-gray-700 transform hover:scale-105 transition duration-1000" + /> + <div className="text-gray-100 font-bold text-center"> + <h1 className="absolute dark:text-gray-200 text-xs bottom-0 w-full text-center backdrop-blur-sm bg-gray-800 bg-opacity-75 rounded-bl-lg rounded-br-lg"> + <div className='py-1'> + {label} + </div> + </h1> + </div> </div> </div> - </div> - ))} - </div> - </Carousel> + ))} + </div> + </Carousel> + </> ) } diff --git a/src/searchAll/presentation/component/SearchForm.jsx b/src/searchAll/presentation/component/SearchForm.jsx index 3308e3c6a29eb603ecb43ff2afe093cb9914e439..55bd66f4cf48640c35c46c27883d840f71fb297e 100644 --- a/src/searchAll/presentation/component/SearchForm.jsx +++ b/src/searchAll/presentation/component/SearchForm.jsx @@ -4,7 +4,7 @@ import SearchLocality from './SearchLocality'; import SearchViaType from './SearchViaType'; import Favoris from '../container/Favoris'; -function SearchForm({ isAuthenticated, name, count, typeValue, typeDefaultValue, setlocality, setlocalityDefault, tagsSearch, setParsedParamsTypeFavoris, setParsedParamsTagsFavoris, localityFavoris }) { +function SearchForm({ isAuthenticated, name, count, typeValue, typeDefaultValue, setlocality, setlocalityDefault, tagsSearch, setParsedParamsTypeFavoris, setParsedParamsTagsFavoris, localityFavoris }) { const [inputValue, setInputValue] = useState(''); useEffect(() => { @@ -39,35 +39,84 @@ function SearchForm({ isAuthenticated, name, count, typeValue, typeDefaultValue, return ( - <div className='flex justify-between'> - <div className="flex flex-col md:flex-row items-center md:justify-end -pt-3 p-3 rounded-lg mx-20"> - <div className="w-full relative flex-grow mb-4 md:mb-0 md:mr-4"> - <input - value={inputValue} - onChange={handleInputChange} - type="text" - className="block p-1.5 z-20 text-sm text-gray-900 bg-gray-50 rounded-lg border-s-gray-50 border-s-2 border border-gray-300 focus:ring-lime-500 focus:border-lime-500 dark:bg-gray-700 dark:border-s-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-gray-200 dark:focus:border-lime-500 w-full outline-none" - placeholder="Que recherchez-vous ?" + <div> + <div className='hidden sm:block mb-2'> + <div className='flex justify-between p-1'> + <div className="flex flex-col md:flex-row items-center md:justify-end -pt-3 rounded-lg"> + <div className="w-full relative flex-grow mb-4 md:mb-0 md:mr-4"> + <input + value={inputValue} + onChange={handleInputChange} + type="text" + className="block p-1.5 z-20 text-sm text-gray-900 bg-gray-50 rounded-lg border-s-gray-50 border-s-2 border border-gray-300 focus:ring-lime-500 focus:border-lime-500 dark:bg-gray-700 dark:border-s-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-gray-200 dark:focus:border-lime-500 w-full outline-none" + placeholder="Que recherchez-vous ?" + /> + <button type="submit" className="absolute top-0 right-0 p-1.5 text-sm font-medium text-gray-200 bg-lime-700 rounded-e-lg border border-lime-700 hover:bg-lime-800 focus:ring-1 focus:outline-none focus:ring-lime-300 dark:bg-lime-600 dark:hover:bg-lime-700 dark:focus:ring-lime-800"> + <i className="fa-solid fa-search mx-2"></i> + </button> + </div> + <SearchLocality setlocality={setlocality} setlocalityDefault={setlocalityDefault} /> + <SearchViaType + count={count} + typeValue={typeValue} + typeDefaultValue={typeDefaultValue} + /> + </div> + <Favoris + typeSearch={typeDefaultValue} + tagsSearch={tagsSearch} + locality={setlocalityDefault} + onArrayMerge={extractSearchParams} + localityFavoris={localityFavoris} + isAuthenticated={isAuthenticated} + /> + </div> + </div> + <div className='block sm:hidden mx-3'> + <div className='flex flex-row w-full space-x-2'> + <div className='w-1/2'> + <div className="w-full relative flex-grow mb-4 md:mb-0 md:mr-4"> + <input + value={inputValue} + onChange={handleInputChange} + type="text" + className="block p-1.5 z-20 text-sm text-gray-900 bg-gray-50 rounded-lg border-s-gray-50 border-s-2 border border-gray-300 focus:ring-lime-500 focus:border-lime-500 dark:bg-gray-700 dark:border-s-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-gray-200 dark:focus:border-lime-500 w-full outline-none" + placeholder="Que recherchez-vous ?" + /> + <button type="submit" className="absolute top-0 right-0 p-1.5 text-sm font-medium text-gray-200 bg-lime-700 rounded-e-lg border border-lime-700 hover:bg-lime-800 focus:ring-1 focus:outline-none focus:ring-lime-300 dark:bg-lime-600 dark:hover:bg-lime-700 dark:focus:ring-lime-800"> + <i className="fa-solid fa-search mx-2"></i> + </button> + </div> + </div> + <div className='w-1/2'> + <SearchLocality setlocality={setlocality} setlocalityDefault={setlocalityDefault} /> + </div> + </div> + <div className='flex flex-row w-full space-x-2 -mb-4'> + <div className='w-1/2 -mt-6'> + <SearchViaType + count={count} + typeValue={typeValue} + typeDefaultValue={typeDefaultValue} + /> + </div> + <div className='w-1/2 -mt-2'> + <button type="submit" className="w-full p-1.5 text-sm font-medium text-gray-200 bg-lime-700 rounded-lg border border-lime-700 hover:bg-lime-800 focus:ring-1 focus:outline-none focus:ring-lime-300 dark:bg-lime-600 dark:hover:bg-lime-700 dark:focus:ring-lime-800 "> + Thematiques + </button> + </div> + </div> + <div className='md:hidden sm:flex absolute bottom-7 right-4 z-40'> + <Favoris + typeSearch={typeDefaultValue} + tagsSearch={tagsSearch} + locality={setlocalityDefault} + onArrayMerge={extractSearchParams} + localityFavoris={localityFavoris} + isAuthenticated={isAuthenticated} /> - <button type="submit" className="absolute top-0 right-0 p-1.5 text-sm font-medium text-gray-200 bg-lime-700 rounded-e-lg border border-lime-700 hover:bg-lime-800 focus:ring-1 focus:outline-none focus:ring-lime-300 dark:bg-lime-600 dark:hover:bg-lime-700 dark:focus:ring-lime-800"> - <i className="fa-solid fa-search mx-2"></i> - </button> </div> - <SearchLocality setlocality={setlocality} setlocalityDefault={setlocalityDefault} /> - <SearchViaType - count={count} - typeValue={typeValue} - typeDefaultValue={typeDefaultValue} - /> </div> - <Favoris - typeSearch={typeDefaultValue} - tagsSearch={tagsSearch} - locality={setlocalityDefault} - onArrayMerge={extractSearchParams} - localityFavoris={localityFavoris} - isAuthenticated={isAuthenticated} - /> </div> ) } diff --git a/src/searchAll/presentation/component/SearchLocality.jsx b/src/searchAll/presentation/component/SearchLocality.jsx index 876408f3309ee30a51345e99c5707fe2261bd7a4..7219078920c789d9d6e5e63431d01d31114ee569 100644 --- a/src/searchAll/presentation/component/SearchLocality.jsx +++ b/src/searchAll/presentation/component/SearchLocality.jsx @@ -3,7 +3,6 @@ import React from 'react' import { globalAutocompleteCities } from '../../infrastructure/api/search-api'; function SearchLocality({ setlocality, setlocalityDefault }) { - console.log(setlocalityDefault); const [inputValue, setInputValue] = useState(''); const [isOpen, setIsOpen] = useState(false); const [results, setresults] = useState([]); diff --git a/src/searchAll/presentation/component/ShareInSearch.jsx b/src/searchAll/presentation/component/ShareInSearch.jsx index a9d9e659d271e1c0dadacdeab96f5deb9778562b..688a721b13b2bd8b287cd16c13ae4cb5b8a8ee45 100644 --- a/src/searchAll/presentation/component/ShareInSearch.jsx +++ b/src/searchAll/presentation/component/ShareInSearch.jsx @@ -5,7 +5,6 @@ import Card from './Card' import Textarea from '../../../core/presentation/component/input/Textarea' function ShareInSearch({ show, close, title, dataInShare, comment }) { - // console.log(dataInShare); return ( <Modal show={show} title={title} close={close} isLoading={false} onSubmitText={"Partager"} style={"h-auto overflow-y-auto overflow-x-hidden"}> diff --git a/src/searchAll/presentation/container/Favoris.jsx b/src/searchAll/presentation/container/Favoris.jsx index ada759e829b775d7a7b1166b498382f38f7cdc7a..ae74b5d8083dba3f89a2fee5854f5e14bffc5874 100644 --- a/src/searchAll/presentation/container/Favoris.jsx +++ b/src/searchAll/presentation/container/Favoris.jsx @@ -61,8 +61,7 @@ function Favoris({ isAuthenticated, typeSearch, tagsSearch, locality, onArrayMer } else { setlistOrAddShow(false) } - console.log(favoris.signal.value); - // console.log(resultConfirme); + } }; function toggleRow(index, url) { @@ -87,7 +86,6 @@ function Favoris({ isAuthenticated, typeSearch, tagsSearch, locality, onArrayMer } const deleteShowConst = (index) => { - console.log(index); setExpandedRows([]) setdeleteShow(prevState => { if (prevState.includes(index)) { @@ -186,7 +184,7 @@ function Favoris({ isAuthenticated, typeSearch, tagsSearch, locality, onArrayMer } return ( <> - <div className='mt-3 pr-2 text-gray-200 font-semibold' onClick={openDetailsFunction}> + <div className='pr-2 text-gray-200 font-semibold' onClick={openDetailsFunction}> <button data-tooltip-id="favorisId" data-tooltip-content="Vous devez être connecté" disabled={isAuthenticated === false} diff --git a/src/searchAll/presentation/container/ListeSearch.jsx b/src/searchAll/presentation/container/ListeSearch.jsx index fae5774908e67f51b77563a91bc2443f027d22c5..ec191117d83da08903882b8f252b90c1b3c86ffd 100644 --- a/src/searchAll/presentation/container/ListeSearch.jsx +++ b/src/searchAll/presentation/container/ListeSearch.jsx @@ -62,6 +62,7 @@ function ListeSearch() { fetchData(); }, [name, typeSearch, tagsSearch, locality]) + const sumResutNoFilter = Object.values(articleCount.signal.value).reduce((accumulator, currentValue) => accumulator + currentValue, 0); const filteredKeys = Object.keys(articleCount.signal.value) @@ -205,8 +206,7 @@ function ListeSearch() { isAuthenticated={isAuthenticated} /> <div className="w-full overflow-y-auto lg:overflow-x-hidden p-2 rounded-lg shadow"> - <div className={`${marginTopClass} transition-margin duration-500 ease-in-out`}> - <h1 className="mb-4 -mt-2 text-xl font-bold leading-none tracking-tight text-gray-700 dark:text-gray-200">Thematiques</h1> + <div className={`${marginTopClass} transition-margin duration-500 ease-in-out hidden sm:block`}> <CarousselTags tagsSearchValue={setTagsSearch} tagsSearchDefaultValue={tagsSearch} @@ -227,7 +227,7 @@ function ListeSearch() { </>} </button> </div> - <div className="ml-5 overflow-x-auto hide-scrollbar flex max-w-[50rem]"> + <div className="ml-5 overflow-x-auto hide-scrollbar flex max-w-[50rem] mt-1.5"> {typeSearch.map((item) => ( <span class="whitespace-nowrap bg-blue-100 text-blue-800 text-xs font-medium mr-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"> <i onClick={() => removeTypeSearch(item)} class="fa-solid fa-circle-xmark mr-1 cursor-pointer"></i> @@ -259,6 +259,7 @@ function ListeSearch() { jointAction={jointAction} openRightDetailleFunction={openDetailsFunction} isAuthenticated={isAuthenticated} + user={user} /> ))} {endNews ? ( @@ -309,6 +310,8 @@ function ListeSearch() { <CustomDrawer isOpenDrawer={isOpenCustomDrawer} openAndCloseDrawer={openDetailsFunction} + link={dataToGet.slug} + dataToGet={dataToGet} openPageTitle={"Ouvrir la page"} placement={'right'} overflowType={"overflow-hidden"} @@ -316,8 +319,6 @@ function ListeSearch() { <DetailleRight element={dataToGet} /> </CustomDrawer> - - </> ) }