-
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.
Finish adding saved setlists, persist saved setlist state, add list v…
…iew for saved, snackbar upon saving setlist, typed selector fn
- Loading branch information
Showing
10 changed files
with
200 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
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,31 @@ | ||
import { StyleSheet, StyleProp, ViewStyle } from "react-native"; | ||
import { Card, Text } from "react-native-paper"; | ||
|
||
/** Message to display when no setlist data has been detected */ | ||
const NoSavedSetlistsCard = () => ( | ||
<Card style={styles.container} mode="contained"> | ||
<Card.Title | ||
title="You haven't saved any setlists yet." | ||
titleVariant="titleMedium" | ||
titleStyle={styles.title} | ||
titleNumberOfLines={0} | ||
/> | ||
<Card.Content> | ||
<Text variant="bodyMedium"> | ||
Search for your favourite setlists, then add them by clicking on the {`\u2b50`} button. | ||
</Text> | ||
</Card.Content> | ||
</Card> | ||
); | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
marginHorizontal: 12, | ||
}, | ||
title: { | ||
fontWeight: "bold", | ||
paddingTop: 8, | ||
}, | ||
}); | ||
|
||
export default NoSavedSetlistsCard; |
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,6 +1,8 @@ | ||
import { useDispatch, useSelector } from "react-redux"; | ||
import type { TypedUseSelectorHook } from "react-redux"; | ||
import type { RootState, AppDispatch } from "../store/types"; | ||
import { createSelector } from "@reduxjs/toolkit"; | ||
|
||
export const useAppDispatch: () => AppDispatch = useDispatch; | ||
export const createAppSelector = createSelector.withTypes<RootState>(); | ||
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector; |
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
Oops, something went wrong.