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 * as React from "react"; | |
import { NavigationContainer } from "@react-navigation/native"; | |
import { useTheme } from "react-native-paper"; | |
import { Provider as PaperProvider } from "react-native-paper"; | |
import { createNativeStackNavigator } from "@react-navigation/native-stack"; | |
import SearchScreen from "./Search"; | |
const Stack = createNativeStackNavigator(); | |
const App = () => { |
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
// src/components/Calender/utils | |
import { weekDays, daysInEachMonth } from './const'; | |
export function generateMatrix(currentDate: Date) { | |
let matrix: (number | string)[][] = []; | |
// Create header of days | |
matrix[0] = weekDays; | |
let year = currentDate.getFullYear(); |
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
// src/components/Calendar/Calendar.tsx | |
import * as React from 'react'; | |
import { | |
View, | |
Text, | |
Button, | |
TouchableOpacity, | |
StyleSheet, | |
} from 'react-native'; | |
import { DefaultTheme } from '../../theme'; |
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
// App.tsx | |
import * as React from 'react'; | |
import { | |
Text, | |
View, | |
StyleSheet, | |
TextInput, | |
Button, | |
ScrollView, | |
StatusBar, |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 response = { | |
"response": { | |
"534": { | |
"in": [], | |
"out": [] | |
}, | |
"535": { | |
"in": [], | |
"out": [] | |
}, |
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 * as React from 'react'; | |
import { ThemeProvider } from 'react-native-elements'; | |
import { NavigationContainer } from '@react-navigation/native'; | |
import { createNativeStackNavigator } from '@react-navigation/native-stack'; | |
import { QueryClient, QueryClientProvider } from 'react-query' | |
import LoginScreen from './src/screens/Login'; | |
import RegisterScreen from './src/screens/Register'; | |
import HomeScreen from './src/screens/Home'; | |
import DetailsScreen from './src/screens/Details'; |
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 * as React from 'react'; | |
import { View } from 'react-native'; | |
import { Button, Input, Card, Text } from 'react-native-elements'; | |
import { useMutation } from 'react-query'; | |
import { register } from '../service'; | |
import styles from '../styles'; | |
function RegisterScreen({ navigation }) { | |
const [email, setEmail] = React.useState("") |
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 * as React from 'react'; | |
import { View } from 'react-native'; | |
import { Button, Input, Card, Text } from 'react-native-elements'; | |
import { useMutation } from 'react-query'; | |
import { login } from '../service'; | |
import styles from '../styles'; | |
function LoginScreen({ navigation }) { | |
const [username, setUsername] = React.useState(""); |
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 baseUrl = "https://alpha.yajananrao.io"; | |
export function register({ email, username, password, confirmPassword }) { | |
const data = { | |
username, | |
email, | |
"password1": password, | |
"password2": confirmPassword | |
}; | |
return fetch(`${baseUrl}/auth/registration/`, { |