diff --git a/app/javascript/flavours/glitch/components/follow_button.tsx b/app/javascript/flavours/glitch/components/follow_button.tsx index e93688fbd3..477910b971 100644 --- a/app/javascript/flavours/glitch/components/follow_button.tsx +++ b/app/javascript/flavours/glitch/components/follow_button.tsx @@ -6,7 +6,6 @@ import classNames from 'classnames'; import { Link } from 'react-router-dom'; import { useIdentity } from '@/flavours/glitch/identity_context'; -import { isServerFeatureEnabled } from '@/flavours/glitch/utils/environment'; import { fetchRelationships, followAccount, @@ -171,23 +170,10 @@ export const FollowButton: React.FC<{ 'button--compact': compact, }); - if (isServerFeatureEnabled('profile_redesign')) { - return ( - - {label} - - ); - } - return ( - + {label} - + ); } diff --git a/app/javascript/flavours/glitch/features/account_featured/index.tsx b/app/javascript/flavours/glitch/features/account_featured/index.tsx index 9acb98f005..eb420097ee 100644 --- a/app/javascript/flavours/glitch/features/account_featured/index.tsx +++ b/app/javascript/flavours/glitch/features/account_featured/index.tsx @@ -7,7 +7,6 @@ import { useHistory } from 'react-router'; import { List as ImmutableList } from 'immutable'; import { useAccount } from '@/flavours/glitch/hooks/useAccount'; -import { isServerFeatureEnabled } from '@/flavours/glitch/utils/environment'; import { fetchEndorsedAccounts } from 'flavours/glitch/actions/accounts'; import { fetchFeaturedTags } from 'flavours/glitch/actions/featured_tags'; import { Account } from 'flavours/glitch/components/account'; @@ -49,11 +48,7 @@ const AccountFeatured: React.FC<{ multiColumn: boolean }> = ({ const history = useHistory(); useEffect(() => { - if ( - account && - !account.show_featured && - isServerFeatureEnabled('profile_redesign') - ) { + if (account && !account.show_featured) { history.push(`/@${account.acct}`); } }, [account, history]); @@ -111,8 +106,7 @@ const AccountFeatured: React.FC<{ multiColumn: boolean }> = ({ ); } - const noTags = - featuredTags.isEmpty() || isServerFeatureEnabled('profile_redesign'); + const noTags = featuredTags.isEmpty(); if ( noTags && diff --git a/app/javascript/flavours/glitch/features/account_gallery/index.tsx b/app/javascript/flavours/glitch/features/account_gallery/index.tsx index 51ee7d6df4..3d16074436 100644 --- a/app/javascript/flavours/glitch/features/account_gallery/index.tsx +++ b/app/javascript/flavours/glitch/features/account_gallery/index.tsx @@ -4,7 +4,6 @@ import { FormattedMessage, useIntl, defineMessages } from 'react-intl'; import { List as ImmutableList, isList } from 'immutable'; -import { isServerFeatureEnabled } from '@/flavours/glitch/utils/environment'; import PersonIcon from '@/material-icons/400-24px/person.svg?react'; import { openModal } from 'flavours/glitch/actions/modal'; import { expandAccountMediaTimeline } from 'flavours/glitch/actions/timelines'; @@ -31,8 +30,6 @@ const messages = defineMessages({ const emptyList = ImmutableList(); -const redesignEnabled = isServerFeatureEnabled('profile_redesign'); - const selectGalleryTimeline = createAppSelector( [ (_state, accountId?: string | null) => accountId, @@ -62,7 +59,7 @@ const selectGalleryTimeline = createAppSelector( const { show_media, show_media_replies } = account; // If the account disabled showing media, don't display anything. - if (!show_media && redesignEnabled) { + if (!show_media) { return { items, hasMore: false, @@ -71,7 +68,7 @@ const selectGalleryTimeline = createAppSelector( }; } - const withReplies = show_media_replies && redesignEnabled; + const withReplies = show_media_replies; const timeline = timelines.get( `account:${accountId}:media${withReplies ? ':with_replies' : ''}`, ); diff --git a/app/javascript/flavours/glitch/features/account_timeline/common.ts b/app/javascript/flavours/glitch/features/account_timeline/common.ts index 9a4dbd7491..84accded14 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/common.ts +++ b/app/javascript/flavours/glitch/features/account_timeline/common.ts @@ -1,9 +1,4 @@ import type { AccountFieldShape } from '@/flavours/glitch/models/account'; -import { isServerFeatureEnabled } from '@/flavours/glitch/utils/environment'; - -export function isRedesignEnabled() { - return isServerFeatureEnabled('profile_redesign'); -} export interface AccountField extends AccountFieldShape { nameHasEmojis: boolean; diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/account_header.tsx b/app/javascript/flavours/glitch/features/account_timeline/components/account_header.tsx index f200a90474..2a09ecfe4a 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/account_header.tsx +++ b/app/javascript/flavours/glitch/features/account_timeline/components/account_header.tsx @@ -7,7 +7,6 @@ import { openModal } from '@/flavours/glitch/actions/modal'; import { AccountBio } from '@/flavours/glitch/components/account_bio'; import { Avatar } from '@/flavours/glitch/components/avatar'; import { AnimateEmojiProvider } from '@/flavours/glitch/components/emoji/context'; -import { AccountNote } from '@/flavours/glitch/features/account/components/account_note'; import FollowRequestNoteContainer from '@/flavours/glitch/features/account/containers/follow_request_note_container'; import { useLayout } from '@/flavours/glitch/hooks/useLayout'; import { useVisibility } from '@/flavours/glitch/hooks/useVisibility'; @@ -20,9 +19,6 @@ import type { Account } from '@/flavours/glitch/models/account'; import { getAccountHidden } from '@/flavours/glitch/selectors/accounts'; import { useAppSelector, useAppDispatch } from '@/flavours/glitch/store'; -import { ActionBar } from '../../account/components/action_bar'; -import { isRedesignEnabled } from '../common'; - import { AccountName } from './account_name'; import { AccountSubscriptionForm } from './account_subscription_form'; import { AccountBadges } from './badges'; @@ -33,6 +29,7 @@ import { AccountInfo } from './info'; import { MemorialNote } from './memorial_note'; import { MovedNote } from './moved_note'; import { AccountNote as AccountNoteRedesign } from './note'; +import { AccountNumberFields } from './number_fields'; import redesignClasses from './redesign.module.scss'; import { AccountTabs } from './tabs'; @@ -52,8 +49,6 @@ export const AccountHeader: React.FC<{ accountId: string; hideTabs?: boolean; }> = ({ accountId, hideTabs }) => { - const isRedesign = isRedesignEnabled(); - const dispatch = useAppDispatch(); const account = useAppSelector((state) => state.accounts.get(accountId)); const relationship = useAppSelector((state) => @@ -120,7 +115,7 @@ export const AccountHeader: React.FC<{
{me !== account.id && relationship && ( @@ -139,13 +134,13 @@ export const AccountHeader: React.FC<{
- - {!isRedesign && ( - - )}
- {isRedesign && ( - - )} +
@@ -192,58 +178,45 @@ export const AccountHeader: React.FC<{ )} - {!isRedesign && ( - - )} - {!suspendedOrHidden && (
- {me && - account.id !== me && - (isRedesign ? ( - - ) : ( - - ))} + {me && account.id !== me && ( + + )} +
{!me && account.email_subscriptions && ( )} + +
)} - {isRedesign && ( - - )} +
- - - {!hideTabs && !hidden && } + {!hideTabs && !hidden && }
diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/account_name.tsx b/app/javascript/flavours/glitch/features/account_timeline/components/account_name.tsx index 9046956e50..a8f6ea592c 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/account_name.tsx +++ b/app/javascript/flavours/glitch/features/account_timeline/components/account_name.tsx @@ -14,10 +14,6 @@ import { useAppSelector } from '@/flavours/glitch/store'; import AtIcon from '@/material-icons/400-24px/alternate_email.svg?react'; import HelpIcon from '@/material-icons/400-24px/help.svg?react'; import DomainIcon from '@/material-icons/400-24px/language.svg?react'; -import LockIcon from '@/material-icons/400-24px/lock.svg?react'; - -import { DomainPill } from '../../account/components/domain_pill'; -import { isRedesignEnabled } from '../common'; import classes from './redesign.module.scss'; @@ -34,7 +30,6 @@ const messages = defineMessages({ }); export const AccountName: FC<{ accountId: string }> = ({ accountId }) => { - const intl = useIntl(); const account = useAccount(accountId); const me = useAppSelector((state) => state.meta.get('me') as string); const localDomain = useAppSelector( @@ -47,32 +42,6 @@ export const AccountName: FC<{ accountId: string }> = ({ accountId }) => { const [username = '', domain = localDomain] = account.acct.split('@'); - if (!isRedesignEnabled()) { - return ( -

- - - - @{username} - @{domain} - - - {account.locked && ( - - )} - -

- ); - } - return (

diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/badges.tsx b/app/javascript/flavours/glitch/features/account_timeline/components/badges.tsx index c66a2f5c79..851719c5c2 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/badges.tsx +++ b/app/javascript/flavours/glitch/features/account_timeline/components/badges.tsx @@ -20,8 +20,6 @@ import type { AccountRole } from '@/flavours/glitch/models/account'; import { useAppDispatch, useAppSelector } from '@/flavours/glitch/store'; import IconPinned from '@/images/icons/icon_pinned.svg?react'; -import { isRedesignEnabled } from '../common'; - import classes from './redesign.module.scss'; export const AccountBadges: FC<{ accountId: string }> = ({ accountId }) => { @@ -46,9 +44,6 @@ export const AccountBadges: FC<{ accountId: string }> = ({ accountId }) => { return null; } - const isRedesign = isRedesignEnabled(); - const className = isRedesign ? classes.badge : ''; - const domain = account.acct.includes('@') ? account.acct.split('@')[1] : localDomain; @@ -58,7 +53,7 @@ export const AccountBadges: FC<{ accountId: string }> = ({ accountId }) => { , @@ -68,8 +63,8 @@ export const AccountBadges: FC<{ accountId: string }> = ({ accountId }) => { , ); @@ -77,17 +72,17 @@ export const AccountBadges: FC<{ accountId: string }> = ({ accountId }) => { }); if (account.bot) { - badges.push(); + badges.push(); } if (account.group) { - badges.push(); + badges.push(); } - if (isRedesign && relationship) { + if (relationship) { if (relationship.blocking) { badges.push( , ); } @@ -95,7 +90,7 @@ export const AccountBadges: FC<{ accountId: string }> = ({ accountId }) => { badges.push( = ({ accountId }) => { badges.push( , ); @@ -136,5 +131,5 @@ export const PinnedBadge: FC = () => ( function isAdminBadge(role: AccountRole) { const name = role.name.toLowerCase(); - return isRedesignEnabled() && (name === 'admin' || name === 'owner'); + return name === 'admin' || name === 'owner'; } diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/buttons.tsx b/app/javascript/flavours/glitch/features/account_timeline/components/buttons.tsx index 0f42780625..50d96536b5 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/buttons.tsx +++ b/app/javascript/flavours/glitch/features/account_timeline/components/buttons.tsx @@ -16,8 +16,6 @@ import NotificationsIcon from '@/material-icons/400-24px/notifications.svg?react import NotificationsActiveIcon from '@/material-icons/400-24px/notifications_active-fill.svg?react'; import ShareIcon from '@/material-icons/400-24px/share.svg?react'; -import { isRedesignEnabled } from '../common'; - import { AccountMenu } from './menu'; const messages = defineMessages({ @@ -97,7 +95,6 @@ const AccountButtonsOther: FC< accountId={accountId} className='account__header__follow-button' labelLength='long' - withUnmute={!isRedesignEnabled()} /> )} {isFollowing && ( diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/fields.tsx b/app/javascript/flavours/glitch/features/account_timeline/components/fields.tsx index 88114bff3a..911d8145ff 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/fields.tsx +++ b/app/javascript/flavours/glitch/features/account_timeline/components/fields.tsx @@ -1,68 +1,30 @@ import { useCallback, useMemo, useRef, useState } from 'react'; import type { FC } from 'react'; -import { defineMessage, FormattedMessage, useIntl } from 'react-intl'; +import { defineMessage, useIntl } from 'react-intl'; import classNames from 'classnames'; import { openModal } from '@/flavours/glitch/actions/modal'; -import { AccountFields } from '@/flavours/glitch/components/account_fields'; import { CustomEmojiProvider } from '@/flavours/glitch/components/emoji/context'; import type { EmojiHTMLProps } from '@/flavours/glitch/components/emoji/html'; import { EmojiHTML } from '@/flavours/glitch/components/emoji/html'; -import { FormattedDateWrapper } from '@/flavours/glitch/components/formatted_date'; import { Icon } from '@/flavours/glitch/components/icon'; import { IconButton } from '@/flavours/glitch/components/icon_button'; import { MiniCard } from '@/flavours/glitch/components/mini_card'; import { useElementHandledLink } from '@/flavours/glitch/components/status/handled_link'; import { useAccount } from '@/flavours/glitch/hooks/useAccount'; import { useResizeObserver } from '@/flavours/glitch/hooks/useObserver'; -import type { Account } from '@/flavours/glitch/models/account'; import { useAppDispatch } from '@/flavours/glitch/store'; import IconVerified from '@/images/icons/icon_verified.svg?react'; import MoreIcon from '@/material-icons/400-24px/more_horiz.svg?react'; import { cleanExtraEmojis } from '../../emoji/normalize'; import type { AccountField } from '../common'; -import { isRedesignEnabled } from '../common'; import { useFieldHtml } from '../hooks/useFieldHtml'; import classes from './redesign.module.scss'; -export const AccountHeaderFields: FC<{ accountId: string }> = ({ - accountId, -}) => { - const account = useAccount(accountId); - - if (!account) { - return null; - } - - if (isRedesignEnabled()) { - return ; - } - - return ( -
-
-
- -
-
- -
-
- - -
- ); -}; - const verifyMessage = defineMessage({ id: 'account.link_verified_on', defaultMessage: 'Ownership of this link was checked on {date}', @@ -75,13 +37,22 @@ const dateFormatOptions: Intl.DateTimeFormatOptions = { minute: '2-digit', }; -const RedesignAccountHeaderFields: FC<{ account: Account }> = ({ account }) => { +export const AccountHeaderFields: FC<{ accountId: string }> = ({ + accountId, +}) => { + const account = useAccount(accountId); + const emojis = useMemo( - () => cleanExtraEmojis(account.emojis), - [account.emojis], + () => cleanExtraEmojis(account?.emojis), + [account?.emojis], ); + const accountFields = account?.fields; const fields: AccountField[] = useMemo(() => { - const fields = account.fields.toJS(); + const fields = accountFields?.toJS(); + if (!fields) { + return []; + } + if (!emojis) { return fields.map((field) => ({ ...field, @@ -102,10 +73,10 @@ const RedesignAccountHeaderFields: FC<{ account: Account }> = ({ account }) => { field.value_plain?.includes(`:${code}:`), ), })); - }, [account.fields, emojis]); + }, [accountFields, emojis]); const htmlHandlers = useElementHandledLink({ - hashtagAccountId: account.id, + hashtagAccountId: account?.id, }); const { wrapperRef } = useColumnWrap(); diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/info.tsx b/app/javascript/flavours/glitch/features/account_timeline/components/info.tsx index 81c789a5f2..0b3a54213a 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/info.tsx +++ b/app/javascript/flavours/glitch/features/account_timeline/components/info.tsx @@ -4,13 +4,9 @@ import { FormattedMessage } from 'react-intl'; import type { Relationship } from '@/flavours/glitch/models/relationship'; -import { isRedesignEnabled } from '../common'; - export const AccountInfo: FC<{ relationship?: Relationship }> = ({ relationship, }) => { - const isRedesign = isRedesignEnabled(); - if (!relationship) { return null; } @@ -21,17 +17,17 @@ export const AccountInfo: FC<{ relationship?: Relationship }> = ({ )} - {!isRedesign && relationship.blocking && ( + {relationship.blocking && ( )} - {!isRedesign && relationship.muting && ( + {relationship.muting && ( )} - {!isRedesign && relationship.domain_blocking && ( + {relationship.domain_blocking && ( = ({ accountId }) => { @@ -66,19 +64,9 @@ export const AccountMenu: FC<{ accountId: string }> = ({ accountId }) => { return []; } - if (isRedesignEnabled()) { - return redesignMenuItems({ - account, - signedIn: !isMe && signedIn, - permissions, - intl, - relationship, - dispatch, - }); - } - return currentMenuItems({ + return redesignMenuItems({ account, - signedIn, + signedIn: !isMe && signedIn, permissions, intl, relationship, @@ -181,270 +169,6 @@ const messages = defineMessages({ }, }); -function currentMenuItems({ - account, - signedIn, - permissions, - intl, - relationship, - dispatch, -}: MenuItemsParams): MenuItem[] { - const items: MenuItem[] = []; - const isRemote = account.acct !== account.username; - - if (signedIn && !account.suspended) { - items.push( - { - text: intl.formatMessage(messages.mention, { - name: account.username, - }), - action: () => { - dispatch(mentionCompose(account)); - }, - }, - { - text: intl.formatMessage(messages.direct, { - name: account.username, - }), - action: () => { - dispatch(directCompose(account)); - }, - }, - null, - ); - } - - if (isRemote) { - items.push({ - text: intl.formatMessage(messages.openOriginalPage), - href: account.url, - }); - - if (signedIn) { - items.push(null); - } - } - - if (!signedIn) { - return items; - } - - if (relationship?.following) { - // Timeline options - if (!relationship.muting) { - if (relationship.showing_reblogs) { - items.push({ - text: intl.formatMessage(messages.hideReblogs, { - name: account.username, - }), - action: () => { - dispatch(followAccount(account.id, { reblogs: false })); - }, - }); - } else { - items.push({ - text: intl.formatMessage(messages.showReblogs, { - name: account.username, - }), - action: () => { - dispatch(followAccount(account.id, { reblogs: true })); - }, - }); - } - - items.push( - { - text: intl.formatMessage(messages.languages), - action: () => { - dispatch( - openModal({ - modalType: 'SUBSCRIBED_LANGUAGES', - modalProps: { - accountId: account.id, - }, - }), - ); - }, - }, - null, - ); - } - - items.push( - { - text: intl.formatMessage( - relationship.endorsed ? messages.unendorse : messages.endorse, - ), - action: () => { - if (relationship.endorsed) { - dispatch(unpinAccount(account.id)); - } else { - dispatch(pinAccount(account.id)); - } - }, - }, - { - text: intl.formatMessage(messages.add_or_remove_from_list), - action: () => { - dispatch( - openModal({ - modalType: 'LIST_ADDER', - modalProps: { - accountId: account.id, - }, - }), - ); - }, - }, - null, - ); - } - - if (relationship?.followed_by) { - const handleRemoveFromFollowers = () => { - dispatch( - openModal({ - modalType: 'CONFIRM', - modalProps: { - title: intl.formatMessage(messages.confirmRemoveFromFollowersTitle), - message: intl.formatMessage( - messages.confirmRemoveFromFollowersMessage, - { name: {account.acct} }, - ), - confirm: intl.formatMessage( - messages.confirmRemoveFromFollowersButton, - ), - onConfirm: () => { - void dispatch( - removeAccountFromFollowers({ accountId: account.id }), - ); - }, - }, - }), - ); - }; - - items.push({ - text: intl.formatMessage(messages.removeFromFollowers, { - name: account.username, - }), - action: handleRemoveFromFollowers, - dangerous: true, - }); - } - - if (relationship?.muting) { - items.push({ - text: intl.formatMessage(messages.unmute, { - name: account.username, - }), - action: () => { - dispatch(unmuteAccount(account.id)); - }, - }); - } else { - items.push({ - text: intl.formatMessage(messages.mute, { - name: account.username, - }), - action: () => { - dispatch(initMuteModal(account)); - }, - dangerous: true, - }); - } - - if (relationship?.blocking) { - items.push({ - text: intl.formatMessage(messages.unblock, { - name: account.username, - }), - action: () => { - dispatch(unblockAccount(account.id)); - }, - }); - } else { - items.push({ - text: intl.formatMessage(messages.block, { - name: account.username, - }), - action: () => { - dispatch(blockAccount(account.id)); - }, - dangerous: true, - }); - } - - if (!account.suspended) { - items.push({ - text: intl.formatMessage(messages.report, { - name: account.username, - }), - action: () => { - dispatch(initReport(account)); - }, - dangerous: true, - }); - } - - const remoteDomain = isRemote ? account.acct.split('@')[1] : null; - if (remoteDomain) { - items.push(null); - - if (relationship?.domain_blocking) { - items.push({ - text: intl.formatMessage(messages.unblockDomain, { - domain: remoteDomain, - }), - action: () => { - dispatch(unblockDomain(remoteDomain)); - }, - }); - } else { - items.push({ - text: intl.formatMessage(messages.blockDomain, { - domain: remoteDomain, - }), - action: () => { - dispatch(initDomainBlockModal(account)); - }, - dangerous: true, - }); - } - } - - if ( - (permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS || - (isRemote && - (permissions & PERMISSION_MANAGE_FEDERATION) === - PERMISSION_MANAGE_FEDERATION) - ) { - items.push(null); - if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) { - items.push({ - text: intl.formatMessage(messages.admin_account, { - name: account.username, - }), - href: `/admin/accounts/${account.id}`, - }); - } - if ( - isRemote && - (permissions & PERMISSION_MANAGE_FEDERATION) === - PERMISSION_MANAGE_FEDERATION - ) { - items.push({ - text: intl.formatMessage(messages.admin_domain, { - domain: remoteDomain, - }), - href: `/admin/instances/${remoteDomain}`, - }); - } - } - - return items; -} - const redesignMessages = defineMessages({ share: { id: 'account.menu.share', defaultMessage: 'Share…' }, copy: { id: 'account.menu.copy', defaultMessage: 'Copy link' }, diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/number_fields.tsx b/app/javascript/flavours/glitch/features/account_timeline/components/number_fields.tsx index b90d14afca..a8de28f1ce 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/number_fields.tsx +++ b/app/javascript/flavours/glitch/features/account_timeline/components/number_fields.tsx @@ -3,13 +3,6 @@ import type { FC } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import { NavLink } from 'react-router-dom'; - -import { - FollowersCounter, - FollowingCounter, - StatusesCounter, -} from '@/flavours/glitch/components/counters'; import { FormattedDateWrapper } from '@/flavours/glitch/components/formatted_date'; import { NumberFields, @@ -18,54 +11,9 @@ import { import { ShortNumber } from '@/flavours/glitch/components/short_number'; import { useAccount } from '@/flavours/glitch/hooks/useAccount'; -import { isRedesignEnabled } from '../common'; - -const LegacyNumberFields: FC<{ accountId: string }> = ({ accountId }) => { - const intl = useIntl(); - const account = useAccount(accountId); - - if (!account) { - return null; - } - - return ( -
- - - - - - - - - - - -
- ); -}; - -const RedesignNumberFields: FC<{ accountId: string }> = ({ accountId }) => { +export const AccountNumberFields: FC<{ accountId: string }> = ({ + accountId, +}) => { const intl = useIntl(); const account = useAccount(accountId); const createdThisYear = useMemo( @@ -125,7 +73,3 @@ const RedesignNumberFields: FC<{ accountId: string }> = ({ accountId }) => { ); }; - -export const AccountNumberFields = isRedesignEnabled() - ? RedesignNumberFields - : LegacyNumberFields; diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/tabs.tsx b/app/javascript/flavours/glitch/features/account_timeline/components/tabs.tsx index 9181961020..e03cd1161d 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/tabs.tsx +++ b/app/javascript/flavours/glitch/features/account_timeline/components/tabs.tsx @@ -8,40 +8,13 @@ import { NavLink } from 'react-router-dom'; import { useAccount } from '@/flavours/glitch/hooks/useAccount'; import { useAccountId } from '@/flavours/glitch/hooks/useAccountId'; -import { isRedesignEnabled } from '../common'; - import classes from './redesign.module.scss'; -export const AccountTabs: FC<{ acct: string }> = ({ acct }) => { - if (isRedesignEnabled()) { - return ; - } - return ( -
- - - - - - - - - - - - -
- ); -}; - const isActive: Required['isActive'] = (match, location) => match?.url === location.pathname || (!!match?.url && location.pathname.startsWith(`${match.url}/tagged/`)); -const RedesignTabs: FC = () => { +export const AccountTabs: FC = () => { const accountId = useAccountId(); const account = useAccount(accountId); diff --git a/app/javascript/flavours/glitch/features/account_timeline/v2/filters.tsx b/app/javascript/flavours/glitch/features/account_timeline/v2/filters.tsx index 375c91eb5c..0982c6598f 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/v2/filters.tsx +++ b/app/javascript/flavours/glitch/features/account_timeline/v2/filters.tsx @@ -23,7 +23,7 @@ export const AccountFilters: FC = () => { } return ( <> - +
diff --git a/app/javascript/flavours/glitch/features/account_timeline/v2/pinned_statuses.tsx b/app/javascript/flavours/glitch/features/account_timeline/v2/pinned_statuses.tsx index c3cfa3c018..05505417fb 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/v2/pinned_statuses.tsx +++ b/app/javascript/flavours/glitch/features/account_timeline/v2/pinned_statuses.tsx @@ -18,7 +18,6 @@ import { selectTimelineByKey } from '@/flavours/glitch/selectors/timelines'; import { useAppDispatch, useAppSelector } from '@/flavours/glitch/store'; import IconPinned from '@/images/icons/icon_pinned.svg?react'; -import { isRedesignEnabled } from '../common'; import { PinnedBadge } from '../components/badges'; import { useAccountContext } from './context'; @@ -88,10 +87,6 @@ export const renderPinnedStatusHeader: StatusHeaderRenderFn = ({ export const PinnedShowAllButton: FC = () => { const { onShowAllPinned } = useAccountContext(); - if (!isRedesignEnabled()) { - return null; - } - return (