diff --git a/rollup.module-exports.mjs b/rollup.module-exports.mjs index eda8392dc..555f276b6 100644 --- a/rollup.module-exports.mjs +++ b/rollup.module-exports.mjs @@ -82,7 +82,6 @@ export default { 'Channel/components/MessageInputWrapper': 'src/modules/Channel/components/MessageInputWrapper/index.tsx', 'Channel/components/MessageList': 'src/modules/Channel/components/MessageList/index.tsx', 'Channel/components/RemoveMessageModal': 'src/modules/Channel/components/RemoveMessageModal/index.tsx', - 'Channel/components/MessageFeedbackModal': 'src/modules/Channel/components/MessageFeedbackModal/index.tsx', 'Channel/components/TypingIndicator': 'src/modules/Channel/components/TypingIndicator.tsx', 'Channel/components/UnreadCount': 'src/modules/Channel/components/UnreadCount/index.tsx', 'Channel/components/SuggestedMentionList': 'src/modules/Channel/components/SuggestedMentionList/index.tsx', @@ -101,7 +100,6 @@ export default { 'GroupChannel/components/UnreadCount': 'src/modules/GroupChannel/components/UnreadCount/index.tsx', 'GroupChannel/components/SuggestedMentionList': 'src/modules/GroupChannel/components/SuggestedMentionList/index.tsx', 'GroupChannel/components/SuggestedReplies': 'src/modules/GroupChannel/components/SuggestedReplies/index.tsx', - // 'GroupChannel/components/MessageFeedbackModal': 'src/modules/GroupChannel/components/MessageFeedbackModal/index.tsx', // TODO: move to UI // OpenChannel OpenChannel: 'src/modules/OpenChannel/index.tsx', @@ -239,4 +237,6 @@ export default { 'ui/Word': 'src/ui/Word/index.tsx', 'ui/FeedbackIconButton': 'src/ui/FeedbackIconButton/index.tsx', 'ui/MobileFeedbackMenu': 'src/ui/MobileFeedbackMenu/index.tsx', + 'ui/MessageFeedbackModal': 'src/ui/MessageFeedbackModal/index.tsx', + 'ui/MessageFeedbackFailedModal': 'src/ui/MessageFeedbackFailedModal/index.tsx', }; diff --git a/src/ui/MessageContent/index.tsx b/src/ui/MessageContent/index.tsx index 97546c62f..2cc6a3648 100644 --- a/src/ui/MessageContent/index.tsx +++ b/src/ui/MessageContent/index.tsx @@ -42,9 +42,9 @@ import MessageHeader, { MessageHeaderProps } from './MessageHeader'; import Icon, { IconTypes } from '../Icon'; import FeedbackIconButton from '../FeedbackIconButton'; import MobileFeedbackMenu from '../MobileFeedbackMenu'; -import MessageFeedbackModal from '../../modules/Channel/components/MessageFeedbackModal'; +import MessageFeedbackModal from '../MessageFeedbackModal'; import { SbFeedbackStatus } from './types'; -import MessageFeedbackFailedModal from '../../modules/Channel/components/MessageFeedbackFailedModal'; +import MessageFeedbackFailedModal from '../MessageFeedbackFailedModal'; import { MobileBottomSheetProps } from '../MobileMenu/types'; export interface MessageContentProps { diff --git a/src/modules/Channel/components/MessageFeedbackFailedModal/index.tsx b/src/ui/MessageFeedbackFailedModal/index.tsx similarity index 82% rename from src/modules/Channel/components/MessageFeedbackFailedModal/index.tsx rename to src/ui/MessageFeedbackFailedModal/index.tsx index e2601848c..594d27f76 100644 --- a/src/modules/Channel/components/MessageFeedbackFailedModal/index.tsx +++ b/src/ui/MessageFeedbackFailedModal/index.tsx @@ -1,10 +1,10 @@ import React, { ReactElement, useContext, useRef } from 'react'; -import { LocalizationContext } from '../../../../lib/LocalizationContext'; -import Modal from '../../../../ui/Modal'; -import Button, { ButtonTypes } from '../../../../ui/Button'; -import Label, { LabelColors, LabelTypography } from '../../../../ui/Label'; +import { LocalizationContext } from '../../lib/LocalizationContext'; +import Modal from '../Modal'; +import Button, { ButtonTypes } from '../Button'; +import Label, { LabelColors, LabelTypography } from '../Label'; import '../MessageFeedbackModal/index.scss'; -import { useKeyDown } from '../../../../hooks/useKeyDown/useKeyDown'; +import { useKeyDown } from '../../hooks/useKeyDown/useKeyDown'; export interface MessageFeedbackFailedModalProps { text: string; diff --git a/src/modules/Channel/components/MessageFeedbackModal/index.scss b/src/ui/MessageFeedbackModal/index.scss similarity index 94% rename from src/modules/Channel/components/MessageFeedbackModal/index.scss rename to src/ui/MessageFeedbackModal/index.scss index 5cd946257..019f0b178 100644 --- a/src/modules/Channel/components/MessageFeedbackModal/index.scss +++ b/src/ui/MessageFeedbackModal/index.scss @@ -1,4 +1,4 @@ -@import '../../../../styles/variables'; +@import '../../styles/variables'; .sendbird-message-feedback-modal-content__mobile { @include mobile() { diff --git a/src/modules/Channel/components/MessageFeedbackModal/index.tsx b/src/ui/MessageFeedbackModal/index.tsx similarity index 88% rename from src/modules/Channel/components/MessageFeedbackModal/index.tsx rename to src/ui/MessageFeedbackModal/index.tsx index a6461552b..f70c22367 100644 --- a/src/modules/Channel/components/MessageFeedbackModal/index.tsx +++ b/src/ui/MessageFeedbackModal/index.tsx @@ -1,14 +1,14 @@ import React, { ReactElement, useContext, useRef } from 'react'; -import { LocalizationContext } from '../../../../lib/LocalizationContext'; -import Modal from '../../../../ui/Modal'; -import Button, { ButtonTypes } from '../../../../ui/Button'; -import Input from '../../../../ui/Input'; -import Label, { LabelColors, LabelTypography } from '../../../../ui/Label'; +import { LocalizationContext } from '../../lib/LocalizationContext'; +import Modal from '../Modal'; +import Button, { ButtonTypes } from '../Button'; +import Input from '../Input'; +import Label, { LabelColors, LabelTypography } from '../Label'; import './index.scss'; -import { useMediaQueryContext } from '../../../../lib/MediaQueryContext'; -import { CoreMessageType } from '../../../../utils'; +import { useMediaQueryContext } from '../../lib/MediaQueryContext'; +import { CoreMessageType } from '../../utils'; import { FeedbackRating } from '@sendbird/chat/message'; -import { useKeyDown } from '../../../../hooks/useKeyDown/useKeyDown'; +import { useKeyDown } from '../../hooks/useKeyDown/useKeyDown'; export interface MessageFeedbackModalProps { selectedFeedback: FeedbackRating | undefined;