// ** Next Import
import { GetStaticProps, GetStaticPaths, InferGetStaticPropsType } from 'next/types'

// ** Third Party Imports
// import axios from 'axios'

// ** Types
// import { InvoiceType } from 'src/types/apps/invoiceTypes'

// ** Demo Components Imports
import UserViewPage from 'src/views/apps/user/view/UserViewPage'

const UserView = ({ tab, invoiceData }: InferGetStaticPropsType<typeof getStaticProps>) => {
  return <UserViewPage tab={tab} invoiceData={invoiceData} />
}

export const getStaticPaths: GetStaticPaths = () => {
  return {
    paths: [
      { params: { tab: 'account' } },
      { params: { tab: 'security' } },
      { params: { tab: 'billing-plan' } },
      { params: { tab: 'notification' } },
      { params: { tab: 'connection' } }
    ],
    fallback: false
  }
}

export const getStaticProps: GetStaticProps = async () => {
  // const res = await axios.get('/apps/invoice/invoices')
  // const invoiceData: InvoiceType[] = res.data.allData

  return {
    props: {
      invoiceData: null,
      tab: {}
    }
  }
}

export default UserView
