Skip to content

Commit bf9b802

Browse files
Khizarshah01kodiakhq[bot]dougfabrisggazzo
authored andcommitted
refactor: remove redundant parent condition in ParentRoom (#38724)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Douglas Fabris <devfabris@gmail.com> Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz>
1 parent 05fade9 commit bf9b802

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

apps/meteor/client/views/room/Header/ParentRoom/ParentRoom.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,15 @@ import ParentDiscussion from './ParentDiscussion';
44
import ParentTeam from './ParentTeam';
55

66
const ParentRoom = ({ room }: { room: IRoom }) => {
7-
const parentRoomId = Boolean(room.prid || (room.teamId && !room.teamMain));
8-
9-
if (!parentRoomId) {
10-
return null;
11-
}
12-
137
if (room.prid) {
148
return <ParentDiscussion room={room} />;
159
}
1610

1711
if (room.teamId && !room.teamMain) {
1812
return <ParentTeam room={room} />;
1913
}
14+
15+
return null;
2016
};
2117

2218
export default ParentRoom;

0 commit comments

Comments
 (0)