refactor progress
This commit is contained in:
@@ -17,15 +17,14 @@
|
||||
* along with Fluxer. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import styles from '@app/components/modals/ChannelTopicModal.module.css';
|
||||
import * as Modal from '@app/components/modals/Modal';
|
||||
import {SafeMarkdown} from '@app/lib/markdown';
|
||||
import {MarkdownContext} from '@app/lib/markdown/renderers/RendererTypes';
|
||||
import markupStyles from '@app/styles/Markup.module.css';
|
||||
import {type ChannelTopicModalProps, getChannelTopicInfo} from '@app/utils/modals/ChannelTopicModalUtils';
|
||||
import {clsx} from 'clsx';
|
||||
import {observer} from 'mobx-react-lite';
|
||||
import confirmStyles from '~/components/modals/ConfirmModal.module.css';
|
||||
import * as Modal from '~/components/modals/Modal';
|
||||
import {SafeMarkdown} from '~/lib/markdown';
|
||||
import {MarkdownContext} from '~/lib/markdown/renderers';
|
||||
import markupStyles from '~/styles/Markup.module.css';
|
||||
import {type ChannelTopicModalProps, getChannelTopicInfo} from '~/utils/modals/ChannelTopicModalUtils';
|
||||
import styles from './ChannelTopicModal.module.css';
|
||||
|
||||
export const ChannelTopicModal = observer(({channelId}: ChannelTopicModalProps) => {
|
||||
const topicInfo = getChannelTopicInfo(channelId);
|
||||
@@ -39,16 +38,18 @@ export const ChannelTopicModal = observer(({channelId}: ChannelTopicModalProps)
|
||||
return (
|
||||
<Modal.Root size="small" centered>
|
||||
<Modal.Header title={title} />
|
||||
<Modal.Content className={clsx(confirmStyles.content, styles.selectable)}>
|
||||
<div className={clsx(markupStyles.markup, styles.topic)}>
|
||||
<SafeMarkdown
|
||||
content={topic}
|
||||
options={{
|
||||
context: MarkdownContext.STANDARD_WITHOUT_JUMBO,
|
||||
channelId,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<Modal.Content className={styles.selectable}>
|
||||
<Modal.ContentLayout>
|
||||
<div className={clsx(markupStyles.markup, styles.topic)}>
|
||||
<SafeMarkdown
|
||||
content={topic}
|
||||
options={{
|
||||
context: MarkdownContext.STANDARD_WITHOUT_JUMBO,
|
||||
channelId,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Modal.ContentLayout>
|
||||
</Modal.Content>
|
||||
</Modal.Root>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user