diff --git a/package-lock.json b/package-lock.json index 5661966..8371205 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,8 @@ "@react-navigation/native": "^6.1.6", "@react-navigation/native-stack": "^6.9.12", "@react-navigation/stack": "^6.3.16", + "@rneui/base": "^4.0.0-rc.7", + "@rneui/themed": "^4.0.0-rc.7", "@types/react": "~18.0.27", "date-fns": "^2.30.0", "expo": "~48.0.18", @@ -28,6 +30,7 @@ "react-native-reanimated": "^2.14.4", "react-native-svg": "^13.9.0", "react-native-web": "~0.18.10", + "recoil": "^0.7.7", "typescript": "^4.9.4" }, "devDependencies": { @@ -5257,6 +5260,56 @@ "react-native-screens": ">= 3.0.0" } }, + "node_modules/@rneui/base": { + "version": "4.0.0-rc.7", + "resolved": "https://registry.npmjs.org/@rneui/base/-/base-4.0.0-rc.7.tgz", + "integrity": "sha512-dffzoYek3Qp+7wJzC42QjI/Fu1HOUNxFIR88t1laDrBV5QZQB55f+Vu5zLbC80/bh1b8fYtl63HTIWpORuA3Eg==", + "dependencies": { + "@types/react-native-vector-icons": "^6.4.10", + "color": "^3.2.1", + "deepmerge": "^4.2.2", + "hoist-non-react-statics": "^3.3.2", + "react-native-ratings": "^8.1.0", + "react-native-size-matters": "^0.4.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/react-native-elements" + }, + "peerDependencies": { + "react-native-safe-area-context": "^3.1.9 || ^4.0.0", + "react-native-vector-icons": ">7.0.0" + } + }, + "node_modules/@rneui/base/node_modules/color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "dependencies": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, + "node_modules/@rneui/base/node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@rneui/themed": { + "version": "4.0.0-rc.7", + "resolved": "https://registry.npmjs.org/@rneui/themed/-/themed-4.0.0-rc.7.tgz", + "integrity": "sha512-nRF95gFTv/8JEx01L8q9p9VWKE5M/luPWPKYsWHKUQ5PHqwveQId/V5+ba9yiXsYIl9VbJJ1nLlqfHVP00u/3Q==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/react-native-elements" + }, + "peerDependencies": { + "@rneui/base": "4.0.0-rc.7" + } + }, "node_modules/@segment/loosely-validate-event": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@segment/loosely-validate-event/-/loosely-validate-event-2.0.0.tgz", @@ -5499,6 +5552,23 @@ "csstype": "^3.0.2" } }, + "node_modules/@types/react-native": { + "version": "0.70.14", + "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.70.14.tgz", + "integrity": "sha512-Kwc+BYBrnDqvacNxKp1UtcZJnJJnTih2NYmi/ieAKlHdxEPN6sYMwmIwgHdoLHggvml6bf3DYRaH2jt+gzaLjw==", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-native-vector-icons": { + "version": "6.4.13", + "resolved": "https://registry.npmjs.org/@types/react-native-vector-icons/-/react-native-vector-icons-6.4.13.tgz", + "integrity": "sha512-1PqFoKuXTSzMHwGMAr+REdYJBQAbe9xrww3ecZR0FsHcD1K+vGS/rxuAriL4rsI6+p69sZQjDzpEVAbDQcjSwA==", + "dependencies": { + "@types/react": "*", + "@types/react-native": "^0.70" + } + }, "node_modules/@types/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", @@ -10575,6 +10645,11 @@ "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, + "node_modules/hamt_plus": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hamt_plus/-/hamt_plus-1.0.2.tgz", + "integrity": "sha512-t2JXKaehnMb9paaYA7J0BX8QQAY8lwfQ9Gjf4pg/mk4krt+cmwmU652HOoWonf+7+EQV97ARPMhhVgU1ra2GhA==" + }, "node_modules/handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -15932,6 +16007,18 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" }, + "node_modules/react-native-ratings": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/react-native-ratings/-/react-native-ratings-8.1.0.tgz", + "integrity": "sha512-+QOJ4G3NjVkI1D+tk4EGx1dCvVfbD2nQdkrj9cXrcAoEiwmbep4z4bZbCKmWMpQ5h2dqbxABU8/eBnbDmvAc3g==", + "dependencies": { + "lodash": "^4.17.15" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, "node_modules/react-native-reanimated": { "version": "2.14.4", "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-2.14.4.tgz", @@ -15975,6 +16062,14 @@ "react-native": "*" } }, + "node_modules/react-native-size-matters": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/react-native-size-matters/-/react-native-size-matters-0.4.0.tgz", + "integrity": "sha512-8/C0htHrFWeUm9N8JegmadovUfgTWkGBkDPZ1N3YkXtDWb+98Ya2gThiKcu445r8c7YhcrBfnHz/mYsXIusaOQ==", + "peerDependencies": { + "react-native": "*" + } + }, "node_modules/react-native-svg": { "version": "13.9.0", "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-13.9.0.tgz", @@ -16059,6 +16154,79 @@ "resolved": "https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.5.tgz", "integrity": "sha512-Ns7Bn9H/Tyw278+5SQx9oAblDZ7JixyzeOczcBK8dipQk2pD7Djkcfnf1nB/8RErAmMLL9iXgW0QHqiII8AhKw==" }, + "node_modules/react-native-vector-icons": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-9.2.0.tgz", + "integrity": "sha512-wKYLaFuQST/chH3AJRjmOLoLy3JEs1JR6zMNgTaemFpNoXs0ztRnTxcxFD9xhX7cJe1/zoN5BpQYe7kL0m5yyA==", + "peer": true, + "dependencies": { + "prop-types": "^15.7.2", + "yargs": "^16.1.1" + }, + "bin": { + "fa5-upgrade": "bin/fa5-upgrade.sh", + "generate-icon": "bin/generate-icon.js" + } + }, + "node_modules/react-native-vector-icons/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/react-native-vector-icons/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-native-vector-icons/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/react-native-vector-icons/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "peer": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/react-native-vector-icons/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "peer": true, + "engines": { + "node": ">=10" + } + }, "node_modules/react-native-web": { "version": "0.18.12", "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.18.12.tgz", @@ -16165,6 +16333,25 @@ "node": ">=0.10.0" } }, + "node_modules/recoil": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/recoil/-/recoil-0.7.7.tgz", + "integrity": "sha512-8Og5KPQW9LwC577Vc7Ug2P0vQshkv1y3zG3tSSkWMqkWSwHmE+by06L8JtnGocjW6gcCvfwB3YtrJG6/tWivNQ==", + "dependencies": { + "hamt_plus": "1.0.2" + }, + "peerDependencies": { + "react": ">=16.13.1" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, "node_modules/recyclerlistview": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/recyclerlistview/-/recyclerlistview-4.2.0.tgz", diff --git a/package.json b/package.json index 3cde670..4527bfe 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "@react-navigation/native": "^6.1.6", "@react-navigation/native-stack": "^6.9.12", "@react-navigation/stack": "^6.3.16", + "@rneui/base": "^4.0.0-rc.7", + "@rneui/themed": "^4.0.0-rc.7", "@types/react": "~18.0.27", "date-fns": "^2.30.0", "expo": "~48.0.18", @@ -22,6 +24,7 @@ "react-calendar": "^4.3.0", "react-dom": "18.2.0", "react-native": "0.71.8", + "recoil": "^0.7.7", "react-native-bouncy-checkbox": "^3.0.7", "react-native-calendars": "^1.1298.0", "react-native-checkbox-reanimated": "^0.1.1", diff --git a/src/App.js b/src/App.js index 22873d6..a2f8916 100644 --- a/src/App.js +++ b/src/App.js @@ -3,19 +3,24 @@ import { StyleSheet, View } from 'react-native'; import SignInScreen from './screens/SignInScreen'; import SignUpScreen from './screens/SignUpScreen'; import Logo from './components/Logo'; -import Navigation from './navigations/Navigation'; +import CalanderView from './screens/Calendar/CalendarView'; import SettingScreen from './screens/SettingScreen'; +import Navigation from './navigations/Navigation'; +import { RecoilRoot } from 'recoil'; + + export default function App() { return ( + - {/* */} - {/* */} + + ); } @@ -27,4 +32,4 @@ const styles = StyleSheet.create({ // justifyContent: 'center', width: '100%', }, -}); +}); \ No newline at end of file diff --git a/src/Atom.js b/src/Atom.js new file mode 100644 index 0000000..2ba03bd --- /dev/null +++ b/src/Atom.js @@ -0,0 +1,17 @@ +import { atom } from 'recoil'; + +export const dateState = atom({ + key: 'date', + default: 0, +}); + +export const diaryState = atom({ + key: 'diary', + default: {}, +}); + + +export const deleteState = atom({ + key: 'delete', + default: {}, +}) diff --git a/src/colors.js b/src/colors.js index 40a4f05..299657e 100644 --- a/src/colors.js +++ b/src/colors.js @@ -25,4 +25,4 @@ export const GHOSTWHITE ={ DEFAULT: '#f8f8ff', GDARK: '#a3a3a3', GLIGHT: '#93c5fd', -}; \ No newline at end of file +}; diff --git a/src/components/Calender.js b/src/components/Calender.js new file mode 100644 index 0000000..f7ea732 --- /dev/null +++ b/src/components/Calender.js @@ -0,0 +1,38 @@ +import { Calendar } from 'react-native-calendars'; +import { StyleSheet } from 'react-native'; +import { useState } from 'react'; +import { dateState } from '../Atom'; +import { useRecoilState } from 'recoil'; + +const Calender = () => { + const [selected, setSelected] = useState(''); + const [date, setDate] = useRecoilState(dateState); + + return ( + { + setSelected(() => { + return day.dateString; + }); + setDate(() => { + return day.dateString; + }); + }} + markedDates={{ + [selected]: { + selected: true, + disableTouchEvent: true, + selectedDotColor: 'blue', + }, + }} + style={styles.calendar} + /> + ); +}; +const styles = StyleSheet.create({ + calendar: { + borderBottomWidth: 1, + borderBottomColor: '#e0e0e0', + }, +}); +export default Calender; diff --git a/src/components/CheckbBox2.js b/src/components/CheckbBox2.js new file mode 100644 index 0000000..19b6018 --- /dev/null +++ b/src/components/CheckbBox2.js @@ -0,0 +1,37 @@ +import { Pressable, StyleSheet, Text, View } from "react-native"; +import React from "react"; +import { MaterialCommunityIcons } from "@expo/vector-icons"; + +const CheckBox2 = (props) => { + const iconName = props.isChecked ? + "checkbox-marked" : "checkbox-blank-outline"; + + return ( + + + + + + ); +}; + +export default CheckBox2; + +const styles = StyleSheet.create({ + container: { + // justifyContent: "flex-start", + // alignItems: "center", + flexDirection: "row", + width: 25, + marginTop: 28, + marginHorizontal: 8, + }, + title: { + fontSize: 18, + color: "#000", + // marginLeft: 500, + fontWeight: "500", + + }, +}); \ No newline at end of file diff --git a/src/components/Checkbox.js b/src/components/Checkbox.js index 652de27..235c8b3 100644 --- a/src/components/Checkbox.js +++ b/src/components/Checkbox.js @@ -25,7 +25,7 @@ const styles = StyleSheet.create({ // alignItems: "center", flexDirection: "row", width: 250, - marginTop: 20, + marginTop: 30, marginHorizontal: 5, }, title: { diff --git a/src/components/Gear.js b/src/components/Gear.js index 94793c2..5d3a1cb 100644 --- a/src/components/Gear.js +++ b/src/components/Gear.js @@ -1,16 +1,16 @@ -import { Image, StyleSheet } from 'react-native'; +import { Image, Pressable, StyleSheet } from 'react-native'; import gear from '../../assets/gear.png'; -const Gear = () => { +const Gear = (onPress) => { return ; }; const logostyles = StyleSheet.create({ gear: { + marginTop: -50, width: 30, resizeMode: 'contain', - justifyContent: 'flex-end' - + justifyContent: 'flex-end', }, }); diff --git a/src/components/Logo.js b/src/components/Logo.js index 7ce018a..178a2f6 100644 --- a/src/components/Logo.js +++ b/src/components/Logo.js @@ -1,13 +1,24 @@ -import { Image, StyleSheet } from 'react-native'; +import { Image, StyleSheet, View } from 'react-native'; import logo from '../../assets/logo.png'; const Logo = () => { - return ; + return ( + + + + ); }; -const logostyles = StyleSheet.create({ - logo: { +const styles = StyleSheet.create({ + container: { marginTop: 40, + marginLeft: 'auto', + marginRight: 'auto', width: 250, + height: 200, + }, + logo: { + width: '100%', + height: '100%', resizeMode: 'contain', }, }); diff --git a/src/components/WriteButton.js b/src/components/WriteButton.js new file mode 100644 index 0000000..85f95e9 --- /dev/null +++ b/src/components/WriteButton.js @@ -0,0 +1,53 @@ +import { Pressable, StyleSheet, Text } from 'react-native'; +import PropTypes from 'prop-types'; +import { BLACK, GHOSTWHITE, PRIMARY } from '../colors'; +import { useNavigation } from '@react-navigation/native'; +import { MainRoutes } from '../navigations/routes'; + +export const ButtonTypes = { + TODO: 'TO-DO', + DIARY: 'DIARY', +}; + +const WriteButton = ({ title }) => { + const navigation = useNavigation(); + return ( + { + title === ButtonTypes.TODO + ? navigation.navigate(MainRoutes.TODO) + : navigation.navigate(MainRoutes.DIARY); + }} + style={({ pressed }) => [ + styles.container, + pressed && { backgroundColor: GHOSTWHITE.GDARK }, + ]} + > + {title} + + ); +}; + +WriteButton.propTypes = { + title: PropTypes.string.isRequired, + onPress: PropTypes.func.isRequired, +}; + +const styles = StyleSheet.create({ + container: { + borderRadius: 10, + paddingHorizontal: 60, + paddingVertical: 15, + marginHorizontal: 6, + flexDirection: 'row', + backgroundColor: PRIMARY.BUTTON, + width: 180, + }, + title: { + color: BLACK, + fontSize: 16, + fontWeight: '700', + }, +}); + +export default WriteButton; diff --git a/src/components/input2.js b/src/components/input2.js index ae3b61d..77f810b 100644 --- a/src/components/input2.js +++ b/src/components/input2.js @@ -40,26 +40,31 @@ Input2.displayName = "Input2"; const defaultStyles = StyleSheet.create({ container: { width: "50%", - marginRight: 10, - // justifyContent: 'center' + // marginRight: 100, + marginRight: 20, + justifyContent: 'flex-start', + marginLeft: 3, + }, title: { - marginBottom: 4, - fontWeight: "100", + marginBottom: 17, + fontWeight: "700", + fontSize: 16, + width:'150%', + }, input: { // flexDirection: "row", - borderBottomWidth: 2, - borderRadius: 1, - height: 15, + // borderRadius: 1, + // height: 15, // justifyContent: 'center' // paddingHorizontal: 10, }, icon: { - paddingHorizontal:100, + paddingHorizontal:300, // position: "absolute", // left: 8, // height: "100%", diff --git a/src/components/input3.js b/src/components/input3.js new file mode 100644 index 0000000..e7e1696 --- /dev/null +++ b/src/components/input3.js @@ -0,0 +1,76 @@ +import { StyleSheet, Text, TextInput, View } from "react-native"; +import { forwardRef, useState } from "react"; +import { MaterialCommunityIcons } from "@expo/vector-icons"; +import { BLACK } from "../colors"; + +export const KeyboardTypes = { + DEFAULT: "default", + EMAIL: "email-address", +}; + +export const ReturnKeyTypes = { + DONE: "done", + NEXT: "next", +}; + +const Input3 = forwardRef(({ title, iconName, ...props }, ref) => { + return ( + + {title} + + + + + + + + + ); +}); + +Input3.displayName = "Input3"; + +const defaultStyles = StyleSheet.create({ + container: { + width: "10%", + // marginRight: 100, + marginRight: 70, + justifyContent: 'flex-start', + marginLeft: 3, + + + }, + title: { + marginBottom: 17, + fontWeight: "700", + fontSize: 16, + width:'10%', + + }, + input: { + // flexDirection: "row", + // borderBottomWidth: 2, + // borderRadius: 1, + // height: 15, + // justifyContent: 'center' + // paddingHorizontal: 10, + + }, + icon: { + paddingHorizontal:300, + // position: "absolute", + // left: 8, + // height: "100%", + // justifyContent: 'center', + + }, +}); + +export default Input3; \ No newline at end of file diff --git a/src/navigations/AuthStack.js b/src/navigations/AuthStack.js index 94e3e7c..f99663e 100644 --- a/src/navigations/AuthStack.js +++ b/src/navigations/AuthStack.js @@ -3,6 +3,8 @@ import { WHITE } from '../colors'; import SettingScreen from '../screens/SettingScreen'; import SignInScreen from '../screens/SignInScreen'; import SignUpScreen from '../screens/SignUpScreen'; +import FindPWScreen from '../screens/FindPWScreen'; +import ChangePWScreen from '../screens/ChangePWScreen'; import AccountScreen from '../screens/AccountScreen'; import NoticeScreen from '../screens/NoticeScreen'; import InformationScreen from '../screens/InformationScreen'; @@ -10,8 +12,11 @@ import TermScreen from '../screens/TermScreen'; import PrivacyPoliceScreen from '../screens/PrivacyPolicyScreen'; import CalanderView from '../screens/Calendar/CalendarView'; import ToDo from '../screens/Calendar/ToDo'; +// import Diary from '../screens/Diary2'; +import Diary3 from '../screens/Diary3'; import { AuthRoutes } from './routes'; + const Stack = createNativeStackNavigator(); const AuthStack = () => { return ( @@ -23,11 +28,17 @@ const AuthStack = () => { > + + + + + + { +// // custom logic +// return true; +// }; +// const Navigation = () => { +// const isSignedIn = getIsSignedIn(); + +// return ( +// +// +// {isSignedIn ? ( +// <> +// {/* */} +// +// +// +// ) : ( +// <> +// +// +// +// +// +// +// +// +// +// )} +// +// +// ); +// }; + +// export default Navigation; + import { NavigationContainer } from '@react-navigation/native'; import AuthStack from './AuthStack'; @@ -9,4 +72,4 @@ const Navigation = () => { ); }; -export default Navigation; +export default Navigation; \ No newline at end of file diff --git a/src/navigations/routes.js b/src/navigations/routes.js index 31e49c3..12191ec 100644 --- a/src/navigations/routes.js +++ b/src/navigations/routes.js @@ -1,6 +1,8 @@ export const AuthRoutes = { SIGN_IN: 'SignIn', SIGN_UP: 'SignUp', + Find_PW: 'FindPW', + Change_PW: 'ChangePW', Setting: 'Setting', Account: 'Account', Notice: 'Notice', @@ -9,5 +11,12 @@ export const AuthRoutes = { PrivacyPolicy: 'PrivacyPolicy', CalendarView: 'CalendarView', ToDo: 'ToDo', + Diary: 'Diary', + Diary3: 'Diary3', }; +export const MainRoutes = { + MAIN: 'Main', + TODO: 'Todo', + DIARY: 'Diary', +}; diff --git a/src/screens/AccountScreen.js b/src/screens/AccountScreen.js index a6a77c7..d7f5058 100644 --- a/src/screens/AccountScreen.js +++ b/src/screens/AccountScreen.js @@ -1,5 +1,5 @@ import { useNavigation } from '@react-navigation/native'; -import { StyleSheet, Text, View } from 'react-native'; +import { StyleSheet, Text, View, Alert } from 'react-native'; import Logo from '../components/Logo'; import { AuthRoutes } from '../navigations/routes'; @@ -14,8 +14,28 @@ const AccountScreen = () => { 이름 id - 비밀번호 변경 - + navigation.navigate(AuthRoutes.Change_PW)} + > + 비밀번호 변경 + + { + Alert.alert( + '정말로 계정을 삭제하시겠습니까?', + '삭제한 계정은 복구가 불가능하며, 모든 정보가 삭제됩니다.', + [ + { + text: '예', + onPress: () => navigation.navigate(AuthRoutes.SIGN_IN), + }, + { text: '아니오' }, + ] + ); + }} + > 계정 삭제하기 @@ -25,6 +45,7 @@ const AccountScreen = () => { const accountstyles = StyleSheet.create({ header: { + marginTop: 40, justifyContent: 'center', alignItems: 'center', }, diff --git a/src/screens/Calendar/.CalendarView.js.swp b/src/screens/Calendar/.CalendarView.js.swp new file mode 100644 index 0000000..0f205d6 Binary files /dev/null and b/src/screens/Calendar/.CalendarView.js.swp differ diff --git a/src/screens/Calendar/BottomSheet.js b/src/screens/Calendar/BottomSheet.js index dea12c5..352bbf9 100644 --- a/src/screens/Calendar/BottomSheet.js +++ b/src/screens/Calendar/BottomSheet.js @@ -18,6 +18,8 @@ import ToDo from './ToDo'; import Logo from '../../components/Logo'; import { AuthRoutes } from '../../navigations/routes'; import { useNavigation } from '@react-navigation/native'; +// import { useNavigation } from '@react-navigation/native'; +import { Navigation } from 'react-calendar'; @@ -28,6 +30,8 @@ const BottomSheet = (props) => { const { modalVisible, setModalVisible } = props; const screenHeight = Dimensions.get("screen").height; const panY = useRef(new Animated.Value(screenHeight)).current; + const navigation = useNavigation(); + const translateY = panY.interpolate({ inputRange: [-1, 0, 1], outputRange: [0, 0, 1], @@ -200,7 +204,11 @@ const BottomSheet = (props) => { style={{...styles.bottomSheetContainer, transform: [{ translateY: translateY }]}} {...panResponders.panHandlers} > - + { - setModalVisible(true); - } - - - + setModalVisible(true); + }; - + ; const navigation = useNavigation(); + const [selectedTab, setSelectedTab] = useState() + const posts = [ { - date: "2023-06-19", + date: '2023-06-19', + }, + { + date: '2023-06-27', }, - { - date: "2023-06-27", - } ]; const markedDates = posts.reduce((acc, current) => { const formattedDate = format(new Date(current.date), 'yyyy-MM-dd'); - aa - acc[formattedDate] = {marked: true}; + aa; + acc[formattedDate] = { marked: true }; return acc; }, {}); const [selectedDate, setSelectedDate] = useState( - format(new Date(), "yyyy-MM-dd"), + format(new Date(), 'yyyy-MM-dd') ); const markedSelectedDates = { ...markedDates, [selectedDate]: { selected: true, marked: markedDates[selectedDate]?.marked, - - } - - } + }, + }; + const options = [ + { label: "할일", value: "todo", selectedBackgroundColor: "#0097e6",}, + { label: "일기", value: "diary", }, - return ( - + + ]; - - + return ( + + + navigation.navigate(AuthRoutes.Setting)}> + + + - - - - {/* - - */} - - - - + + - navigation.navigate(AuthRoutes.ToDo)} + navigation.navigate(AuthRoutes.ToDo)} + /> + + + + + + + + + + + { + navigation.navigate(AuthRoutes.ToDo) + setSelectedTab(0); + }} + > + + 할일 + + { + setSelectedTab(1); + navigation.navigate(AuthRoutes.Diary3) + + }} + > + 일기 + + + - - - + - - - ); } @@ -103,62 +136,57 @@ const styles2 = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', - alignItems: 'center' + alignItems: 'center', }, checkbox: { - margin: 10 - } -}) + margin: 10, + }, +}); const styles = StyleSheet.create({ calendar: { borderBottomWidth: 1, borderBottomColor: '#e0e0e0', - } + }, }); const styles3 = StyleSheet.create({ container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - // height: 42, - + flex: 1, + justifyContent: 'center', + alignItems: 'center', + // height: 42, }, - title:{ - fontFamily: 'Cochin', - fontSize:50, - fontWeight: 'bold', - justifyContent: 'center', - alignItems: 'center', - + title: { + fontFamily: 'Cochin', + fontSize: 50, + fontWeight: 'bold', + justifyContent: 'center', + alignItems: 'center', }, size: { - fontSize:20, - fontWeight: 'bold', - + fontSize: 20, + fontWeight: 'bold', }, - round:{ - borderWidth: 6, - borderColor: '#cdcdcd', - borderRadius: 20 + round: { + borderWidth: 6, + borderColor: '#cdcdcd', + borderRadius: 20, }, - orange:{ - color:'orange', + orange: { + color: 'orange', }, - blue:{ - color: '#1090FF', + blue: { + color: '#1090FF', }, cc: { + marginRight: 15, + height: 60, alignItems: 'flex-end', }, a: { alignItems: 'center', - - } - + }, }); - - export default CalanderView; diff --git a/src/screens/Calendar/ToDo.js b/src/screens/Calendar/ToDo.js index 8bdef19..9fcf5b1 100644 --- a/src/screens/Calendar/ToDo.js +++ b/src/screens/Calendar/ToDo.js @@ -24,23 +24,25 @@ import { import React from 'react'; import BottomSheet from './BottomSheet'; import Button2 from '../../components/Button2'; - + import CheckBox2 from '../../components/CheckbBox2'; const ToDo = (props) => { - const [email, setEmail] = useState(''); + // const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [disabled, setDisabled] = useState(true); const navigation = useNavigation(); + const [todo, setTodo] = useState(''); useEffect(() => { - setDisabled(!(email.trim() && password.trim())); - }, [email, password]); + setDisabled(!(todo.trim() && password.trim())); + }, [todo, password]); + + const onSubmit = () => { Keyboard.dismiss(); - console.log(email, password); }; @@ -90,7 +92,7 @@ import { - setShopping(!isShop)} title="장보기" isChecked={isShop} @@ -130,21 +132,26 @@ import { - + setBlank(!isBlank)} isChecked={isBlank} + /> + + setEmail(email.trim())} + value={todo} + onChangeText = {(todo) => setTodo(todo.trim())} /> + - + + + {/*