Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { lazy, useMemo } from 'react';

import type { RoomToolboxActionConfig } from '../../views/room/contexts/RoomToolboxContext';

const TeamsChannels = lazy(() => import('../../views/teams/contextualBar/channels/TeamsChannels'));
const TeamsChannels = lazy(() => import('../../views/teams/contextualBar/channels'));

export const useTeamChannelsRoomAction = () => {
return useMemo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { useEncryptedRoomDescription } from '../hooks/useEncryptedRoomDescriptio
type CreateChannelModalProps = {
teamId?: string;
onClose: () => void;
reload?: () => void;
};

type CreateChannelModalPayload = {
Expand All @@ -58,7 +59,7 @@ const getFederationHintKey = (licenseModule: ReturnType<typeof useHasLicenseModu
return 'Federation_Matrix_Federated_Description';
};

const CreateChannelModal = ({ teamId = '', onClose }: CreateChannelModalProps): ReactElement => {
const CreateChannelModal = ({ teamId = '', onClose, reload }: CreateChannelModalProps): ReactElement => {
const t = useTranslation();
const canSetReadOnly = usePermissionWithScopedRoles('set-readonly', ['owner']);
const e2eEnabled = useSetting('E2E_Enable');
Expand Down Expand Up @@ -173,6 +174,7 @@ const CreateChannelModal = ({ teamId = '', onClose }: CreateChannelModalProps):
}

dispatchToastMessage({ type: 'success', message: t('Room_has_been_created') });
reload?.();
} catch (error) {
dispatchToastMessage({ type: 'error', message: error });
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import RoomsAvailableForTeamsAutoComplete from './RoomsAvailableForTeamsAutoComp
type AddExistingModalProps = {
teamId: string;
onClose: () => void;
reload?: () => void;
};

const AddExistingModal = ({ onClose, teamId }: AddExistingModalProps) => {
const AddExistingModal = ({ teamId, onClose, reload }: AddExistingModalProps) => {
const t = useTranslation();
const dispatchToastMessage = useToastMessageDispatch();

Expand All @@ -31,13 +32,14 @@ const AddExistingModal = ({ onClose, teamId }: AddExistingModalProps) => {
});

dispatchToastMessage({ type: 'success', message: t('Channels_added') });
reload?.();
} catch (error) {
dispatchToastMessage({ type: 'error', message: error });
} finally {
onClose();
}
},
[addRoomEndpoint, teamId, onClose, dispatchToastMessage, t],
[addRoomEndpoint, teamId, onClose, dispatchToastMessage, reload, t],
);

return (
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading