From d168302e7201366515643f9f6c8007053fe310ff Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 4 Jul 2022 13:17:01 -0500 Subject: [PATCH] EditProfile: reenable birthdays with TextInput (for now) --- app/soapbox/features/edit_profile/index.tsx | 25 ++++++++++++++------- app/soapbox/utils/features.ts | 4 +--- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/app/soapbox/features/edit_profile/index.tsx b/app/soapbox/features/edit_profile/index.tsx index 1eaa74e62..9d5c3b622 100644 --- a/app/soapbox/features/edit_profile/index.tsx +++ b/app/soapbox/features/edit_profile/index.tsx @@ -4,9 +4,19 @@ import { defineMessages, useIntl, FormattedMessage } from 'react-intl'; import { updateNotificationSettings } from 'soapbox/actions/accounts'; import { patchMe } from 'soapbox/actions/me'; import snackbar from 'soapbox/actions/snackbar'; -import BirthdayInput from 'soapbox/components/birthday_input'; import List, { ListItem } from 'soapbox/components/list'; -import { Button, Column, Form, FormActions, FormGroup, Input, Textarea, HStack, Toggle, FileInput } from 'soapbox/components/ui'; +import { + Button, + Column, + FileInput, + Form, + FormActions, + FormGroup, + HStack, + Input, + Textarea, + Toggle, +} from 'soapbox/components/ui'; import Streamfield, { StreamfieldComponent } from 'soapbox/components/ui/streamfield/streamfield'; import { useAppSelector, useAppDispatch, useOwnAccount, useFeatures } from 'soapbox/hooks'; import { normalizeAccount } from 'soapbox/normalizers'; @@ -222,10 +232,6 @@ const EditProfile: React.FC = () => { }; }; - const handleBirthdayChange = (date: string) => { - updateData('birthday', date); - }; - const handleHideNetworkChange: React.ChangeEventHandler = e => { const hide = e.target.checked; @@ -309,9 +315,12 @@ const EditProfile: React.FC = () => { } > - )} diff --git a/app/soapbox/utils/features.ts b/app/soapbox/utils/features.ts index 6f4a77ddf..206eaf067 100644 --- a/app/soapbox/utils/features.ts +++ b/app/soapbox/utils/features.ts @@ -148,9 +148,7 @@ const getInstanceFeatures = (instance: Instance) => { * @see POST /api/v1/accounts * @see PATCH /api/v1/accounts/update_credentials */ - // birthdays: v.software === PLEROMA && gte(v.version, '2.4.50'), - // FIXME: temporarily disabled until they can be deleted on the backend. - birthdays: false, + birthdays: v.software === PLEROMA && v.build === SOAPBOX && gte(v.version, '2.4.50'), /** Whether people who blocked you are visible through the API. */ blockersVisible: features.includes('blockers_visible'),