Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/react/src/views/ChatHeader/ChatHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ const ChatHeader = ({
setIsChannelReadOnly(true);
setMessageAllowed();
}
if (res.room.archived) {
setIsChannelArchived(true);
} else {
setIsChannelArchived(false);
}
} else if (
'errorType' in res &&
res.errorType === 'error-room-not-found'
Expand Down Expand Up @@ -226,6 +231,7 @@ const ChatHeader = ({
setMessageLimit,
workspaceLevelRoles,
setIsChannelReadOnly,
setIsChannelArchived,
]);

const options = useMemo(
Expand Down
27 changes: 15 additions & 12 deletions packages/react/src/views/RoomInformation/RoomInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const Roominfo = () => {
const channelInfo = useChannelStore((state) => state.channelInfo);
const isChannelPrivate = useChannelStore((state) => state.isChannelPrivate);
const isRoomTeam = useChannelStore((state) => state.isRoomTeam);
const isChannelArchived = useChannelStore((state) => state.isChannelArchived);
const { variantOverrides } = useComponentOverrides('RoomMember');
const viewType = variantOverrides.viewType || 'Sidebar';
const setExclusiveState = useSetExclusiveState();
Expand Down Expand Up @@ -63,18 +64,20 @@ const Roominfo = () => {
/>
</Box>
<Box css={styles.infoContainer}>
<Box css={styles.archivedRoomInfo}>
<Icon
name="report"
size="1.25rem"
fill={
mode === 'light'
? theme.colors.warning
: theme.colors.warningForeground
}
/>
<Box css={styles.archivedText}>Room Archived</Box>
</Box>
{isChannelArchived && (
<Box css={styles.archivedRoomInfo}>
<Icon
name="report"
size="1.25rem"
fill={
mode === 'light'
? theme.colors.warning
: theme.colors.warningForeground
}
/>
<Box css={styles.archivedText}>Room Archived</Box>
</Box>
)}
<Box css={styles.infoHeader}>
<Icon
name={
Expand Down