Skip to content

Commit

Permalink
broken expo router, duplicated files
Browse files Browse the repository at this point in the history
  • Loading branch information
Melissa Liu committed Oct 8, 2023
1 parent 8c3f7dc commit 76df34d
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 19 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"prettier": "^2.8.8",
"typescript": "^5.1.3"
"typescript": "^4.9.5"
},
"private": true
}
5 changes: 3 additions & 2 deletions src/app/(Authentication)/Welcome/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Text, View } from 'react-native';
import StyledButton from '../../../components/StyledButton';
import styles from './styles';

function WelcomeScreen() {
Expand All @@ -12,8 +13,8 @@ function WelcomeScreen() {
</View>

<View style={styles.buttonContainer}>
<StyledButton text="LOG IN" />
<StyledButton text="CREATE ACCOUNT" />
<StyledButton text="LOG IN" file="/Login" />
<StyledButton text="CREATE ACCOUNT" file="/SignUp" />
</View>
</View>
);
Expand Down
Empty file removed src/app/(Authentication)/index.tsx
Empty file.
3 changes: 1 addition & 2 deletions src/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Link } from 'expo-router';
import { Text, View } from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';
import { Text, TouchableOpacity, View } from 'react-native';
import styles from './styles';

function StartScreen() {
Expand Down
25 changes: 20 additions & 5 deletions src/components/StyledButton.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
import { Link } from 'expo-router';
import React from 'react';
import { Text, TouchableOpacity } from 'react-native';
import { Pressable, Text, TouchableOpacity } from 'react-native';
import styles from './styles';

function StyledButton({ text }: { text: string }) {
function StyledButton({ text, file }: { text: string; file: string }) {
return (
<TouchableOpacity style={[styles.buttonContainer]} activeOpacity={0.7}>
<Text style={[styles.buttonText]}>{text}</Text>
</TouchableOpacity>
<Link href={file} asChild>
<Pressable>
<TouchableOpacity style={[styles.buttonContainer]} activeOpacity={0.7}>
<Text style={[styles.buttonText]}>{text}</Text>
</TouchableOpacity>
</Pressable>
</Link>
);
}

export default StyledButton;

/*
<Link href={file} asChild>
<Pressable>
<TouchableOpacity style={[styles.buttonContainer]} activeOpacity={0.7}>
<Text style={[styles.buttonText]}>{text}</Text>
</TouchableOpacity>
</Pressable>
</Link>
*/
Empty file.
Empty file.
Empty file removed src/screens/LogIn/LogIn.ts
Empty file.
Empty file removed src/screens/LogIn/styles.ts
Empty file.

0 comments on commit 76df34d

Please sign in to comment.