├── .expo-shared └── assets.json ├── .gitignore ├── App.js ├── app.json ├── assets ├── adaptive-icon.png ├── favicon.png ├── fonts │ ├── Roboto-Bold.ttf │ └── Roboto-Regular.ttf ├── icon.png └── splash.png ├── babel.config.js ├── package.json ├── src ├── components │ ├── AppHeaderIcon.js │ ├── PhotoPicker.js │ ├── Post.js │ └── PostList.js ├── db.js ├── fonts.js ├── navigations │ └── AppNavigation.js ├── screens │ ├── AboutScreen.js │ ├── BookmarkedScreen.js │ ├── CreateScreen.js │ ├── MainScreen.js │ └── PostScreen.js ├── store │ ├── actions │ │ └── postAction.js │ ├── index.js │ ├── reducers │ │ └── postReducer.js │ └── types.js └── theme.js └── yarn.lock /.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, 3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .expo/ 3 | dist/ 4 | npm-debug.* 5 | *.jks 6 | *.p8 7 | *.p12 8 | *.key 9 | *.mobileprovision 10 | *.orig.* 11 | web-build/ 12 | 13 | # macOS 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | import { useState } from 'react' 2 | import AppLoading from 'expo-app-loading' 3 | import { AppNavigation } from './src/navigations/AppNavigation' 4 | import { Provider } from 'react-redux' 5 | import { fonts } from './src/fonts' 6 | import store from './src/store' 7 | 8 | export default function App() { 9 | const [isReady, setIsReady] = useState(false) 10 | 11 | if (!isReady) { 12 | return ( 13 | setIsReady(true)} 16 | onError={error => console.log(error)} 17 | /> 18 | ) 19 | } 20 | 21 | return 22 | } 23 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "react-native-blog", 4 | "slug": "react-native-blog", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/icon.png", 8 | "splash": { 9 | "image": "./assets/splash.png", 10 | "resizeMode": "contain", 11 | "backgroundColor": "#ffffff" 12 | }, 13 | "updates": { 14 | "fallbackToCacheTimeout": 0 15 | }, 16 | "assetBundlePatterns": [ 17 | "**/*" 18 | ], 19 | "ios": { 20 | "supportsTablet": true 21 | }, 22 | "android": { 23 | "adaptiveIcon": { 24 | "foregroundImage": "./assets/adaptive-icon.png", 25 | "backgroundColor": "#FFFFFF" 26 | } 27 | }, 28 | "web": { 29 | "favicon": "./assets/favicon.png" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrey-kudinov/react-native-blog/1fec089179f9aee86bc25aef1ea7f493e8b6307b/assets/adaptive-icon.png -------------------------------------------------------------------------------- /assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrey-kudinov/react-native-blog/1fec089179f9aee86bc25aef1ea7f493e8b6307b/assets/favicon.png -------------------------------------------------------------------------------- /assets/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrey-kudinov/react-native-blog/1fec089179f9aee86bc25aef1ea7f493e8b6307b/assets/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrey-kudinov/react-native-blog/1fec089179f9aee86bc25aef1ea7f493e8b6307b/assets/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrey-kudinov/react-native-blog/1fec089179f9aee86bc25aef1ea7f493e8b6307b/assets/icon.png -------------------------------------------------------------------------------- /assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrey-kudinov/react-native-blog/1fec089179f9aee86bc25aef1ea7f493e8b6307b/assets/splash.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | plugins: ['react-native-reanimated/plugin'] 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-blog", 3 | "version": "1.0.0", 4 | "main": "node_modules/expo/AppEntry.js", 5 | "scripts": { 6 | "start": "expo start", 7 | "android": "expo start --android", 8 | "ios": "expo start --ios", 9 | "web": "expo start --web", 10 | "eject": "expo eject" 11 | }, 12 | "dependencies": { 13 | "@expo/vector-icons": "^12.0.5", 14 | "@react-native-community/masked-view": "^0.1.11", 15 | "expo": "~44.0.0", 16 | "expo-app-loading": "^1.3.0", 17 | "expo-file-system": "~13.1.0", 18 | "expo-font": "^10.0.4", 19 | "expo-image-picker": "~12.0.1", 20 | "expo-sqlite": "~10.1.0", 21 | "expo-status-bar": "~1.2.0", 22 | "react": "17.0.1", 23 | "react-dom": "17.0.1", 24 | "react-native": "0.64.3", 25 | "react-native-gesture-handler": "~2.1.0", 26 | "react-native-paper": "^4.11.1", 27 | "react-native-reanimated": "2.1.0", 28 | "react-native-safe-area-context": "3.3.2", 29 | "react-native-screens": "~3.10.1", 30 | "react-native-web": "0.17.1", 31 | "react-navigation": "^4.4.4", 32 | "react-navigation-drawer": "^2.7.1", 33 | "react-navigation-header-buttons": "4.0.3", 34 | "react-navigation-material-bottom-tabs": "^2.3.4", 35 | "react-navigation-stack": "^2.10.4", 36 | "react-navigation-tabs": "^2.11.1", 37 | "react-redux": "^7.2.6", 38 | "redux": "^4.1.2", 39 | "redux-thunk": "^2.4.1" 40 | }, 41 | "devDependencies": { 42 | "@babel/core": "^7.12.9" 43 | }, 44 | "private": true 45 | } 46 | -------------------------------------------------------------------------------- /src/components/AppHeaderIcon.js: -------------------------------------------------------------------------------- 1 | import { Platform } from 'react-native' 2 | import { HeaderButton } from 'react-navigation-header-buttons' 3 | import { Ionicons } from '@expo/vector-icons' 4 | import { THEME } from '../theme' 5 | 6 | export const AppHeaderIcon = props => ( 7 | 13 | ) 14 | -------------------------------------------------------------------------------- /src/components/PhotoPicker.js: -------------------------------------------------------------------------------- 1 | import { useState } from 'react' 2 | import { StyleSheet, Button, Image, View, Alert } from 'react-native' 3 | import * as ImagePicker from 'expo-image-picker' 4 | 5 | export const PhotoPicker = ({ onPick }) => { 6 | const [image, setImage] = useState(null) 7 | 8 | const handlePickImage = async () => { 9 | let result = await ImagePicker.launchImageLibraryAsync({ 10 | mediaTypes: ImagePicker.MediaTypeOptions.All, 11 | allowsEditing: false, 12 | aspect: [16, 9], 13 | quality: 1 14 | }) 15 | 16 | if (!result.cancelled) { 17 | setImage(result.uri) 18 | onPick(result.uri) 19 | } 20 | } 21 | 22 | return ( 23 | 24 |