[Clipclops] Add screen to view and send clip clops (#3754)
* add new routes with placeholder screens * add clops list * add a clop input * add some better padding to the clops * some more adjustments * add rnkc * implement rnkc * implement rnkc * be a little less weird about it * rename clop stuff * rename more clop * one more * [Clipclops] Temp codegenerated lexicon (#3749) * add codegenerated lexicon * replace hailey's types * use codegen'd types in components * fix error + throw if fetch failed * remove bad imports * update messageslist and messageitem * import useState * add clop service URL hook * add dm service url storage * use context * use context for service url (temp) * remove log * nits --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
parent
5d19f27052
commit
eb8bfd11d1
28 changed files with 1295 additions and 7 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import React from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||
|
|
@ -7,6 +6,8 @@ import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
|||
import {CommonNavigatorParams} from '#/lib/routes/types'
|
||||
import {useGate} from '#/lib/statsig/statsig'
|
||||
import {ViewHeader} from '#/view/com/util/ViewHeader'
|
||||
import {CenteredView} from 'view/com/util/Views'
|
||||
import {MessagesList} from '#/screens/Messages/Conversation/MessagesList'
|
||||
import {ClipClopGate} from '../gate'
|
||||
|
||||
type Props = NativeStackScreenProps<
|
||||
|
|
@ -16,17 +17,18 @@ type Props = NativeStackScreenProps<
|
|||
export function MessagesConversationScreen({route}: Props) {
|
||||
const chatId = route.params.conversation
|
||||
const {_} = useLingui()
|
||||
|
||||
const gate = useGate()
|
||||
|
||||
if (!gate('dms')) return <ClipClopGate />
|
||||
|
||||
return (
|
||||
<View>
|
||||
<CenteredView style={{flex: 1}} sideBorders>
|
||||
<ViewHeader
|
||||
title={_(msg`Chat with ${chatId}`)}
|
||||
showOnDesktop
|
||||
showBorder
|
||||
/>
|
||||
</View>
|
||||
<MessagesList chatId={chatId} />
|
||||
</CenteredView>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue