diff --git a/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.stories.tsx b/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.stories.tsx index ba9d505817..070d6e674f 100644 --- a/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.stories.tsx +++ b/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.stories.tsx @@ -29,16 +29,7 @@ const args: PerformCommunityActionProps = { revealInputValue: false, } -const serverErrorArgs: PerformCommunityActionProps = { - ...args, - serverErrorMessage: 'Could not connect to the server', - clearServerError: function (): void { - console.log('Clearing server error message') - }, -} - Component.args = args -ServerError.args = serverErrorArgs const component: ComponentMeta = { title: 'Components/JoinCommunity', diff --git a/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.tsx b/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.tsx index 99925cb42d..2208a5d595 100644 --- a/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.tsx +++ b/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.tsx @@ -21,12 +21,7 @@ const JoinCommunity = () => { const torBootstrapProcessSelector = useSelector(connection.selectors.torBootstrapProcess) - const downloadInviteDataError = useSelector( - errors.selectors.generalErrorByType(SocketActionTypes.DOWNLOAD_INVITE_DATA) - ) - const [revealInputValue, setRevealInputValue] = useState(false) - const [serverErrorMessage, setServerErrorMessage] = useState('') useEffect(() => { if (isConnected && !currentCommunity && !joinCommunityModal.open) { @@ -57,19 +52,6 @@ const JoinCommunity = () => { } } - useEffect(() => { - if (downloadInviteDataError?.message) { - setServerErrorMessage(downloadInviteDataError.message) - } - }, [downloadInviteDataError]) - - const clearServerError = () => { - if (downloadInviteDataError) { - dispatch(errorsState.actions.clearError(downloadInviteDataError)) - setServerErrorMessage('') - } - } - const handleClickInputReveal = () => { revealInputValue ? setRevealInputValue(false) : setRevealInputValue(true) } @@ -85,8 +67,6 @@ const JoinCommunity = () => { hasReceivedResponse={Boolean(currentIdentity && !currentIdentity.userCertificate)} revealInputValue={revealInputValue} handleClickInputReveal={handleClickInputReveal} - serverErrorMessage={serverErrorMessage} - clearServerError={clearServerError} /> ) } diff --git a/packages/desktop/src/renderer/components/CreateJoinCommunity/PerformCommunityActionComponent.tsx b/packages/desktop/src/renderer/components/CreateJoinCommunity/PerformCommunityActionComponent.tsx index 8e08f02c8e..ee008a7f7e 100644 --- a/packages/desktop/src/renderer/components/CreateJoinCommunity/PerformCommunityActionComponent.tsx +++ b/packages/desktop/src/renderer/components/CreateJoinCommunity/PerformCommunityActionComponent.tsx @@ -137,8 +137,6 @@ export interface PerformCommunityActionProps { hasReceivedResponse: boolean revealInputValue?: boolean handleClickInputReveal?: () => void - serverErrorMessage?: string - clearServerError?: () => void } export const PerformCommunityActionComponent: React.FC = ({ @@ -152,8 +150,6 @@ export const PerformCommunityActionComponent: React.FC { const [formSent, setFormSent] = useState(false) @@ -178,14 +174,6 @@ export const PerformCommunityActionComponent: React.FC { - if (serverErrorMessage) { - setError('name', { message: serverErrorMessage }) - setFormSent(false) - clearServerError?.() - } - }, [serverErrorMessage]) - const onSubmit = (values: PerformCommunityActionFormValues) => submitForm(handleCommunityAction, values, setFormSent) const submitForm = ( diff --git a/packages/state-manager/src/types.ts b/packages/state-manager/src/types.ts index c6b0ab6543..44260530d5 100644 --- a/packages/state-manager/src/types.ts +++ b/packages/state-manager/src/types.ts @@ -51,7 +51,6 @@ export interface EmitEvents { [SocketActionTypes.CREATE_NETWORK]: EmitEvent void> [SocketActionTypes.ADD_CSR]: EmitEvent [SocketActionTypes.SET_USER_PROFILE]: EmitEvent - [SocketActionTypes.DOWNLOAD_INVITE_DATA]: EmitEvent<{ serverAddress: string; cid: string }> [SocketActionTypes.LOAD_MIGRATION_DATA]: EmitEvent> } diff --git a/packages/types/src/socket.ts b/packages/types/src/socket.ts index e9edb6c5b1..573fb1a313 100644 --- a/packages/types/src/socket.ts +++ b/packages/types/src/socket.ts @@ -19,7 +19,6 @@ export enum SocketActionTypes { COMMUNITY_LAUNCHED = 'communityLaunched', COMMUNITY_UPDATED = 'communityUpdated', CREATE_COMMUNITY = 'createCommunity', - DOWNLOAD_INVITE_DATA = 'downloadInviteData', LAUNCH_COMMUNITY = 'launchCommunity', LEAVE_COMMUNITY = 'leaveCommunity',