Skip to content

Commit

Permalink
fix: update rebase and fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
KeeJef committed Mar 21, 2024
1 parent 11cdcdd commit 504d989
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion ts/components/conversation/SessionConversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ import { deleteMessagesByIdForEveryone } from '../../interactions/conversations/
import { RightPanel, StyledRightPanelContainer } from './right-panel/RightPanel';

const DEFAULT_JPEG_QUALITY = 0.85;
// tslint:disable: jsx-curly-spacing
interface State {
isDraggingFile: boolean;
}
Expand Down
18 changes: 9 additions & 9 deletions ts/components/dialog/SessionConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { shell } from 'electron';
import React, { Dispatch, useEffect, useState } from 'react';
import { useDispatch } from 'react-redux';
import styled from 'styled-components';
import { useLastMessage } from '../../hooks/useParamSelector';
import useKey from 'react-use/lib/useKey';
import { useLastMessage } from '../../hooks/useParamSelector';
import { MessageInteraction } from '../../interactions';
import {
ConversationInteractionStatus,
Expand Down Expand Up @@ -120,6 +120,14 @@ export const SessionConfirm = (props: SessionConfirmDialogProps) => {
}
};

useKey('Enter', () => {
void onClickOkHandler();
});

useKey('Escape', () => {
onClickCancelHandler();
});

useEffect(() => {
if (isLoading) {
if (conversationId && lastMessage?.interactionType) {
Expand All @@ -136,14 +144,6 @@ export const SessionConfirm = (props: SessionConfirmDialogProps) => {
return null;
}

useKey('Enter', () => {
void onClickOkHandler();
});

useKey('Escape', () => {
onClickCancelHandler();
});

if (shouldShowConfirm && !shouldShowConfirm) {
return null;
}
Expand Down

0 comments on commit 504d989

Please sign in to comment.