import {useEffect} from 'react'
import UserCard from "./components/UserCard";
import UserOrder from "./components/UserOrder";
import UserCell from "./components/UserCell";
import UserFooter from "./components/UserFooter";
import {useUser} from "@/hooks/useUser";
import './user.scss'
import IsDealer from "./components/IsDealer";

function User() {
  const {
    isAdmin
  } = useUser();

  useEffect(() => {
  }, []);

  /**
   * 门店核销管理
   */
  if (isAdmin()) {
    return <>
      <div className={'w-full'} style={{
        background: 'linear-gradient(to bottom, #e9fff2, #f9fafb)'
      }}>
        <UserCard/>
        <UserOrder/>
        <IsDealer/>
        <UserCell/>
        <UserFooter/>
      </div>
    </>
  }

  return (
    <>
      <div className={'w-full'} style={{
        background: 'linear-gradient(to bottom, #e9fff2, #f9fafb)'
      }}>
        <UserCard/>
        {/*<UserOrder/>*/}
        <IsDealer/>
        <UserCell/>
        <UserFooter/>
      </div>
    </>
  )
}

export default User
