From e91da7d0c01c0948a5d3e35a5e2950d83d499e29 Mon Sep 17 00:00:00 2001 From: HoonBaek Date: Thu, 2 May 2024 14:26:03 +0900 Subject: [PATCH 1/2] Use classnames for className --- src/hooks/useModal/index.tsx | 4 ++-- src/modules/App/DesktopLayout.tsx | 11 +++++----- .../components/FrozenNotification/index.tsx | 3 ++- .../MessageInputWrapperView.tsx | 2 +- .../SuggestedUserMentionItem.tsx | 3 ++- .../components/UnreadCount/index.tsx | 3 ++- .../GroupChannelListHeader/index.tsx | 3 ++- .../components/MessageSearchUI/index.tsx | 14 +++++------- src/modules/MessageSearch/index.tsx | 22 +++++++++---------- .../components/OpenChannelPreview.tsx | 7 ++---- .../components/OpenChannelPreview/index.tsx | 5 +++-- .../components/ParentMessageInfo/index.tsx | 11 +++++++--- .../ThreadList/ThreadListItemContent.tsx | 19 ++++++++-------- .../components/ThreadMessageInput/index.tsx | 3 ++- src/ui/Accordion/Accordion.tsx | 3 ++- src/ui/Avatar/AvatarDefault.tsx | 3 ++- src/ui/BottomSheet/index.tsx | 6 ++--- src/ui/Header/index.tsx | 6 ++--- src/ui/MentionLabel/index.tsx | 11 +++++----- src/ui/MentionUserLabel/index.tsx | 3 ++- .../MessageContent/MessageProfile/index.tsx | 4 ++-- src/ui/MessageInput/index.tsx | 4 ++-- src/ui/MessageStatus/index.tsx | 6 ++--- src/ui/MobileMenu/MobileBottomSheet.tsx | 18 +++++++-------- .../MobileMenu/ReactedMembersBottomSheet.tsx | 9 ++++---- src/ui/OGMessageItemBody/index.tsx | 7 ++++-- src/ui/ProgressBar/index.tsx | 3 ++- src/ui/VoiceMessageInput/index.tsx | 3 ++- src/ui/VoiceMessageItemBody/index.tsx | 3 ++- 29 files changed, 107 insertions(+), 92 deletions(-) diff --git a/src/hooks/useModal/index.tsx b/src/hooks/useModal/index.tsx index 3b2518fba..18f07c738 100644 --- a/src/hooks/useModal/index.tsx +++ b/src/hooks/useModal/index.tsx @@ -1,7 +1,7 @@ import React, { useState, useCallback, ReactElement, createContext, useMemo, useContext } from 'react'; import { match } from 'ts-pattern'; -import { noop } from '../../utils/utils'; +import { classnames, noop } from '../../utils/utils'; import Modal, { type ModalProps } from '../../ui/Modal'; export type OpenGlobalModalProps = { @@ -39,7 +39,7 @@ export const GlobalModalProvider = ({ children }: GlobalModalProviderProps) => { return ( { modalProps?.onClose?.(); closeModal(); diff --git a/src/modules/App/DesktopLayout.tsx b/src/modules/App/DesktopLayout.tsx index 3787cd889..0eed0ddba 100644 --- a/src/modules/App/DesktopLayout.tsx +++ b/src/modules/App/DesktopLayout.tsx @@ -12,6 +12,7 @@ import ChannelSettings from '../ChannelSettings'; import MessageSearchPannel from '../MessageSearch'; import Thread from '../Thread'; import { SendableMessageType } from '../../utils'; +import { classnames } from '../../utils/utils'; export const DesktopLayout: React.FC = (props: DesktopLayoutProps) => { const { @@ -113,11 +114,11 @@ export const DesktopLayout: React.FC = (props: DesktopLayout {enableLegacyChannelModules ? : }
{enableLegacyChannelModules ? : }
diff --git a/src/modules/GroupChannel/components/FrozenNotification/index.tsx b/src/modules/GroupChannel/components/FrozenNotification/index.tsx index 1ec5ce319..1c898fa08 100644 --- a/src/modules/GroupChannel/components/FrozenNotification/index.tsx +++ b/src/modules/GroupChannel/components/FrozenNotification/index.tsx @@ -3,6 +3,7 @@ import React, { useContext } from 'react'; import { LocalizationContext } from '../../../../lib/LocalizationContext'; import Label, { LabelTypography } from '../../../../ui/Label'; +import { classnames } from '../../../../utils/utils'; export interface FrozenNotificationProps { className?: string; @@ -13,7 +14,7 @@ export const FrozenNotification = ({ }: FrozenNotificationProps): React.ReactElement => { const { stringSet } = useContext(LocalizationContext); return ( -
+