Skip to content

Commit

Permalink
use arrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
iceljc committed Jul 19, 2024
1 parent c5d251d commit ef68fdb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions src/routes/chat/[agentId]/[conversationId]/chat-box.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -863,9 +863,9 @@
title={'Edit message'}
size={'md'}
isOpen={isOpenEditMsgModal}
toggleModal={toggleEditMsgModal}
confirm={confirmEditMsg}
cancel={toggleEditMsgModal}
toggleModal={() => toggleEditMsgModal()}
confirm={() => confirmEditMsg()}
cancel={() => toggleEditMsgModal()}
disableConfirmBtn={!!!_.trim(editText)}
>
<textarea class="form-control chat-input" rows="3" maxlength={500} bind:value={editText} placeholder="Enter Message..." />
Expand All @@ -875,9 +875,9 @@
isOpen={isOpenUserAddStateModal}
bind:states={userAddStates}
requireActiveRounds
toggleModal={toggleUserAddStateModal}
confirm={handleConfirmUserAddStates}
cancel={toggleUserAddStateModal}
toggleModal={() => toggleUserAddStateModal()}
confirm={() => handleConfirmUserAddStates()}
cancel={() => toggleUserAddStateModal()}
/>
<HeadTitle title="Chat" addOn='' />
Expand All @@ -890,7 +890,7 @@
bind:agentQueueLogs={agentQueueLogs}
agent={agent}
autoScroll={autoScrollLog}
closeWindow={closeInstantLog}
closeWindow={() => closeInstantLog()}
/>
</Pane>
{/if}
Expand Down Expand Up @@ -1086,7 +1086,7 @@
<RichContent
message={lastBotMsg}
disabled={isSendingMsg || isThinking}
onConfirm={confirmSelectedOption}
onConfirm={(title, payload) => confirmSelectedOption(title, payload)}
/>
{/if}
</div>
Expand Down Expand Up @@ -1142,8 +1142,8 @@
bind:contentLogs={contentLogs}
bind:convStateLogs={convStateLogs}
autoScroll={autoScrollLog}
closeWindow={closePersistLog}
cleanScreen={cleanPersistLogScreen}
closeWindow={() => closePersistLog()}
cleanScreen={() => cleanPersistLogScreen()}
/>
</Pane>
{/if}
Expand Down
10 changes: 5 additions & 5 deletions src/routes/page/conversation/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@
validateKey={true}
validateValue={false}
bind:states={searchOption.states}
toggleModal={toggleSearchStateModal}
confirm={handleConfirmStateModal}
cancel={toggleSearchStateModal}
toggleModal={() => toggleSearchStateModal()}
confirm={() => handleConfirmStateModal()}
cancel={() => toggleSearchStateModal()}
/>
<Row>
Expand Down Expand Up @@ -410,7 +410,7 @@
</Row>
{#if searchStateStrs?.length > 0}
{#each searchStateStrs as str, idx (idx)}
<Label index={idx} text={str} onClose={handleCloseLabel} />
<Label index={idx} text={str} onClose={(index) => handleCloseLabel(index)} />
{/each}
{/if}
</CardBody>
Expand Down Expand Up @@ -464,7 +464,7 @@
</tbody>
</Table>
</div>
<TablePagination pagination={pager} pageTo={pageTo} />
<TablePagination pagination={pager} pageTo={(pn) => pageTo(pn)} />
</CardBody>
</Card>
</Col>
Expand Down

0 comments on commit ef68fdb

Please sign in to comment.