
import React from 'react';
import ResterList from '../List/ResterList'
import ModelList from '../List/ModelList'
import GeoList from '../List/GeoList'
import Tab from '../../components/Tab'
import styles from './index.module.css'


function Home() {
  const changeHandle = (index: number) => sessionStorage.setItem('tabIndex', index.toString())
  let indexStr = sessionStorage.getItem('tabIndex')
  let index = indexStr ? Number(indexStr) : 1

  return (
    <div className={styles.layer}>
      <Tab titles={['栅格数据', '3D模型', '矢量数据']} showIndex={index} changeHandle={changeHandle} >
        <ResterList className={styles.list} />
        <ModelList className={styles.list} />
        <GeoList className={styles.list} />
      </Tab>
    </div>
  )
}

export default Home