[🐴] NUX (#4062)

* remove type assertion

* DMs NUX

* delete button for testing

* tweak styles and copy

* rm log

* style tweaks

* reduce amount of words

* Fix not showing on first load

* Spacing tweaks

---------

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Samuel Newman 2024-05-17 20:24:06 +01:00 committed by GitHub
parent 115041f4bf
commit dd0f57e3e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 210 additions and 4 deletions

View file

@ -26,6 +26,7 @@ import {
useInAppBrowser,
useSetInAppBrowser,
} from '#/state/preferences/in-app-browser'
import {useDeleteActorDeclaration} from '#/state/queries/messages/actor-declaration'
import {useClearPreferencesMutation} from '#/state/queries/preferences'
import {RQKEY as RQKEY_PROFILE} from '#/state/queries/profile'
import {useProfileQuery} from '#/state/queries/profile'
@ -305,6 +306,8 @@ export function SettingsScreen({}: Props) {
Toast.show(_(msg`Legacy storage cleared, you need to restart the app now.`))
}, [_])
const {mutate: onPressDeleteChatDeclaration} = useDeleteActorDeclaration()
return (
<View style={s.hContentRegion} testID="settingsScreen">
<ExportCarDialog control={exportCarControl} />
@ -826,6 +829,16 @@ export function SettingsScreen({}: Props) {
<Trans>Reset preferences state</Trans>
</Text>
</TouchableOpacity>
<TouchableOpacity
style={[pal.view, styles.linkCardNoIcon]}
onPress={() => onPressDeleteChatDeclaration()}
accessibilityRole="button"
accessibilityLabel={_(msg`Delete chat declaration record`)}
accessibilityHint={_(msg`Deletes the chat declaration record`)}>
<Text type="lg" style={pal.text}>
<Trans>Delete chat declaration record</Trans>
</Text>
</TouchableOpacity>
<TouchableOpacity
style={[pal.view, styles.linkCardNoIcon]}
onPress={onPressResetOnboarding}