-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
112 additions
and
37 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,15 +1,40 @@ | ||
import { Text, View, YStack } from 'tamagui' | ||
import { Feather } from '@expo/vector-icons' | ||
import { Text, YStack } from 'tamagui' | ||
import { StyleSheet } from 'react-native' | ||
import GhostIcon from '../icons/GhostIcon' | ||
|
||
const almostBlack = 'rgb(64, 64, 64)' | ||
|
||
export default function EmptyFeed() { | ||
return ( | ||
<View my="$6" justifyContent="center" alignItems="center"> | ||
<YStack justifyContent="center" alignItems="center" gap="$3"> | ||
<Feather name="alert-circle" size={80} color="red" /> | ||
<Text fontSize="$9">No posts found!</Text> | ||
<Text fontSize="$7">The service may be temporarily unavailable.</Text> | ||
<Text fontSize="$5">Pull to refresh</Text> | ||
</YStack> | ||
</View> | ||
<YStack | ||
p='$4' | ||
pt='$12' | ||
alignContent='center' | ||
justifyContent='center' | ||
alignItems='center' | ||
> | ||
<GhostIcon width={200} height={200} color={almostBlack}/> | ||
|
||
<Text style={styles.noPostsHeader}> | ||
Ghosts have taken over this timeline! | ||
</Text> | ||
<Text style={styles.noPostsText}> | ||
Try following some accounts to get rid of them! | ||
</Text> | ||
</YStack> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
noPostsHeader: { | ||
textAlign: 'center', | ||
fontWeight: 'bold', | ||
fontSize: 24, | ||
color: 'darkgray', | ||
paddingTop: 24 | ||
}, | ||
noPostsText: { | ||
textAlign: 'center', | ||
color: 'darkgray' | ||
} | ||
}) |
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,13 @@ | ||
import { Text, View, YStack } from 'tamagui' | ||
import { Feather } from '@expo/vector-icons' | ||
|
||
export default function ErrorFeed() { | ||
return ( | ||
<YStack my="$6" justifyContent="center" alignItems="center" gap="$3"> | ||
<Feather name="alert-circle" size={80} color="red" /> | ||
<Text fontSize="$9">No posts found!</Text> | ||
<Text fontSize="$7">The service may be temporarily unavailable.</Text> | ||
<Text fontSize="$5">Pull to refresh</Text> | ||
</YStack> | ||
) | ||
} |
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,24 @@ | ||
import * as React from "react" | ||
import { ColorValue } from "react-native" | ||
import Svg, { Path } from 'react-native-svg' | ||
|
||
// Source: https://free-icons.github.io/free-icons/ | ||
|
||
interface GhostIconProps { | ||
width: number | ||
height: number | ||
color: ColorValue | ||
} | ||
|
||
const GhostIcon = (props: GhostIconProps) => ( | ||
<Svg | ||
fill={props.color} | ||
viewBox="0 0 512 512" | ||
width={props.width} | ||
height={props.height} | ||
> | ||
<Path d="M307 506q5 6 13 6t13-6l30-33q9-10 22-11 12 0 22 9l2 2q7 7 16 7 21-2 23-23V192q-2-82-56-136T256 0q-82 2-136 56T64 192v265q2 21 23 23 9 0 16-7l2-2q10-9 22-9 13 1 22 11l30 33q5 6 13 6t13-6l27-30q10-11 24-11t24 11l27 30ZM91 462q-2 2-4 2-6-1-7-7V192q2-75 52-124 49-50 124-52 75 2 124 52 50 49 52 124v265q-1 6-7 7-2 0-4-2l-3-2q-15-14-34-14-19 1-33 16l-30 34h-2l-27-31q-15-16-36-16t-36 16l-27 31h-2l-29-34q-15-15-34-16t-34 14l-3 2Zm101-246q-22-2-24-24 2-22 24-24 22 2 24 24-2 22-24 24Zm-40-24q1 23 20 35 20 10 40 0 19-12 20-35-1-23-20-35-20-10-40 0-19 12-20 35Zm192 0q-2 22-24 24-22-2-24-24 2-22 24-24 22 2 24 24Zm-24-40q-23 1-35 20-10 20 0 40 12 19 35 20 23-1 35-20 10-20 0-40-12-19-35-20Z" /> | ||
</Svg> | ||
) | ||
|
||
export default GhostIcon |