diff --git a/web/modals/threads/settings/submit-section.css b/web/modals/threads/settings/submit-section.css deleted file mode 100644 --- a/web/modals/threads/settings/submit-section.css +++ /dev/null @@ -1,22 +0,0 @@ -.container { - height: 100%; - width: 100%; - display: flex; - flex-direction: column; -} - -.error { - text-align: center; - font-size: 16px; - color: var(--error); - font-style: italic; - - margin-top: auto; - padding: 5px; -} - -.button { - width: 100%; - align-self: flex-end; - min-height: 45px; -} diff --git a/web/modals/threads/settings/submit-section.react.js b/web/modals/threads/settings/submit-section.react.js deleted file mode 100644 --- a/web/modals/threads/settings/submit-section.react.js +++ /dev/null @@ -1,46 +0,0 @@ -// @flow - -import classnames from 'classnames'; -import * as React from 'react'; - -import css from './submit-section.css'; -import type { ButtonProps } from '../../../components/button.react.js'; -import Button from '../../../components/button.react.js'; - -type Props = { - ...ButtonProps, - +errorMessage?: ?string, - +containerClassName?: string, -}; - -function SubmitSection(props: Props): React.Node { - const { - children, - containerClassName = '', - errorMessage, - onClick, - variant, - disabled = false, - className = '', - } = props; - - const containerStyle = classnames(css.container, containerClassName); - const buttonStyle = classnames(css.button, className); - - return ( -
-
{errorMessage}
- -
- ); -} - -export default SubmitSection; diff --git a/web/modals/threads/settings/thread-settings-modal.css b/web/modals/threads/settings/thread-settings-modal.css --- a/web/modals/threads/settings/thread-settings-modal.css +++ b/web/modals/threads/settings/thread-settings-modal.css @@ -26,3 +26,10 @@ .relationshipPrimaryButtonPlaceholder { height: 44.5px; } + +.errorMessage { + color: var(--text-background-danger-default); + font-style: italic; + margin-top: 8px; + text-align: center; +} diff --git a/web/modals/threads/settings/thread-settings-modal.react.js b/web/modals/threads/settings/thread-settings-modal.react.js --- a/web/modals/threads/settings/thread-settings-modal.react.js +++ b/web/modals/threads/settings/thread-settings-modal.react.js @@ -57,7 +57,6 @@ state => threadInfoSelector(state)[props.threadID], ); const modalContext = useModalContext(); - // eslint-disable-next-line no-unused-vars const [errorMessage, setErrorMessage] = React.useState(''); const [currentTabType, setCurrentTabType] = React.useState('general'); @@ -284,6 +283,7 @@ >
{tabContent}
+
{errorMessage}
);