diff --git a/ui/src/components/ActiveJobWidget.tsx b/ui/src/components/ActiveJobWidget.tsx new file mode 100644 index 00000000..481bfb61 --- /dev/null +++ b/ui/src/components/ActiveJobWidget.tsx @@ -0,0 +1,73 @@ +'use client'; + +import Link from 'next/link'; +import { CgSpinner } from 'react-icons/cg'; +import useJobsList from '@/hooks/useJobsList'; +import { JobConfig } from '@/types'; + +export default function ActiveJobWidget() { + const { jobs } = useJobsList({ onlyActive: true, reloadInterval: 5000 }); + + if (!jobs || jobs.length === 0) return null; + + return ( +
+
+ +
+
+ ); +} diff --git a/ui/src/components/Sidebar.tsx b/ui/src/components/Sidebar.tsx index 6b45b1e2..905f757d 100644 --- a/ui/src/components/Sidebar.tsx +++ b/ui/src/components/Sidebar.tsx @@ -8,6 +8,7 @@ import { FaXTwitter, FaDiscord, FaYoutube } from 'react-icons/fa6'; import { createGlobalState } from 'react-global-hooks'; import ThemeToggle from './ThemeToggle'; import ThemeLogo from './ThemeLogo'; +import ActiveJobWidget from './ActiveJobWidget'; export const mobileSidebarState = createGlobalState(false); @@ -75,29 +76,28 @@ const Sidebar = () => { ))} -
- + + - - - - Support AI-Toolkit - -
+ + + Support AI-Toolkit + {/* Social links grid */}