Skip to content

Commit

Permalink
chore: clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Sep 26, 2024
1 parent 0a0c02d commit 232566b
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 77 deletions.
2 changes: 1 addition & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"eas-build-pre-install": "./eas-hooks/eas-build-pre-install.sh",
"format": "prettier --write \"src/**/*.{ts,tsx}\" --ignore-path ../../.prettierignore",
"format:check": "prettier --check \"src/**/*.{ts,tsx}\" --ignore-path ../../.prettierignore",
"ios": "expo run:ios --verbose",
"ios": "expo run:ios",
"ios:build": "expo run:ios --no-bundler",
"lingui": "pnpm lingui:extract && pnpm lingui:compile",
"lingui:compile": "lingui compile",
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import { StatusBar } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { SafeAreaProvider } from 'react-native-safe-area-context';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useRef } from 'react';

import { Text } from '@leather.io/ui/native';
import { CollectibleCard, SheetRef } from '@leather.io/ui/native';
import { CollectibleCard, SheetRef, Text } from '@leather.io/ui/native';

import { TokenBalance } from '../components/balance/token-balance';
import { CollectiblesHeader } from './collectibles-header';
Expand Down Expand Up @@ -29,9 +28,43 @@ export function CollectiblesWidget({ collectibles, totalBalance }: CollectiblesW
>
{/* <Text>Collectibles</Text> */}
{collectibles.map((collectible: Collectible, index: number) => (
<Text key={`collectible-${index}`}>
{'name' in collectible ? collectible.name : collectible.metadata.name}
</Text>
<>
<Text key={`collectible-${index}`}>
{'name' in collectible ? collectible.name : collectible.metadata.name}
</Text>
<CollectibleCard
collectible={{
token_uri: 'ipfs://ipfs/QmQ63rXC9F7GyLYoYNyqxeiYvbBUvmHmL36PrfYNxpw5sT/90.json',
metadata: {
sip: 16,
name: 'BlockSurvey #90',

Check failure on line 40 in apps/mobile/src/components/widgets/collectibles/collectibles-widget.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

disallow literal string
description: 'Worlds First Software License as an NFT',

Check failure on line 41 in apps/mobile/src/components/widgets/collectibles/collectibles-widget.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

disallow literal string
image: 'ipfs://QmZXkLMrN2ejpzGv1wk4HgcuL6XbyLVieW3Zm9wyAoDk18/90.png',
cached_image:
'https://assets.hiro.so/api/mainnet/token-metadata-api/SPNWZ5V2TPWGQGVDR6T7B6RQ4XMGZ4PXTEE0VQ0S.blocksurvey/90.png',
cached_thumbnail_image:
'https://assets.hiro.so/api/mainnet/token-metadata-api/SPNWZ5V2TPWGQGVDR6T7B6RQ4XMGZ4PXTEE0VQ0S.blocksurvey/90-thumb.png',
attributes: [
{
trait_type: 'NightBackground',

Check failure on line 49 in apps/mobile/src/components/widgets/collectibles/collectibles-widget.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

disallow literal string
value: 'MidnightMoss',

Check failure on line 50 in apps/mobile/src/components/widgets/collectibles/collectibles-widget.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

disallow literal string
display_type: '',
},
{
trait_type: 'NightLogo',

Check failure on line 54 in apps/mobile/src/components/widgets/collectibles/collectibles-widget.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

disallow literal string
value: 'AtomicTangerine',

Check failure on line 55 in apps/mobile/src/components/widgets/collectibles/collectibles-widget.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

disallow literal string
display_type: '',
},
{
trait_type: 'SignatureWhite',

Check failure on line 59 in apps/mobile/src/components/widgets/collectibles/collectibles-widget.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

disallow literal string
value: 'SignatureWhite',

Check failure on line 60 in apps/mobile/src/components/widgets/collectibles/collectibles-widget.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

disallow literal string
display_type: '',
},
],
},
}}
/>
</>
))}

<CollectibleCard
Expand Down Expand Up @@ -66,26 +99,6 @@ export function CollectiblesWidget({ collectibles, totalBalance }: CollectiblesW
},
}}
/>
{/* <CollectibleCard
collectible={{
id: 'a494e48bf7120c959239e8c544bc821ca4fb5a46e5fff79938943d434f252949i0',
number: 74703951,
output: '0',
txid: 'a494e48bf7120c959239e8c544bc821ca4fb5a46e5fff79938943d434f252949',
offset: '0',
address: 'bc1pwz9n62p9dhjpqcpdmfcrewdnz3nk8jcved242vd2lj9fgvtvwnwscvdyre',
preview:
'https://ordinals.hiro.so/inscription/a494e48bf7120c959239e8c544bc821ca4fb5a46e5fff79938943d434f252949i0',
title: 'Inscription 74703951',
genesisBlockHeight: 857719,
genesisBlockHash: '00000000000000000002bc6789fc6742da4958d003d3abff740687a863613a46',
genesisTimestamp: 1724219117,
value: '546',
mimeType: 'html',
name: 'inscription',
src: 'https://ordinals.com/preview/a494e48bf7120c959239e8c544bc821ca4fb5a46e5fff79938943d434f252949i0',
}}
/> */}
</CollectiblesWidgetLayout>
);
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export function CollectibleCard({ collectible }: CollectibleCardProps) {
return (
<CollectibleImage
source={imageSource}
// alt={isOrdinal ? String(collectible.name) : collectible.metadata.name}
alt="test"
alt={isOrdinal ? String(collectible.name) : collectible.metadata.name}
/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,3 @@ export function InscriptionTextLayout({ content }: InscriptionTextLayoutProps) {
</Box>
);
}

// PETE check this as this had Query too :( need to pass in jsonParsecontent

0 comments on commit 232566b

Please sign in to comment.