import { useLoad } from '@tarojs/taro';

import { useState } from 'react';

import UserBatchPublish from '@/components/user-batch-publish';
import { getPageQuery } from '@/utils/route';
import './index.less';

const PREFIX = 'group-delegate-publish';

export default function Partner() {
  const [cityCode, setCityCode] = useState('');
  const [jobId, setJobId] = useState('');

  useLoad(() => {
    const query = getPageQuery<{ cityCode: string; jobId: string }>();
    setCityCode(query.cityCode);
    setJobId(query.jobId);
  });
  return (
    <div className={PREFIX}>
      <UserBatchPublish cityCode={cityCode} jobId={jobId} />
    </div>
  );
}
