-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: TS conversion folder client (#25031)
- Loading branch information
Showing
18 changed files
with
183 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
client/components/Omnichannel/Skeleton.js → client/components/Omnichannel/Skeleton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Box } from '@rocket.chat/fuselage'; | ||
import React, { ReactElement } from 'react'; | ||
|
||
import BaseAvatar from './BaseAvatar'; | ||
|
||
// TODO: frontend chapter day - Remove inline Styling | ||
|
||
type AppAvatarProps = { | ||
/* @deprecated */ | ||
size: 'x36' | 'x28' | 'x16' | 'x40' | 'x124'; | ||
/* @deprecated */ | ||
mie?: 'x80' | 'x20' | 'x8'; | ||
/* @deprecated */ | ||
alignSelf?: 'center'; | ||
|
||
iconFileContent: string; | ||
iconFileData: string; | ||
}; | ||
|
||
export default function AppAvatar({ iconFileContent, size, iconFileData, ...props }: AppAvatarProps): ReactElement { | ||
return ( | ||
<Box {...props}> | ||
<BaseAvatar size={size} objectFit url={iconFileContent || `data:image/png;base64,${iconFileData}`} /> | ||
</Box> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React, { memo, ReactElement } from 'react'; | ||
|
||
import { useRoomAvatarPath } from '../../contexts/AvatarUrlContext'; | ||
import BaseAvatar from './BaseAvatar'; | ||
|
||
// TODO: frontend chapter day - Remove inline Styling | ||
|
||
type RoomAvatarProps = { | ||
/* @deprecated */ | ||
size?: 'x16' | 'x20' | 'x28' | 'x36' | 'x40' | 'x124'; | ||
/* @deprecated */ | ||
url?: string; | ||
|
||
room: { | ||
_id: string; | ||
type?: string; | ||
t: string; | ||
avatarETag?: string; | ||
}; | ||
}; | ||
|
||
const RoomAvatar = function RoomAvatar({ room, ...rest }: RoomAvatarProps): ReactElement { | ||
const getRoomPathAvatar = useRoomAvatarPath(); | ||
const { url = getRoomPathAvatar(room), ...props } = rest; | ||
return <BaseAvatar url={url} {...props} />; | ||
}; | ||
|
||
export default memo(RoomAvatar); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import type { IMessage } from '../../../../definition/IMessage'; | ||
import type { ReadReceipt } from '../../../../definition/ReadReceipt'; | ||
|
||
export type GetReadReceiptsMethod = (options: { mid: IMessage['_id'] }) => Array<ReadReceipt>; | ||
export type GetReadReceiptsMethod = (options: { messageId: IMessage['_id'] }) => Array<ReadReceipt>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.