From c017e381cd80b1bd7a0c6bb49555de907065bb8d Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:55:25 -0500 Subject: [PATCH] Simplify about string logic Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com> --- ts/components/ProfileEditor.tsx | 29 -------------- ts/test-node/util/getAboutText_test.ts | 53 -------------------------- ts/util/getAboutText.ts | 14 ++----- 3 files changed, 3 insertions(+), 93 deletions(-) delete mode 100644 ts/test-node/util/getAboutText_test.ts diff --git a/ts/components/ProfileEditor.tsx b/ts/components/ProfileEditor.tsx index 89bbc34f8..25ff7b321 100644 --- a/ts/components/ProfileEditor.tsx +++ b/ts/components/ProfileEditor.tsx @@ -36,7 +36,6 @@ import type { ShowToastAction } from '../state/ducks/toast'; import { getEmojiData, unifiedToEmoji } from './emoji/lib'; import { assertDev } from '../util/assert'; import { missingCaseError } from '../util/missingCaseError'; -import { sanitizeAboutText } from '../util/getAboutText'; import { ConfirmationDialog } from './ConfirmationDialog'; import { ContextMenu } from './ContextMenu'; import { UsernameLinkModalBody } from './UsernameLinkModalBody'; @@ -210,7 +209,6 @@ export function ProfileEditor({ }); const [isResettingUsername, setIsResettingUsername] = useState(false); const [isResettingUsernameLink, setIsResettingUsernameLink] = useState(false); - const [isInvalidAboutText, setIsInvalidAboutText] = useState(false); // Reset username edit state when leaving useEffect(() => { @@ -497,14 +495,6 @@ export function ProfileEditor({