Monthly.js 512 Bytes
Newer Older
Choi Ga Young's avatar
Choi Ga Young committed
1
import React, { useEffect } from 'react';
Choi Ga Young's avatar
Choi Ga Young committed
2
import Calendar from './components/Calendar';
Choi Ga Young's avatar
Choi Ga Young committed
3
import calApi from './db/calendarInfo.api';
Choi Ga Young's avatar
Choi Ga Young committed
4

Choi Ga Young's avatar
Choi Ga Young committed
5
const Montly = ({ navigation }) => {
Choi Ga Young's avatar
Choi Ga Young committed
6
7
8
9
10
11
12
13
14
15
16
  const getData = async () => {
    try {
      const totalM = await calApi.getFullData()
      console.log('db res', totalM)
    } catch (error) {
      console.log('error in getData', error)
    }
  }
  useEffect(() => {
    getData()
  }, [])
Choi Ga Young's avatar
Choi Ga Young committed
17
  return (
Choi Ga Young's avatar
Choi Ga Young committed
18
    <Calendar navigation={navigation} MData={totalM} />
Choi Ga Young's avatar
Choi Ga Young committed
19
20
  )
}
Choi Ga Young's avatar
Choi Ga Young committed
21

Choi Ga Young's avatar
Choi Ga Young committed
22
export default Montly;