Profile editing: Use server flag (#38310)
This commit is contained in:
parent
8f9eba9629
commit
00bcb014df
@ -6,7 +6,7 @@ import classNames from 'classnames';
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import { useIdentity } from '@/mastodon/identity_context';
|
import { useIdentity } from '@/mastodon/identity_context';
|
||||||
import { isClientFeatureEnabled } from '@/mastodon/utils/environment';
|
import { isServerFeatureEnabled } from '@/mastodon/utils/environment';
|
||||||
import {
|
import {
|
||||||
fetchRelationships,
|
fetchRelationships,
|
||||||
followAccount,
|
followAccount,
|
||||||
@ -171,7 +171,7 @@ export const FollowButton: React.FC<{
|
|||||||
'button--compact': compact,
|
'button--compact': compact,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isClientFeatureEnabled('profile_editing')) {
|
if (isServerFeatureEnabled('profile_redesign')) {
|
||||||
return (
|
return (
|
||||||
<Link to='/profile/edit' className={buttonClasses}>
|
<Link to='/profile/edit' className={buttonClasses}>
|
||||||
{label}
|
{label}
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import { identityContextPropShape, withIdentity } from 'mastodon/identity_contex
|
|||||||
import { layoutFromWindow } from 'mastodon/is_mobile';
|
import { layoutFromWindow } from 'mastodon/is_mobile';
|
||||||
import { WithRouterPropTypes } from 'mastodon/utils/react_router';
|
import { WithRouterPropTypes } from 'mastodon/utils/react_router';
|
||||||
import { checkAnnualReport } from '@/mastodon/reducers/slices/annual_report';
|
import { checkAnnualReport } from '@/mastodon/reducers/slices/annual_report';
|
||||||
import { isClientFeatureEnabled } from '@/mastodon/utils/environment';
|
import { isServerFeatureEnabled } from '@/mastodon/utils/environment';
|
||||||
|
|
||||||
import { uploadCompose, resetCompose, changeComposeSpoilerness } from '../../actions/compose';
|
import { uploadCompose, resetCompose, changeComposeSpoilerness } from '../../actions/compose';
|
||||||
import { clearHeight } from '../../actions/height_cache';
|
import { clearHeight } from '../../actions/height_cache';
|
||||||
@ -182,7 +182,7 @@ class SwitchingColumnsArea extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const profileRedesignRoutes = [];
|
const profileRedesignRoutes = [];
|
||||||
if (isClientFeatureEnabled('profile_editing')) {
|
if (isServerFeatureEnabled('profile_redesign')) {
|
||||||
profileRedesignRoutes.push(
|
profileRedesignRoutes.push(
|
||||||
<WrappedRoute key="edit" path='/profile/edit' component={AccountEdit} content={children} />,
|
<WrappedRoute key="edit" path='/profile/edit' component={AccountEdit} content={children} />,
|
||||||
<WrappedRoute key="featured_tags" path='/profile/featured_tags' component={AccountEditFeaturedTags} content={children} />
|
<WrappedRoute key="featured_tags" path='/profile/featured_tags' component={AccountEditFeaturedTags} content={children} />
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export function isServerFeatureEnabled(feature: ServerFeatures) {
|
|||||||
return initialState?.features.includes(feature) ?? false;
|
return initialState?.features.includes(feature) ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
type ClientFeatures = 'collections' | 'profile_editing';
|
type ClientFeatures = 'collections';
|
||||||
|
|
||||||
export function isClientFeatureEnabled(feature: ClientFeatures) {
|
export function isClientFeatureEnabled(feature: ClientFeatures) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user