Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16a1939

Browse files
authored
Merge branch 'main' into fix/routing-issue
2 parents 161c167 + 60e90bc commit 16a1939

File tree

8 files changed

+312
-2703
lines changed

8 files changed

+312
-2703
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.9
1+
16.16.0

components/ConversationsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { classNames, truncate, formatDate, checkPath } from '../helpers'
22
import Link from 'next/link'
33
import Address from './Address'
44
import { useRouter } from 'next/router'
5-
import { Conversation } from '@xmtp/xmtp-js/dist/types/src/conversations'
5+
import { Conversation } from '@xmtp/xmtp-js'
66
import useConversation from '../hooks/useConversation'
77
import { XmtpContext } from '../contexts/xmtp'
88
import { Message } from '@xmtp/xmtp-js'

contexts/xmtp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createContext, Dispatch } from 'react'
22
import { Client, Message } from '@xmtp/xmtp-js'
33
import { Signer } from 'ethers'
4-
import { Conversation } from '@xmtp/xmtp-js/dist/types/src/conversations'
4+
import { Conversation } from '@xmtp/xmtp-js'
55

66
export type MessageStoreEvent = {
77
peerAddress: string

helpers/env.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
export const getEnv = (): 'dev' | 'production' => {
2-
return process.env.NEXT_PUBLIC_XMTP_ENVIRONMENT === 'production'
3-
? 'production'
4-
: 'dev'
1+
export const getEnv = (): 'dev' | 'production' | 'local' => {
2+
const envVar = process.env.NEXT_PUBLIC_XMTP_ENVIRONMENT
3+
if (envVar === 'production') {
4+
return envVar
5+
}
6+
if (envVar === 'local') {
7+
return envVar
8+
}
9+
return 'dev'
510
}

hooks/useConversation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const useConversation = (
3636
if (!conversation) return
3737
console.log('Listing messages for peer address', conversation.peerAddress)
3838
setLoading(true)
39-
const msgs = await conversation.messages({ pageSize: 100 })
39+
const msgs = await conversation.messages()
4040
if (dispatchMessages) {
4141
dispatchMessages({
4242
peerAddress: conversation.peerAddress,

next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const nextConfig = optimizedImages({
1111
// https://github.com/vercel/next.js/issues/7755#issuecomment-937721514
1212
config.resolve.fallback.fs = false
1313
}
14+
config.resolve.mainFields = ['browser', 'main', 'module']
1415
return config
1516
},
1617
})

0 commit comments

Comments
 (0)