Skip to content

Commit

Permalink
chore: improving
Browse files Browse the repository at this point in the history
  • Loading branch information
plahteenlahti committed Sep 2, 2024
1 parent baf4550 commit da9cf5b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/components/NoPreview.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { View, ViewProps } from 'react-native'
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5'
import colors from 'tailwindcss/colors'

export const NoPreview = ({ className, ...rest }: ViewProps) => {
return (
<View
className={`bg-gray-500 h-full w-full justify-center items-center ${className}`}
className={`bg-gray-500 h-full w-full justify-center items-center ${className}`}
{...rest}>
<FontAwesome5 color="red" size={25} name="safari" brand />
<FontAwesome5 color={colors.gray[900]} size={25} name="safari" brand />
</View>
)
}
11 changes: 9 additions & 2 deletions src/components/layout/ScrollView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const AnimatedScrollView = ({
{children}
</Animated.ScrollView>
<AnimatedBlurView
blurType="light"
blurType="regular"
className="absolute top-0 left-0 right-0 px-4"
style={[
{
Expand All @@ -132,7 +132,14 @@ export const AnimatedScrollView = ({
<View className="flex-row items-center justify-between">
<View className="flex-1 justify-center">
{goBack ? (
<TouchableOpacity>
<TouchableOpacity
onPress={goBack}
className="flex-row gap-x-2 items-center">
<FontAwesome5
color={colors.gray[700]}
name="chevron-left"
size={20}
/>
<Text className="text-base font-medium">Back</Text>
</TouchableOpacity>
) : null}
Expand Down
1 change: 0 additions & 1 deletion src/components/row/ButtonRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const ButtonRow = ({
className={`
font-medium
text-base
flex-1
${type === 'action' ? 'text-blue-500' : 'text-red-500'}
`}>
{title}
Expand Down
4 changes: 2 additions & 2 deletions src/views/SiteView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ export const Site = ({
<View>
<Card.Title className="mb-2">Preview</Card.Title>
<Card>
<View className="h-40 w-full p-2">
<View className="h-48 w-full p-2">
{site.data?.screenshot_url ? (
<Image
className="h-full w-full overflow-hidden rounded-sm"
resizeMode="cover"
source={{ uri: site.data?.screenshot_url }}
/>
) : (
<NoPreview className="rounded-sm" />
<NoPreview className="rounded-md" />
)}
</View>
</Card>
Expand Down

0 comments on commit da9cf5b

Please sign in to comment.