diff --git a/src/views/friends/FriendsContext.tsx b/src/views/friends/FriendsContext.tsx new file mode 100644 index 00000000..bac0fc85 --- /dev/null +++ b/src/views/friends/FriendsContext.tsx @@ -0,0 +1,32 @@ +import { createContext, FC, ProviderProps, useContext } from 'react'; +import { MessengerFriend } from './common/MessengerFriend'; +import { MessengerRequest } from './common/MessengerRequest'; +import { MessengerSettings } from './common/MessengerSettings'; + +interface IFriendsContext +{ + friends: MessengerFriend[]; + requests: MessengerRequest[]; + settings: MessengerSettings; + canRequestFriend: (userId: number) => boolean; + requestFriend: (userId: number, userName: string) => void; + acceptFriend: (userId: number) => void; + declineFriend: (userId: number, declineAll?: boolean) => void; +} + +const FriendsContext = createContext({ + friends: null, + requests: null, + settings: null, + canRequestFriend: null, + requestFriend: null, + acceptFriend: null, + declineFriend: null +}); + +export const FriendsContextProvider: FC> = props => +{ + return { props.children } +} + +export const useFriendsContext = () => useContext(FriendsContext); diff --git a/src/views/friends/FriendsView.tsx b/src/views/friends/FriendsView.tsx index 429f201b..a468628d 100644 --- a/src/views/friends/FriendsView.tsx +++ b/src/views/friends/FriendsView.tsx @@ -12,7 +12,7 @@ import { FriendsHelper } from './common/FriendsHelper'; import { MessengerFriend } from './common/MessengerFriend'; import { MessengerRequest } from './common/MessengerRequest'; import { MessengerSettings } from './common/MessengerSettings'; -import { FriendsContextProvider } from './context/FriendsContext'; +import { FriendsContextProvider } from './FriendsContext'; import { FriendBarView } from './views/friend-bar/FriendBarView'; import { FriendsListView } from './views/friends-list/FriendsListView'; import { FriendsMessengerView } from './views/messenger/FriendsMessengerView'; diff --git a/src/views/friends/FriendsView.types.ts b/src/views/friends/FriendsView.types.ts deleted file mode 100644 index 14fa8b5c..00000000 --- a/src/views/friends/FriendsView.types.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class FriendListTabs -{ - public static readonly FRIENDS: string = 'friendlist.friends'; - public static readonly REQUESTS: string = 'friendlist.requests'; - public static readonly SEARCH: string = 'generic.search'; -} diff --git a/src/views/friends/context/FriendsContext.tsx b/src/views/friends/context/FriendsContext.tsx deleted file mode 100644 index a86f130d..00000000 --- a/src/views/friends/context/FriendsContext.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { createContext, FC, useContext } from 'react'; -import { FriendsContextProps, IFriendsContext } from './FriendsContext.type'; - -const FriendsContext = createContext({ - friends: null, - requests: null, - settings: null, - canRequestFriend: null, - requestFriend: null, - acceptFriend: null, - declineFriend: null -}); - -export const FriendsContextProvider: FC = props => -{ - return { props.children } -} - -export const useFriendsContext = () => useContext(FriendsContext); diff --git a/src/views/friends/context/FriendsContext.type.ts b/src/views/friends/context/FriendsContext.type.ts deleted file mode 100644 index 772372d3..00000000 --- a/src/views/friends/context/FriendsContext.type.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ProviderProps } from 'react'; -import { MessengerFriend } from '../common/MessengerFriend'; -import { MessengerRequest } from '../common/MessengerRequest'; -import { MessengerSettings } from '../common/MessengerSettings'; - -export interface IFriendsContext -{ - friends: MessengerFriend[]; - requests: MessengerRequest[]; - settings: MessengerSettings; - canRequestFriend: (userId: number) => boolean; - requestFriend: (userId: number, userName: string) => void; - acceptFriend: (userId: number) => void; - declineFriend: (userId: number, declineAll?: boolean) => void; -} - -export interface FriendsContextProps extends ProviderProps -{ - -} diff --git a/src/views/friends/views/friend-bar-item/FriendBarItemView.scss b/src/views/friends/views/friend-bar-item/FriendBarItemView.scss deleted file mode 100644 index b4daa7c0..00000000 --- a/src/views/friends/views/friend-bar-item/FriendBarItemView.scss +++ /dev/null @@ -1,35 +0,0 @@ -.friend-bar-item { - width: 130px; - margin: 0 3px; - z-index: 0; - position: relative; - padding-left:38px; - text-align: left; - - &.friend-bar-item-active { - margin-bottom:21px; - } - - .friend-bar-item-head { - &.avatar { - top: -30px; - left: -30px; - } - &.group { - top: -5px; - left: -5px; - } - - pointer-events: none; - } - - &.friend-bar-search { - .friend-bar-item-head { - top: -3px; - left: 5px; - width: 31px; - height: 34px; - background-image: url('../../../../assets/images/toolbar/friend-search.png'); - } - } -} diff --git a/src/views/friends/views/friend-bar-item/FriendBarItemView.types.ts b/src/views/friends/views/friend-bar-item/FriendBarItemView.types.ts deleted file mode 100644 index 92b7292a..00000000 --- a/src/views/friends/views/friend-bar-item/FriendBarItemView.types.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { MessengerFriend } from '../../common/MessengerFriend'; - -export interface FriendBarItemViewProps -{ - friend: MessengerFriend; -} diff --git a/src/views/friends/views/friend-bar-item/FriendBarItemView.tsx b/src/views/friends/views/friend-bar/FriendBarItemView.tsx similarity index 95% rename from src/views/friends/views/friend-bar-item/FriendBarItemView.tsx rename to src/views/friends/views/friend-bar/FriendBarItemView.tsx index a8263268..c7043975 100644 --- a/src/views/friends/views/friend-bar-item/FriendBarItemView.tsx +++ b/src/views/friends/views/friend-bar/FriendBarItemView.tsx @@ -5,7 +5,12 @@ import { SendMessageHook } from '../../../../hooks/messages'; import { NitroLayoutBase } from '../../../../layout/base'; import { AvatarImageView } from '../../../shared/avatar-image/AvatarImageView'; import { BadgeImageView } from '../../../shared/badge-image/BadgeImageView'; -import { FriendBarItemViewProps } from './FriendBarItemView.types'; +import { MessengerFriend } from '../../common/MessengerFriend'; + +interface FriendBarItemViewProps +{ + friend: MessengerFriend; +} export const FriendBarItemView: FC = props => { diff --git a/src/views/friends/views/friend-bar/FriendBarView.scss b/src/views/friends/views/friend-bar/FriendBarView.scss index abcef229..82a983e4 100644 --- a/src/views/friends/views/friend-bar/FriendBarView.scss +++ b/src/views/friends/views/friend-bar/FriendBarView.scss @@ -1,7 +1,42 @@ .friend-bar { + .friend-bar-button { z-index: 2; } - @import '../friend-bar-item/FriendBarItemView.scss'; + .friend-bar-item { + width: 130px; + margin: 0 3px; + z-index: 0; + position: relative; + padding-left:38px; + text-align: left; + + &.friend-bar-item-active { + margin-bottom:21px; + } + + .friend-bar-item-head { + &.avatar { + top: -30px; + left: -30px; + } + &.group { + top: -5px; + left: -5px; + } + + pointer-events: none; + } + + &.friend-bar-search { + .friend-bar-item-head { + top: -3px; + left: 5px; + width: 31px; + height: 34px; + background-image: url('../../../../assets/images/toolbar/friend-search.png'); + } + } + } } diff --git a/src/views/friends/views/friend-bar/FriendBarView.tsx b/src/views/friends/views/friend-bar/FriendBarView.tsx index 544a96a8..365254ae 100644 --- a/src/views/friends/views/friend-bar/FriendBarView.tsx +++ b/src/views/friends/views/friend-bar/FriendBarView.tsx @@ -2,8 +2,13 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { FC, useMemo, useState } from 'react'; import { Button } from '../../../../common'; import { Flex } from '../../../../common/Flex'; -import { FriendBarItemView } from '../friend-bar-item/FriendBarItemView'; -import { FriendBarViewProps } from './FriendBarView.types'; +import { MessengerFriend } from '../../common/MessengerFriend'; +import { FriendBarItemView } from './FriendBarItemView'; + +interface FriendBarViewProps +{ + onlineFriends: MessengerFriend[]; +} export const FriendBarView: FC = props => { diff --git a/src/views/friends/views/friend-bar/FriendBarView.types.ts b/src/views/friends/views/friend-bar/FriendBarView.types.ts deleted file mode 100644 index 61a040ce..00000000 --- a/src/views/friends/views/friend-bar/FriendBarView.types.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { MessengerFriend } from './../../common/MessengerFriend'; -export interface FriendBarViewProps -{ - onlineFriends: MessengerFriend[]; -} diff --git a/src/views/friends/views/friends-group-item/FriendsGroupItemView.types.ts b/src/views/friends/views/friends-group-item/FriendsGroupItemView.types.ts deleted file mode 100644 index 392d57d7..00000000 --- a/src/views/friends/views/friends-group-item/FriendsGroupItemView.types.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { NitroLayoutFlexProps } from '../../../../layout'; -import { MessengerFriend } from '../../common/MessengerFriend'; - -export interface FriendsGroupItemViewProps extends NitroLayoutFlexProps -{ - friend: MessengerFriend; - selected?: boolean; - selectFriend: () => void; -} diff --git a/src/views/friends/views/friends-group-item/FriendsGroupItemView.tsx b/src/views/friends/views/friends-group/FriendsGroupItemView.tsx similarity index 94% rename from src/views/friends/views/friends-group-item/FriendsGroupItemView.tsx rename to src/views/friends/views/friends-group/FriendsGroupItemView.tsx index 888c0c57..492cf66a 100644 --- a/src/views/friends/views/friends-group-item/FriendsGroupItemView.tsx +++ b/src/views/friends/views/friends-group/FriendsGroupItemView.tsx @@ -3,10 +3,16 @@ import classNames from 'classnames'; import { FC, useCallback, useState } from 'react'; import { LocalizeText, OpenMessengerChat } from '../../../../api'; import { SendMessageHook } from '../../../../hooks'; -import { NitroLayoutFlex, UserProfileIconView } from '../../../../layout'; +import { NitroLayoutFlex, NitroLayoutFlexProps, UserProfileIconView } from '../../../../layout'; import { NitroLayoutBase } from '../../../../layout/base'; import { MessengerFriend } from '../../common/MessengerFriend'; -import { FriendsGroupItemViewProps } from './FriendsGroupItemView.types'; + +interface FriendsGroupItemViewProps extends NitroLayoutFlexProps +{ + friend: MessengerFriend; + selected?: boolean; + selectFriend: () => void; +} export const FriendsGroupItemView: FC = props => { diff --git a/src/views/friends/views/friends-group/FriendsGroupView.tsx b/src/views/friends/views/friends-group/FriendsGroupView.tsx index e1cad75e..0094490d 100644 --- a/src/views/friends/views/friends-group/FriendsGroupView.tsx +++ b/src/views/friends/views/friends-group/FriendsGroupView.tsx @@ -1,6 +1,13 @@ -import React, { FC } from 'react'; -import { FriendsGroupItemView } from '../friends-group-item/FriendsGroupItemView'; -import { FriendsGroupViewProps } from './FriendsGroupView.types'; +import { FC } from 'react'; +import { MessengerFriend } from '../../common/MessengerFriend'; +import { FriendsGroupItemView } from './FriendsGroupItemView'; + +interface FriendsGroupViewProps +{ + list: MessengerFriend[]; + selectedFriendsIds: number[]; + selectFriend: (userId: number) => void; +} export const FriendsGroupView: FC = props => { diff --git a/src/views/friends/views/friends-group/FriendsGroupView.types.ts b/src/views/friends/views/friends-group/FriendsGroupView.types.ts deleted file mode 100644 index 3400723c..00000000 --- a/src/views/friends/views/friends-group/FriendsGroupView.types.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { MessengerFriend } from '../../common/MessengerFriend'; - -export interface FriendsGroupViewProps -{ - list: MessengerFriend[]; - selectedFriendsIds: number[]; - selectFriend: (userId: number) => void; -} diff --git a/src/views/friends/views/friends-list/FriendsListView.tsx b/src/views/friends/views/friends-list/FriendsListView.tsx index 66f2cb2e..3af43b16 100644 --- a/src/views/friends/views/friends-list/FriendsListView.tsx +++ b/src/views/friends/views/friends-list/FriendsListView.tsx @@ -4,12 +4,20 @@ import { LocalizeText } from '../../../../api'; import { SendMessageHook } from '../../../../hooks'; import { NitroCardAccordionSetView, NitroCardAccordionView, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../../../layout'; import { MessengerFriend } from '../../common/MessengerFriend'; +import { MessengerRequest } from '../../common/MessengerRequest'; import { FriendsGroupView } from '../friends-group/FriendsGroupView'; import { FriendsRemoveConfirmationView } from '../friends-remove-confirmation/FriendsRemoveConfirmationView'; import { FriendsRequestView } from '../friends-request/FriendsRequestView'; import { FriendsRoomInviteView } from '../friends-room-invite/FriendsRoomInviteView'; import { FriendsSearchView } from '../friends-search/FriendsSearchView'; -import { FriendsListViewProps } from './FriendsListView.types'; + +interface FriendsListViewProps +{ + onCloseClick: () => void; + onlineFriends: MessengerFriend[]; + offlineFriends: MessengerFriend[]; + friendRequests: MessengerRequest[]; +} const MODE_FRIENDS: number = 0; const MODE_SEARCH: number = 1; diff --git a/src/views/friends/views/friends-list/FriendsListView.types.ts b/src/views/friends/views/friends-list/FriendsListView.types.ts deleted file mode 100644 index 01bfcc84..00000000 --- a/src/views/friends/views/friends-list/FriendsListView.types.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { MessengerFriend } from './../../common/MessengerFriend'; -import { MessengerRequest } from './../../common/MessengerRequest'; -export interface FriendsListViewProps -{ - onCloseClick: () => void; - onlineFriends: MessengerFriend[]; - offlineFriends: MessengerFriend[]; - friendRequests: MessengerRequest[]; -} diff --git a/src/views/friends/views/friends-remove-confirmation/FriendsRemoveConfirmationView.tsx b/src/views/friends/views/friends-remove-confirmation/FriendsRemoveConfirmationView.tsx index cc3327a8..4c6ee393 100644 --- a/src/views/friends/views/friends-remove-confirmation/FriendsRemoveConfirmationView.tsx +++ b/src/views/friends/views/friends-remove-confirmation/FriendsRemoveConfirmationView.tsx @@ -1,7 +1,14 @@ import { FC } from 'react'; import { LocalizeText } from '../../../../api'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; -import { FriendsRemoveConfirmationViewProps } from './FriendsRemoveConfirmationView.types'; + +interface FriendsRemoveConfirmationViewProps +{ + selectedFriendsIds: number[]; + removeFriendsText: string; + removeSelectedFriends: () => void; + onCloseClick: () => void; +} export const FriendsRemoveConfirmationView: FC = props => { diff --git a/src/views/friends/views/friends-remove-confirmation/FriendsRemoveConfirmationView.types.ts b/src/views/friends/views/friends-remove-confirmation/FriendsRemoveConfirmationView.types.ts deleted file mode 100644 index eeff1c9c..00000000 --- a/src/views/friends/views/friends-remove-confirmation/FriendsRemoveConfirmationView.types.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface FriendsRemoveConfirmationViewProps -{ - selectedFriendsIds: number[]; - removeFriendsText: string; - removeSelectedFriends: () => void; - onCloseClick: () => void; -} diff --git a/src/views/friends/views/friends-request-item/FriendsRequestItemView.types.ts b/src/views/friends/views/friends-request-item/FriendsRequestItemView.types.ts deleted file mode 100644 index 4f5c38d5..00000000 --- a/src/views/friends/views/friends-request-item/FriendsRequestItemView.types.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { MessengerRequest } from '../../common/MessengerRequest'; - -export interface FriendsRequestItemViewProps -{ - request: MessengerRequest; -} diff --git a/src/views/friends/views/friends-request-item/FriendsRequestItemView.tsx b/src/views/friends/views/friends-request/FriendsRequestItemView.tsx similarity index 84% rename from src/views/friends/views/friends-request-item/FriendsRequestItemView.tsx rename to src/views/friends/views/friends-request/FriendsRequestItemView.tsx index f5ae26d9..949a56aa 100644 --- a/src/views/friends/views/friends-request-item/FriendsRequestItemView.tsx +++ b/src/views/friends/views/friends-request/FriendsRequestItemView.tsx @@ -1,8 +1,13 @@ import { FC } from 'react'; import { NitroCardAccordionItemView, NitroLayoutFlex, UserProfileIconView } from '../../../../layout'; import { NitroLayoutBase } from '../../../../layout/base'; -import { useFriendsContext } from '../../context/FriendsContext'; -import { FriendsRequestItemViewProps } from './FriendsRequestItemView.types'; +import { MessengerRequest } from '../../common/MessengerRequest'; +import { useFriendsContext } from '../../FriendsContext'; + +interface FriendsRequestItemViewProps +{ + request: MessengerRequest; +} export const FriendsRequestItemView: FC = props => { diff --git a/src/views/friends/views/friends-request/FriendsRequestView.tsx b/src/views/friends/views/friends-request/FriendsRequestView.tsx index 262cb24d..bf030d85 100644 --- a/src/views/friends/views/friends-request/FriendsRequestView.tsx +++ b/src/views/friends/views/friends-request/FriendsRequestView.tsx @@ -1,9 +1,14 @@ import { FC } from 'react'; import { LocalizeText } from '../../../../api'; import { NitroCardAccordionSetView, NitroLayoutButton, NitroLayoutFlex } from '../../../../layout'; -import { useFriendsContext } from '../../context/FriendsContext'; -import { FriendsRequestItemView } from '../friends-request-item/FriendsRequestItemView'; -import { FriendsRequestViewProps } from './FriendsRequestView.types'; +import { MessengerRequest } from '../../common/MessengerRequest'; +import { useFriendsContext } from '../../FriendsContext'; +import { FriendsRequestItemView } from './FriendsRequestItemView'; + +interface FriendsRequestViewProps +{ + requests: MessengerRequest[]; +} export const FriendsRequestView: FC = props => { diff --git a/src/views/friends/views/friends-request/FriendsRequestView.types.ts b/src/views/friends/views/friends-request/FriendsRequestView.types.ts deleted file mode 100644 index adf39c13..00000000 --- a/src/views/friends/views/friends-request/FriendsRequestView.types.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { MessengerRequest } from '../../common/MessengerRequest'; - -export interface FriendsRequestViewProps -{ - requests: MessengerRequest[]; -} diff --git a/src/views/friends/views/friends-room-invite/FriendsRoomInviteView.tsx b/src/views/friends/views/friends-room-invite/FriendsRoomInviteView.tsx index 3c4c9d26..83aaf3c6 100644 --- a/src/views/friends/views/friends-room-invite/FriendsRoomInviteView.tsx +++ b/src/views/friends/views/friends-room-invite/FriendsRoomInviteView.tsx @@ -1,7 +1,13 @@ import { FC, useState } from 'react'; import { LocalizeText } from '../../../../api'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout'; -import { FriendsRoomInviteViewProps } from './FriendsRoomInviteView.types'; + +interface FriendsRoomInviteViewProps +{ + selectedFriendsIds: number[]; + onCloseClick: () => void; + sendRoomInvite: (message: string) => void; +} export const FriendsRoomInviteView: FC = props => { diff --git a/src/views/friends/views/friends-room-invite/FriendsRoomInviteView.types.ts b/src/views/friends/views/friends-room-invite/FriendsRoomInviteView.types.ts deleted file mode 100644 index 1fc54ff3..00000000 --- a/src/views/friends/views/friends-room-invite/FriendsRoomInviteView.types.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface FriendsRoomInviteViewProps -{ - selectedFriendsIds: number[]; - onCloseClick: () => void; - sendRoomInvite: (message: string) => void; -} diff --git a/src/views/friends/views/friends-search/FriendsSearchView.tsx b/src/views/friends/views/friends-search/FriendsSearchView.tsx index 891038ba..cf360579 100644 --- a/src/views/friends/views/friends-search/FriendsSearchView.tsx +++ b/src/views/friends/views/friends-search/FriendsSearchView.tsx @@ -4,7 +4,7 @@ import { LocalizeText, OpenMessengerChat } from '../../../../api'; import { BatchUpdates, CreateMessageHook, SendMessageHook } from '../../../../hooks'; import { NitroCardAccordionItemView, NitroCardAccordionSetView, NitroCardAccordionView, NitroLayoutFlex, UserProfileIconView } from '../../../../layout'; import { NitroLayoutBase } from '../../../../layout/base'; -import { useFriendsContext } from '../../context/FriendsContext'; +import { useFriendsContext } from '../../FriendsContext'; export const FriendsSearchView: FC<{}> = props => { diff --git a/src/views/friends/views/messenger-thread-group/FriendsMessengerThreadGroup.types.ts b/src/views/friends/views/messenger-thread-group/FriendsMessengerThreadGroup.types.ts deleted file mode 100644 index 12a0ed17..00000000 --- a/src/views/friends/views/messenger-thread-group/FriendsMessengerThreadGroup.types.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { MessengerThread } from '../../common/MessengerThread'; -import { MessengerThreadChatGroup } from '../../common/MessengerThreadChatGroup'; - -export interface FriendsMessengerThreadGroupProps -{ - thread: MessengerThread; - group: MessengerThreadChatGroup; -} diff --git a/src/views/friends/views/messenger-thread/FriendsMessengerThreadView.types.ts b/src/views/friends/views/messenger-thread/FriendsMessengerThreadView.types.ts deleted file mode 100644 index a6e0f4c4..00000000 --- a/src/views/friends/views/messenger-thread/FriendsMessengerThreadView.types.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { MessengerThread } from '../../common/MessengerThread'; - -export interface FriendsMessengerThreadViewProps -{ - thread: MessengerThread; -} diff --git a/src/views/friends/views/messenger-thread-group/FriendsMessengerThreadGroup.tsx b/src/views/friends/views/messenger/FriendsMessengerThreadGroup.tsx similarity index 93% rename from src/views/friends/views/messenger-thread-group/FriendsMessengerThreadGroup.tsx rename to src/views/friends/views/messenger/FriendsMessengerThreadGroup.tsx index 6dd6eb43..9fccf4bb 100644 --- a/src/views/friends/views/messenger-thread-group/FriendsMessengerThreadGroup.tsx +++ b/src/views/friends/views/messenger/FriendsMessengerThreadGroup.tsx @@ -4,9 +4,16 @@ import { NitroLayoutFlex } from '../../../../layout'; import { NitroLayoutBase } from '../../../../layout/base'; import { AvatarImageView } from '../../../shared/avatar-image/AvatarImageView'; import { GroupType } from '../../common/GroupType'; +import { MessengerThread } from '../../common/MessengerThread'; import { MessengerThreadChat } from '../../common/MessengerThreadChat'; +import { MessengerThreadChatGroup } from '../../common/MessengerThreadChatGroup'; import { getGroupChatData } from '../../common/Utils'; -import { FriendsMessengerThreadGroupProps } from './FriendsMessengerThreadGroup.types'; + +interface FriendsMessengerThreadGroupProps +{ + thread: MessengerThread; + group: MessengerThreadChatGroup; +} export const FriendsMessengerThreadGroup: FC = props => { diff --git a/src/views/friends/views/messenger-thread/FriendsMessengerThreadView.tsx b/src/views/friends/views/messenger/FriendsMessengerThreadView.tsx similarity index 66% rename from src/views/friends/views/messenger-thread/FriendsMessengerThreadView.tsx rename to src/views/friends/views/messenger/FriendsMessengerThreadView.tsx index 3bf6326a..98e34965 100644 --- a/src/views/friends/views/messenger-thread/FriendsMessengerThreadView.tsx +++ b/src/views/friends/views/messenger/FriendsMessengerThreadView.tsx @@ -1,6 +1,11 @@ import { FC } from 'react'; -import { FriendsMessengerThreadGroup } from '../messenger-thread-group/FriendsMessengerThreadGroup'; -import { FriendsMessengerThreadViewProps } from './FriendsMessengerThreadView.types'; +import { MessengerThread } from '../../common/MessengerThread'; +import { FriendsMessengerThreadGroup } from './FriendsMessengerThreadGroup'; + +interface FriendsMessengerThreadViewProps +{ + thread: MessengerThread; +} export const FriendsMessengerThreadView: FC = props => { diff --git a/src/views/friends/views/messenger/FriendsMessengerView.tsx b/src/views/friends/views/messenger/FriendsMessengerView.tsx index e7f2ae1b..5b9cac03 100644 --- a/src/views/friends/views/messenger/FriendsMessengerView.tsx +++ b/src/views/friends/views/messenger/FriendsMessengerView.tsx @@ -11,8 +11,8 @@ import { BadgeImageView } from '../../../shared/badge-image/BadgeImageView'; import { ItemCountView } from '../../../shared/item-count/ItemCountView'; import { MessengerThread } from '../../common/MessengerThread'; import { MessengerThreadChat } from '../../common/MessengerThreadChat'; -import { useFriendsContext } from '../../context/FriendsContext'; -import { FriendsMessengerThreadView } from '../messenger-thread/FriendsMessengerThreadView'; +import { useFriendsContext } from '../../FriendsContext'; +import { FriendsMessengerThreadView } from './FriendsMessengerThreadView'; export const FriendsMessengerView: FC<{}> = props => {