Skip to content

Commit

Permalink
Merge pull request #25 from TaskRatchet/Task-Loading-Text
Browse files Browse the repository at this point in the history
Task loading text
  • Loading branch information
narthur authored Jun 13, 2024
2 parents 203537b + 5512821 commit 17f82f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/screens/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function HomeScreen({navigation}: Props): JSX.Element {
const [clickedId, setClickedId] = useState<string>();
const [selectedOption, setSelectedOption] = useState('Next');

const {data: tasks} = useQuery({
const {data: tasks, isLoading} = useQuery({
queryKey: ['tasks'],
queryFn: getTasks,
});
Expand Down Expand Up @@ -246,7 +246,11 @@ export default function HomeScreen({navigation}: Props): JSX.Element {
})
) : (
<View style={[primaryStyle, styles.noTasksContainer]}>
{selectedOption === 'Next' ? (
{isLoading ? (
<Text style={[textColorStyle, styles.noTasks]}>
Loading...
</Text>
) : selectedOption === 'Next' ? (
<Text style={[textColorStyle, styles.noTasks]}>
Congrantulations! You're all caught up!
</Text>
Expand Down
1 change: 0 additions & 1 deletion src/styles/homeScreenStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export const styles = StyleSheet.create({
navBar: {},
profile_infoButtons: {
flex: 1,
flexContent: 'space_between',
flexDirection: 'row',
alignContent: 'center',
},
Expand Down

0 comments on commit 17f82f6

Please sign in to comment.