feat: first commit
This commit is contained in:
44
src/fragments/user/company/index.tsx
Normal file
44
src/fragments/user/company/index.tsx
Normal file
@ -0,0 +1,44 @@
|
||||
import { Cell } from '@taroify/core';
|
||||
import classNames from 'classnames';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import CertificationStatus from '@/components/certification-status';
|
||||
import WechatCell from '@/components/wx-cell';
|
||||
import { PageUrl } from '@/constants/app';
|
||||
import { CertificationStatusType } from '@/constants/company';
|
||||
import useUserInfo from '@/hooks/use-user-info';
|
||||
import { navigateTo } from '@/utils/route';
|
||||
|
||||
import './index.less';
|
||||
|
||||
const PREFIX = 'user-fragment-company';
|
||||
|
||||
export default function CompanyFragment() {
|
||||
const userInfo = useUserInfo();
|
||||
// const [showPublish, setShowPublish] = useState(false);
|
||||
|
||||
const handlePublishJob = useCallback(async () => {
|
||||
if (userInfo.bossAuthStatus !== CertificationStatusType.Success) {
|
||||
navigateTo(PageUrl.CertificationStart);
|
||||
return;
|
||||
}
|
||||
navigateTo(PageUrl.CertificationManage);
|
||||
}, [userInfo]);
|
||||
|
||||
return (
|
||||
<div className={PREFIX}>
|
||||
<CertificationStatus className={`${PREFIX}__cell`} />
|
||||
<WechatCell className={`${PREFIX}__cell`} />
|
||||
<Cell
|
||||
isLink
|
||||
align="center"
|
||||
title="发通告,让主播主动报单"
|
||||
className={classNames(`${PREFIX}__cell`, `${PREFIX}__go-publish-cell`)}
|
||||
onClick={handlePublishJob}
|
||||
>
|
||||
去发布
|
||||
</Cell>
|
||||
{/* <div>{showPublish && <CompanyPublishJobDialog userInfo={userInfo} onClose={() => setShowPublish(false)} />}</div> */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user