'use client'; import React, { useState, useEffect } from 'react'; import { Row, Col } from 'antd/lib/grid'; import Button from 'antd/lib/button'; import { Paragraph } from '@/components/Typography/Paragraph'; import { Text } from '@/components/Typography/Text'; // ⛔ Mock useWindowSize (since actual hook isn't available) function useWindowSize() { const [width, setWidth] = useState(undefined); useEffect(() => { function handleResize() { setWidth(window.innerWidth); } handleResize(); // Set initial window.addEventListener('resize', handleResize); return () => window.removeEventListener('resize', handleResize); }, []); return { width }; } // ✅ Simulated store (mocked useProfileStore) const useProfileStore = () => { const [modules, setModules] = useState([]); const addModule = () => { const newModule = { id: Date.now(), title: 'New Module', description: 'Describe your module here', }; setModules([...modules, newModule]); }; return { modules, addModule }; }; export default function EmptyModulePage() { const { modules, addModule } = useProfileStore(); const { width } = useWindowSize(); const isMobileStyleChangesEnabled = width !== undefined && width <= 768; return (
{modules.length === 0 ? ( Nothing Here Yet Click the button below to get started ) : (

Modules:

    {modules.map((mod) => (
  • {mod.title} - {mod.description}
  • ))}
)}
); }