Krishya | b5ef96d | 2025-06-05 13:57:05 +0800 | [diff] [blame^] | 1 | import React, { useEffect } from 'react'; |
| 2 | import Header from '../../components/Header'; |
| 3 | import { useGroupStore } from '../../context/useGroupStore'; |
| 4 | import GroupFilters from './GroupFilters'; |
| 5 | import GroupList from './GroupList'; |
| 6 | import GroupPagination from './GroupPagination'; |
22301009 | 3a876cc | 2025-04-14 16:22:20 +0800 | [diff] [blame] | 7 | import './InterestGroup.css'; |
22301009 | 3a876cc | 2025-04-14 16:22:20 +0800 | [diff] [blame] | 8 | const InterestGroup = () => { |
Krishya | b5ef96d | 2025-06-05 13:57:05 +0800 | [diff] [blame^] | 9 | const { fetchGroupList, setPage, handleSearch } = useGroupStore(); |
22301009 | 3a876cc | 2025-04-14 16:22:20 +0800 | [diff] [blame] | 10 | |
Krishya | b5ef96d | 2025-06-05 13:57:05 +0800 | [diff] [blame^] | 11 | // 初始化加载 |
22301009 | 3a876cc | 2025-04-14 16:22:20 +0800 | [diff] [blame] | 12 | useEffect(() => { |
Krishya | b5ef96d | 2025-06-05 13:57:05 +0800 | [diff] [blame^] | 13 | fetchGroupList(); |
| 14 | }, [fetchGroupList]); |
Krishya | c0f7e9b | 2025-04-22 15:28:28 +0800 | [diff] [blame] | 15 | |
22301009 | 3a876cc | 2025-04-14 16:22:20 +0800 | [diff] [blame] | 16 | return ( |
| 17 | <div className="interest-group-container"> |
22301009 | 3a876cc | 2025-04-14 16:22:20 +0800 | [diff] [blame] | 18 | <Header /> |
Krishya | c0f7e9b | 2025-04-22 15:28:28 +0800 | [diff] [blame] | 19 | <div className="interest-group-card"> |
Krishya | b5ef96d | 2025-06-05 13:57:05 +0800 | [diff] [blame^] | 20 | <GroupFilters /> |
| 21 | <GroupList /> |
| 22 | <GroupPagination /> |
22301009 | 3a876cc | 2025-04-14 16:22:20 +0800 | [diff] [blame] | 23 | </div> |
| 24 | </div> |
| 25 | ); |
| 26 | }; |
| 27 | |
Krishya | c0f7e9b | 2025-04-22 15:28:28 +0800 | [diff] [blame] | 28 | export default InterestGroup; |