Redesign composer thunks (#39945)
This commit is contained in:
12 files changed
+123
-42
No files matched your search
@@ -93,10 +93,8 @@ export const ColumnsArea = forwardRef<
|
||||
}
|
||||
>(({ children, minimalShell, singleColumn }, ref) => {
|
||||
const renderComposePanel = !useBreakpoint('full');
|
||||
const columns = useAppSelector((state) =>
|
||||
(state.settings as Record<{ columns: List<Record<Column>> }>).get(
|
||||
'columns',
|
||||
),
|
||||
const columns = useAppSelector(
|
||||
(state) => state.settings.get('columns') as List<Record<Column>>,
|
||||
);
|
||||
const isModalOpen = useAppSelector(
|
||||
(state) => !state.modal.get('stack').isEmpty(),
|
||||
|
||||
+1
-2
@@ -3,6 +3,7 @@ import { forwardRef, useCallback, useState } from 'react';
|
||||
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
||||
|
||||
import { submitCompose } from '@/mastodon/actions/compose';
|
||||
import { PRIVATE_QUOTE_MODAL_ID } from '@/mastodon/actions/compose_typed';
|
||||
import { changeSetting } from '@/mastodon/actions/settings';
|
||||
import { CheckBox } from '@/mastodon/components/check_box';
|
||||
import { useAppDispatch } from '@/mastodon/store';
|
||||
@@ -11,8 +12,6 @@ import { ConfirmationModal } from './confirmation_modal';
|
||||
import type { BaseConfirmationModalProps } from './confirmation_modal';
|
||||
import classes from './styles.module.css';
|
||||
|
||||
export const PRIVATE_QUOTE_MODAL_ID = 'quote/private_notify';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: {
|
||||
id: 'confirmations.private_quote_notify.title',
|
||||
|
||||
@@ -16,7 +16,7 @@ export const SkipLinks: React.FC<{
|
||||
}> = ({ multiColumn, onFocusGettingStartedColumn }) => {
|
||||
const intl = useIntl();
|
||||
const columnCount = useAppSelector((state) => {
|
||||
const settings = state.settings as Immutable.Collection<string, unknown>;
|
||||
const settings = state.settings;
|
||||
return (settings.get('columns') as Immutable.Map<number, unknown>).size;
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user