Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: build error for image #31

Merged
merged 2 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/app/features/wallet/WalletScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
Scan,
AnimatePresence,
Paragraph,
HEADER_TITLE_TEXT_HEIGHT,
} from '@internal/ui'
import React from 'react'
import { useRouter } from 'solito/router'
Expand All @@ -28,7 +29,8 @@ export function WalletScreen() {
const { push } = useRouter()
const { w3cCredentialRecords, isLoading } = useW3cCredentialRecords()
const firstThreeRecords = w3cCredentialRecords.slice(0, 3)
const { handleScroll, isScrolledByOffset, scrollEventThrottle } = useScrollViewPosition(32)
const { handleScroll, isScrolledByOffset, scrollEventThrottle } =
useScrollViewPosition(HEADER_TITLE_TEXT_HEIGHT)

const navigateToCredentialDetail = (id: string) => push(`/credentials/${id}`)
const navigateToScanner = useNetworkCallback(() => push('/scan'))
Expand Down Expand Up @@ -66,7 +68,7 @@ export function WalletScreen() {
space
px="$4"
contentContainerStyle={{
minHeight: '100%',
minHeight: '90%',
}}
>
<XStack jc="space-between" ai="center">
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export const HEADER_STATUS_BAR_HEIGHT = 56
export const BASE_CREDENTIAL_CARD_HEIGHT = 196
export const CREDENTIAL_TOP_INFO_OFFSET = 56
export const CREDENTIAL_TOP_INFO_HEIGHT = 64
export const HEADER_TITLE_TEXT_HEIGHT = 38
6 changes: 1 addition & 5 deletions packages/ui/src/content/Image.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { SvgUri } from 'react-native-svg'
import { Image as TImage } from 'tamagui'

import { XStack } from '../base'

interface ImageProps {
src: string
alt?: string
Expand All @@ -17,8 +15,6 @@ export const Image = ({ src, alt, width, height, resizeMode = 'contain' }: Image
return <SvgUri role="img" width={width} height={height} uri={src} aria-label={alt} />

return (
<XStack style={{ width, height }}>
<TImage source={{ uri: src }} width="100%" height="100%" alt={alt} resizeMode={resizeMode} />
</XStack>
<TImage source={{ uri: src }} width={width} height={height} alt={alt} resizeMode={resizeMode} />
)
}