Fill in states

This commit is contained in:
Eric Bailey
2025-02-23 18:06:43 -06:00
parent d86cd48fad
commit 5f9fda46e8
@@ -237,7 +237,7 @@ function Inner(props: ReportDialogProps) {
<LabelerCard labeler={state.selectedLabeler} /> <LabelerCard labeler={state.selectedLabeler} />
</View> </View>
<Button <Button
label={_(msg`Change report reason`)} label={_(msg`Change moderation service`)}
size="tiny" size="tiny"
variant="solid" variant="solid"
color="secondary" color="secondary"
@@ -254,19 +254,22 @@ function Inner(props: ReportDialogProps) {
<View style={[a.gap_sm]}> <View style={[a.gap_sm]}>
{supportedLabelers.map(l => ( {supportedLabelers.map(l => (
<LabelerCard <LabelerCard
// @ts-expect-error TODO
key={l.creator.did} key={l.creator.did}
// @ts-expect-error TODO
labeler={l} labeler={l}
onSelect={() => { onSelect={() => {
// @ts-expect-error TODO
dispatch({type: 'selectLabeler', labeler: l}) dispatch({type: 'selectLabeler', labeler: l})
}} }}
/> />
))} ))}
</View> </View>
) : ( ) : (
<Text>TODO</Text> // should never happen in our app
<Admonition type="warning">
<Trans>
Unfortunately, none of your subscribed labelers supports
this report type.
</Trans>
</Admonition>
)} )}
</> </>
)} )}
@@ -289,17 +292,17 @@ function Inner(props: ReportDialogProps) {
<Text style={[a.font_bold, a.leading_snug]}> <Text style={[a.font_bold, a.leading_snug]}>
{state.selectedLabeler?.creator.displayName} {state.selectedLabeler?.creator.displayName}
</Text> </Text>
.{' '} .
</Trans>{' '}
{!state.detailsOpen ? ( {!state.detailsOpen ? (
<InlineLinkText <InlineLinkText
label={_(msg`Add more details`)} label={_(msg`Add more details (optional)`)}
{...createStaticClick(() => { {...createStaticClick(() => {
dispatch({type: 'showDetails'}) dispatch({type: 'showDetails'})
})}> })}>
Add more details (optional) <Trans>Add more details (optional)</Trans>
</InlineLinkText> </InlineLinkText>
) : null} ) : null}
</Trans>
</Text> </Text>
{state.detailsOpen && ( {state.detailsOpen && (
@@ -310,7 +313,7 @@ function Inner(props: ReportDialogProps) {
onChangeText={details => { onChangeText={details => {
dispatch({type: 'setDetails', details}) dispatch({type: 'setDetails', details})
}} }}
label={_(msg`Additional details`)} label={_(msg`Additional details (limit 300 characters)`)}
style={{paddingRight: 60}} style={{paddingRight: 60}}
numberOfLines={4} numberOfLines={4}
/> />