From d1820d347820ea00301a79d8f4eef10817d843bc Mon Sep 17 00:00:00 2001 From: Job Date: Thu, 5 Sep 2024 15:36:02 +1200 Subject: [PATCH] feat: sponsor profile modal structure --- .../components/Modal/EditSponsorProfile.tsx | 77 +++++++++++++++++++ .../app/components/Tabs/SponsorAboutTab.tsx | 16 ++++ .../app/components/Tabs/SponsorProfileTab.tsx | 21 +++++ .../app/pages/Sponsor/SponsorProfile.page.tsx | 32 ++++++-- 4 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 web/src/app/components/Modal/EditSponsorProfile.tsx create mode 100644 web/src/app/components/Tabs/SponsorAboutTab.tsx create mode 100644 web/src/app/components/Tabs/SponsorProfileTab.tsx diff --git a/web/src/app/components/Modal/EditSponsorProfile.tsx b/web/src/app/components/Modal/EditSponsorProfile.tsx new file mode 100644 index 0000000..1cb626e --- /dev/null +++ b/web/src/app/components/Modal/EditSponsorProfile.tsx @@ -0,0 +1,77 @@ +import { Tabs, Box, Button, Select, Divider, Modal } from '@mantine/core'; +import { AboutTab } from '../Tabs/AboutTab'; +import { EducationTab } from '../Tabs/EducationTab'; +import { SkillsTab } from '../Tabs/SkillsTab'; +import { CVTab } from '../Tabs/CVTab'; +import styles from './Modal.module.css'; +import { useMediaQuery } from '@mantine/hooks'; +import { useState } from 'react'; +import { SponsorAboutTab } from '../Tabs/SponsorAboutTab'; +import { SponsorProfileTab } from '../Tabs/SponsorProfileTab'; + +export const EditSponsorProfile = () => { + const [activeTab, setActiveTab] = useState('about'); + const [isModalOpen, setIsModalOpen] = useState(true); + const tabOptions = [ + { value: 'profile', label: 'Profile' }, + { value: 'about', label: 'About Me' }, + ]; + + const isMobile = useMediaQuery('(max-width: 430px)'); //mobile screen + + const renderContent = () => { + switch (activeTab) { + case 'profile': + return ; + case 'about': + return ; + } + }; + + return ( + + {isMobile ? ( //conditionally render mobile tab dropdown + <> +