feat: first commit

This commit is contained in:
eleanor.mao
2025-03-31 22:34:22 +08:00
commit d25187c9c8
390 changed files with 57031 additions and 0 deletions

41
src/pages/group/index.tsx Normal file
View File

@ -0,0 +1,41 @@
import { useShareAppMessage } from '@tarojs/taro';
import { Tabs } from '@taroify/core';
import { useCallback, useState } from 'react';
import HomePage from '@/components/home-page';
import { GroupType, GROUP_PAGE_TABS } from '@/constants/group';
import GroupFragment from '@/fragments/group';
import useNavigation from '@/hooks/use-navigation';
import { getCommonShareMessage } from '@/utils/share';
import './index.less';
const PREFIX = 'group-page';
export default function Group() {
const { barHeight, statusBarHeight } = useNavigation();
const [tabType, setTabType] = useState<GroupType>(GroupType.All);
const handleTypeChange = useCallback(value => setTabType(value), []);
useShareAppMessage(() => getCommonShareMessage());
return (
<HomePage>
<Tabs
swipeable
value={tabType}
className={`${PREFIX}__tabs`}
onChange={handleTypeChange}
style={{ height: barHeight.current, paddingTop: statusBarHeight.current }}
>
{GROUP_PAGE_TABS.map(tab => (
<Tabs.TabPane value={tab.type} title={tab.title} key={tab.type}>
<GroupFragment type={tab.type} />
</Tabs.TabPane>
))}
</Tabs>
</HomePage>
);
}