diff --git a/package.json b/package.json index bf0cb67..ee98f84 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "cacheDirectory": ".jest/cache" }, "dependencies": { - "@react-native-async-storage/async-storage": "^1.15.6", + "@react-native-async-storage/async-storage": "~1.15.0", "@react-native-community/masked-view": "0.1.10", "@react-navigation/bottom-tabs": "^6.0.5", "@react-navigation/drawer": "^6.1.4", @@ -37,34 +37,34 @@ "@types/redux-actions": "^2.6.2", "axios": "^0.21.1", "dayjs": "^1.10.7", - "expo": "~42.0.1", - "expo-calendar": "~9.2.2", - "expo-font": "~9.2.1", - "expo-linear-gradient": "~9.2.0", - "expo-localization": "~10.2.0", - "expo-notifications": "~0.12.3", - "expo-screen-orientation": "~3.3.0", - "expo-status-bar": "~1.0.4", - "expo-updates": "~0.8.2", - "react": "16.13.1", - "react-dom": "16.13.1", - "react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz", - "react-native-appearance": "^0.3.4", + "expo": "^43.0.0", + "expo-calendar": "~10.0.3", + "expo-font": "~10.0.3", + "expo-linear-gradient": "~10.0.3", + "expo-localization": "~11.0.0", + "expo-notifications": "~0.13.3", + "expo-screen-orientation": "~4.0.3", + "expo-status-bar": "~1.1.0", + "expo-updates": "~0.10.15", + "react": "17.0.1", + "react-dom": "17.0.1", + "react-native": "0.64.3", + "react-native-appearance": "~0.3.3", "react-native-calendars": "^1.1266.0", "react-native-dotenv": "^3.2.0", "react-native-dropdown-picker": "^5.2.3", - "react-native-gesture-handler": "^1.10.3", + "react-native-gesture-handler": "~1.10.2", "react-native-iphone-x-helper": "^1.3.1", "react-native-keyboard-aware-scroll-view": "^0.9.4", "react-native-loading-spinner-overlay": "^3.0.0", "react-native-paper": "^4.9.2", - "react-native-reanimated": "^2.2.0", - "react-native-safe-area-context": "3.2.0", - "react-native-screens": "~3.4.0", + "react-native-reanimated": "~2.2.0", + "react-native-safe-area-context": "3.3.2", + "react-native-screens": "~3.8.0", "react-native-status-bar-height": "^2.6.0", "react-native-table-component": "^1.2.1", "react-native-vector-icons": "^8.1.0", - "react-native-web": "~0.13.12", + "react-native-web": "0.17.1", "react-redux": "^7.2.4", "redux": "^4.1.1", "redux-actions": "^2.6.5", @@ -73,7 +73,7 @@ "redux-saga": "^1.1.3" }, "devDependencies": { - "@babel/core": "^7.17.2", + "@babel/core": "^7.12.9", "@babel/node": "^7.16.8", "@babel/preset-env": "^7.16.11", "@babel/preset-typescript": "^7.16.7", @@ -81,9 +81,9 @@ "@testing-library/jest-native": "^4.0.4", "@testing-library/react-native": "^9.0.0", "@types/jest": "^27.4.0", - "@types/react": "~16.9.35", - "@types/react-dom": "^17.0.9", - "@types/react-native": "~0.63.2", + "@types/react": "~17.0.21", + "@types/react-dom": "~17.0.9", + "@types/react-native": "~0.64.12", "@types/react-native-calendars": "^1.1264.2", "@types/react-native-table-component": "^1.2.1", "@types/react-native-vector-icons": "^6.4.8", @@ -93,7 +93,7 @@ "jest": "^27.5.1", "jest-plugin-context": "^2.9.0", "ts-jest": "^27.1.3", - "typescript": "~4.0.0", + "typescript": "~4.3.5", "yarn": "^1.22.17" }, "private": true diff --git a/src/screens/DrawerContent.tsx b/src/screens/DrawerContent.tsx index 0a4b6ca..0e20e57 100644 --- a/src/screens/DrawerContent.tsx +++ b/src/screens/DrawerContent.tsx @@ -32,7 +32,7 @@ const fontSize = 15; const screen = Dimensions.get('screen'); const DrawerContent: FC = (props) => { const { name, id, pw, rememberID } = useSelector(({ login }: RootState) => ({ - name: login.loginState.name, + name: login.name, rememberID: login.rememberID, id: login.id, pw: login.pw diff --git a/src/screens/Home.tsx b/src/screens/Home.tsx index 4e82ca3..63987e1 100644 --- a/src/screens/Home.tsx +++ b/src/screens/Home.tsx @@ -1,18 +1,8 @@ /* eslint-disable react-hooks/exhaustive-deps */ import React, { useState, useCallback, useRef, useEffect } from 'react'; -import { - StyleSheet, - FlatList, - ScrollView, - Platform, - RefreshControl -} from 'react-native'; -import { - useNavigation, - DrawerActions, - useTheme -} from '@react-navigation/native'; -import Constants from 'expo-constants'; +import { StyleSheet, FlatList, ScrollView, RefreshControl } from 'react-native'; +import { useNavigation, DrawerActions } from '@react-navigation/native'; + import * as Notifications from 'expo-notifications'; // prettier-ignore import {SafeAreaView, View, NavigationHeader, MaterialCommunityIcon as Icon, TouchableView, Text, MaterialIcon} from '../theme'; @@ -20,8 +10,7 @@ import { Buttons, ModalCalendar, ModalSetting, - ModalUpdate, - Spinner + ModalUpdate } from '../components'; import type { LeftRightNavigationMethods } from '../components'; diff --git a/src/screens/Login.tsx b/src/screens/Login.tsx index beec112..c29abf1 100644 --- a/src/screens/Login.tsx +++ b/src/screens/Login.tsx @@ -1,5 +1,11 @@ import React, { useState } from 'react'; -import { Platform, StyleSheet, Alert, ActivityIndicator } from 'react-native'; +import { + Platform, + StyleSheet, + Alert, + ActivityIndicator, + Linking +} from 'react-native'; import { SafeAreaView, View, @@ -7,11 +13,15 @@ import { TextInput, TouchableView, MaterialCommunityIcon as Icon, - Switch + Switch, + NavigationHeader } from '../theme'; - import { Switch as RNSwitch } from 'react-native'; -import { useNavigation, useTheme } from '@react-navigation/native'; +import { + useNavigation, + useTheme, + DrawerActions +} from '@react-navigation/native'; import { useAutoFocus, AutoFocusProvider } from '../contexts'; import { useDispatch, useSelector } from 'react-redux'; import { RootState } from '../store'; @@ -29,6 +39,7 @@ import { import { useEffect } from 'react'; import { Colors } from 'react-native-paper'; import dayjs from 'dayjs'; +import { TouchHeaderIconView } from '../theme/navigation/TouchHeaderIconView'; dayjs.extend(utc); dayjs.extend(timezone); const marginBottom = 35; @@ -81,11 +92,25 @@ export default function MainNavigator() { } }, [loginError, name, loadingLogin]); + const open = useCallback(() => { + navigation.dispatch(DrawerActions.openDrawer()); + }, []); const isDark = useTheme().dark; return ( + ( + + + + )} + /> =0.0.5" ultron "1.0.x" +ws@^6.1.4: + version "6.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.2.tgz#dd5cdbd57a9979916097652d78f1cc5faea0c32e" + integrity sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw== + dependencies: + async-limiter "~1.0.0" + ws@^7: version "7.5.3" resolved "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz" @@ -9681,7 +9490,7 @@ xml-name-validator@^3.0.0: resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== -xml2js@^0.4.23: +xml2js@0.4.23, xml2js@^0.4.23: version "0.4.23" resolved "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz" integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== @@ -9721,16 +9530,6 @@ xmldom@^0.6.0: resolved "https://registry.npmjs.org/xmldom/-/xmldom-0.6.0.tgz" integrity sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg== -xmldom@~0.5.0: - version "0.5.0" - resolved "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz" - integrity sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA== - -xpipe@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/xpipe/-/xpipe-1.0.5.tgz" - integrity sha1-jdi/Rfw/f1Xw4FS4ePQ6YmFNr98= - xtend@~4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" @@ -9746,11 +9545,6 @@ y18n@^5.0.5: resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - yallist@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" @@ -9761,14 +9555,6 @@ yargs-parser@20.x, yargs-parser@^20.2.2: resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@^15.0.1: - version "15.0.3" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.3.tgz" - integrity sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz" @@ -9777,24 +9563,7 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@^14.2.0: - version "14.2.3" - resolved "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz" - integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== - dependencies: - cliui "^5.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^15.0.1" - -yargs@^15.1.0: +yargs@^15.1.0, yargs@^15.3.1: version "15.4.1" resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==