-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added loser screen, mistakes logic and some styling
- Loading branch information
1 parent
207e238
commit 89c986f
Showing
18 changed files
with
132 additions
and
36 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { StatusBar } from 'expo-status-bar'; | ||
import { View } from 'react-native'; | ||
|
||
import { BlackButton } from '../../components/black-button/black-button'; | ||
import { Header } from '../../components/header/header'; | ||
|
||
import { LoserStyles as styles } from './loser.styles'; | ||
|
||
export default function Loser() { | ||
return ( | ||
<View style={styles.container}> | ||
<StatusBar style="auto" /> | ||
<Header text="Better next time! Loooooser =)" /> | ||
<BlackButton text={'Play again'} href={'/'} /> | ||
</View> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
export const LoserStyles = StyleSheet.create({ | ||
container: { | ||
alignItems: 'center', | ||
flex: 1, | ||
justifyContent: 'center' | ||
} | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { Link } from 'expo-router'; | ||
import { StatusBar } from 'expo-status-bar'; | ||
import { Text, View } from 'react-native'; | ||
import { View } from 'react-native'; | ||
|
||
import { BlackButton } from '../../components/black-button/black-button'; | ||
import { Header } from '../../components/header/header'; | ||
|
||
import { WinnerStyles as styles } from './winner.styles'; | ||
|
||
export default function Winner() { | ||
return ( | ||
<View style={styles.container}> | ||
<StatusBar style="auto" /> | ||
<Text style={styles.header}>Winner-winner, chicken dinner!</Text> | ||
<Link href="/" style={styles.button}> | ||
<Text>Play again</Text> | ||
</Link> | ||
<Header text="Winner-winner, chicken dinner!" /> | ||
<BlackButton text={'Play again'} href={'/'} /> | ||
</View> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
export const WinnerStyles = StyleSheet.create({ | ||
button: { | ||
backgroundColor: '#000', | ||
color: 'white', | ||
paddingHorizontal: 20, | ||
paddingVertical: 10 | ||
}, | ||
container: { | ||
alignItems: 'center', | ||
flex: 1, | ||
justifyContent: 'center' | ||
}, | ||
header: { | ||
fontFamily: 'Inter_700Bold', | ||
fontSize: 22, | ||
marginBottom: 10 | ||
} | ||
}); |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
export const HeaderStyles = StyleSheet.create({ | ||
container: { | ||
fontFamily: 'Inter_700Bold', | ||
fontSize: 22, | ||
marginBottom: 20 | ||
} | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Text, type TextProps } from 'react-native'; | ||
|
||
import { HeaderStyles as styles } from './header.styles'; | ||
|
||
interface Props extends TextProps { | ||
text: string; | ||
} | ||
|
||
export const Header = ({ text, ...props }: Props) => { | ||
return ( | ||
<Text style={styles.container} {...props}> | ||
{text} | ||
</Text> | ||
); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const cellSize = 50; | ||
export const CellSizeConstant = 50; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const MaxMistakesConstant = 3; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
import { appRootSlice } from './app-root.slice'; | ||
|
||
export const { load: appRootLoadAction, selectCell: appRootSelectCellAction, setValue: appRootSetValueAction } = appRootSlice.actions; | ||
export const { | ||
load: appRootLoadAction, | ||
selectCell: appRootSelectCellAction, | ||
setValue: appRootSetValueAction, | ||
madeAMistake: appRootMadeAMistake | ||
} = appRootSlice.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
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
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