diff --git a/backend/apps.yaml b/backend/apps.yaml index 8c186c3..26307a1 100644 --- a/backend/apps.yaml +++ b/backend/apps.yaml @@ -39,3 +39,9 @@ sections: name: fgbhn - apps: [] name: dfgb +- apps: + - description: opensource s3 app + icon: minio.svg + name: Minio + url: https://minio.dvirlabs.com + name: Infra diff --git a/frontend/src/components/SectionGrid.jsx b/frontend/src/components/SectionGrid.jsx index dfe326c..956aa9b 100644 --- a/frontend/src/components/SectionGrid.jsx +++ b/frontend/src/components/SectionGrid.jsx @@ -1,11 +1,49 @@ +import { useState, useRef, useEffect } from 'react'; import AppGrid from './AppGrid'; +import { FaChevronDown } from 'react-icons/fa'; import '../style/SectionGrid.css'; function SectionGrid({ section, onEdit, onDelete }) { + const [collapsed, setCollapsed] = useState(false); + const contentRef = useRef(null); + const [height, setHeight] = useState('auto'); + + const toggle = () => { + setCollapsed(prev => !prev); + }; + + useEffect(() => { + if (!contentRef.current) return; + + if (!collapsed) { + const scrollHeight = contentRef.current.scrollHeight; + setHeight(`${scrollHeight}px`); + } else { + setHeight('0px'); + } + }, [collapsed, section.apps?.length]); + return (