This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NavigationContainer } from "@react-navigation/native"; | |
import { createStackNavigator } from "@react-navigation/stack"; | |
import React from "react"; | |
import NotesScreenAdd from "./screens/NotesScreenAdd"; | |
import NotesScreenHome from "./screens/NotesScreenHome"; | |
const Stack = createStackNavigator(); | |
export default function App() { | |
return ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FontAwesome } from "@expo/vector-icons"; | |
import { useNavigation } from "@react-navigation/native"; | |
import { Camera } from "expo-camera"; | |
import React, { useEffect, useRef, useState } from "react"; | |
import { StyleSheet, TouchableOpacity, View } from "react-native"; | |
export default function CameraScreen() { | |
const navigation = useNavigation(); | |
const [back, setBack] = useState(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { getDefaultConfig } = require("@expo/metro-config"); | |
const defaultConfig = getDefaultConfig(__dirname); | |
defaultConfig.resolver.assetExts.push("cjs"); | |
module.exports = defaultConfig; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FontAwesome } from "@expo/vector-icons"; | |
import { useNavigation, useRoute } from "@react-navigation/native"; | |
import React, { useRef, useState } from "react"; | |
import { | |
KeyboardAvoidingView, | |
Platform, | |
StyleSheet, | |
Text, | |
TextInput, | |
TouchableOpacity, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FontAwesome } from "@expo/vector-icons"; | |
import { useNavigation } from "@react-navigation/native"; | |
import React, { useState } from "react"; | |
import { | |
KeyboardAvoidingView, | |
Platform, | |
StyleSheet, | |
Text, | |
TextInput, | |
TouchableOpacity, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createSlice } from "@reduxjs/toolkit"; | |
const initialState = [ | |
{ id: "1", title: "First Post!", content: "Hello!" }, | |
{ id: "2", title: "Second Post", content: "More text" }, | |
]; | |
const notesSlice = createSlice({ | |
name: "notes", | |
initialState, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FontAwesome } from "@expo/vector-icons"; | |
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; | |
import React from "react"; | |
import { NOTES_SCREEN, PROFILE_SCREEN } from "../constants"; | |
import NotesScreenHome from "../screens/NotesScreenHome"; | |
import ProfileScreen from "../screens/ProfileScreen"; | |
const BottomTab = createBottomTabNavigator(); | |
export default function HomeStack() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
FlatList, | |
StyleSheet, | |
Text, | |
TouchableOpacity, | |
View, | |
} from "react-native"; | |
import React from "react"; | |
const posts = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AsyncStorage from "@react-native-async-storage/async-storage"; | |
import { NavigationContainer } from "@react-navigation/native"; | |
import { createStackNavigator } from "@react-navigation/stack"; | |
import React, { useEffect, useState } from "react"; | |
import { ActivityIndicator, StatusBar, StyleSheet, View } from "react-native"; | |
import AuthScreen from "./screens/AuthScreen"; | |
import ProfileScreen from "./screens/ProfileScreen"; | |
import { AUTH_SCREEN, PROFILE_SCREEN } from "./constants"; | |
const Stack = createStackNavigator(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// API | |
export const API = "https://pcmob6-blog-api.<username>.repl.co"; | |
export const API_LOGIN = "/auth"; | |
export const API_SIGNUP = "/newuser"; | |
export const API_POSTS = "/posts"; | |
export const API_WHOAMI = "/whoami"; | |
export const API_CREATE = "/create"; | |
// Screen names | |
export const AUTH_SCREEN = "AUTH_SCREEN" |
NewerOlder