Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Dec 6, 2024
1 parent 2e5ca0b commit 4d60b0d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
22 changes: 9 additions & 13 deletions example/src/HomeScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Clipboard from '@react-native-community/clipboard'
import { NavigationContext } from '@react-navigation/native'
import moment from 'moment'
import React, { useContext, useEffect, useState } from 'react'
Expand All @@ -10,7 +11,6 @@ import {
View,
TouchableOpacity,
} from 'react-native'
import Clipboard from '@react-native-community/clipboard'
import {
Conversation,
Client,
Expand Down Expand Up @@ -93,9 +93,7 @@ function ConversationItem({
client: Client<any> | null
}) {
const navigation = useContext(NavigationContext)
const [messages, setMessages] = useState<
DecodedMessage[]
>([])
const [messages, setMessages] = useState<DecodedMessage[]>([])
const lastMessage = messages?.[0]
const [consentState, setConsentState] = useState<string | undefined>()

Expand All @@ -121,15 +119,13 @@ function ConversationItem({

return (
<Pressable
onPress={() =>
{
console.log('conversation pressed')
console.log(conversation.topic)
navigation!.navigate('conversation', {
topic: conversation.topic,
})
}
}
onPress={() => {
console.log('conversation pressed')
console.log(conversation.topic)
navigation!.navigate('conversation', {
topic: conversation.topic,
})
}}
>
<View
style={{
Expand Down
2 changes: 1 addition & 1 deletion example/src/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ export async function getDbEncryptionKey(
clear: boolean = false
): Promise<Uint8Array> {
const key = `xmtp-${network}`

const result = await EncryptedStorage.getItem(key)
if ((result && clear === true) || !result) {
if (result) {
Expand Down
3 changes: 2 additions & 1 deletion example/src/tests/conversationTests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Wallet } from 'ethers'
import RNFS from 'react-native-fs'

import { Test, assert, createClients, delayToPropogate } from './test-utils'
import {
Client,
Expand All @@ -7,7 +9,6 @@ import {
ConversationId,
ConversationVersion,
} from '../../../src/index'
import { Wallet } from 'ethers'

export const conversationTests: Test[] = []
let counter = 1
Expand Down

0 comments on commit 4d60b0d

Please sign in to comment.