From ca8ca903b271e9f7c901b61cad7580ed7a2b756e Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 13 Dec 2024 17:05:53 -0600 Subject: Add some helper text for custom domains (#7103) * Add some helper text for custom domains * endsWith * ope --- .../Settings/components/ChangeHandleDialog.tsx | 38 ++++++++++++++++------ 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'src/screens/Settings') diff --git a/src/screens/Settings/components/ChangeHandleDialog.tsx b/src/screens/Settings/components/ChangeHandleDialog.tsx index 9b2c4f7c3..bb03aace1 100644 --- a/src/screens/Settings/components/ChangeHandleDialog.tsx +++ b/src/screens/Settings/components/ChangeHandleDialog.tsx @@ -17,6 +17,7 @@ import {useMutation, useQueryClient} from '@tanstack/react-query' import {HITSLOP_10} from '#/lib/constants' import {cleanError} from '#/lib/strings/errors' +import {sanitizeHandle} from '#/lib/strings/handles' import {createFullHandle, validateHandle} from '#/lib/strings/handles' import {useFetchDid, useUpdateHandleMutation} from '#/state/queries/handle' import {RQKEY as RQKEY_PROFILE} from '#/state/queries/profile' @@ -29,7 +30,10 @@ import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' import * as TextField from '#/components/forms/TextField' import * as ToggleButton from '#/components/forms/ToggleButton' -import {ArrowRight_Stroke2_Corner0_Rounded as ArrowRightIcon} from '#/components/icons/Arrow' +import { + ArrowLeft_Stroke2_Corner0_Rounded as ArrowLeftIcon, + ArrowRight_Stroke2_Corner0_Rounded as ArrowRightIcon, +} from '#/components/icons/Arrow' import {At_Stroke2_Corner0_Rounded as AtIcon} from '#/components/icons/At' import {CheckThick_Stroke2_Corner0_Rounded as CheckIcon} from '#/components/icons/Check' import {SquareBehindSquare4_Stroke2_Corner0_Rounded as CopyIcon} from '#/components/icons/SquareBehindSquare4' @@ -245,15 +249,14 @@ function ProvidedHandlePage({ If you have your own domain, you can use that as your handle. This - lets you self-verify your identity –{' '} + lets you self-verify your identity.{' '} - learn more + Learn more here. - . @@ -488,6 +491,18 @@ function OwnHandlePage({goToServiceHandle}: {goToServiceHandle: () => void}) { )} + {currentAccount?.handle?.endsWith('.bsky.social') && ( + + + Your current handle{' '} + + {sanitizeHandle(currentAccount?.handle || '', '@')} + {' '} + will automatically remain reserved for you. You can switch back to + it at any time from this account. + + + )} - - + -- cgit 1.4.1