mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-10 03:56:37 +08:00
fix: bug of deleting chat on pc and remove delete button on mobile
This commit is contained in:
parent
bf8d136936
commit
2b6b4fb551
@ -35,9 +35,11 @@ export function ChatItem(props: {
|
||||
</div>
|
||||
<div className={styles["chat-item-date"]}>{props.time}</div>
|
||||
</div>
|
||||
{!isMobileScreen() ? (
|
||||
<div className={styles["chat-item-delete"]} onClick={props.onDelete}>
|
||||
<DeleteIcon />
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -63,7 +65,8 @@ export function ChatList() {
|
||||
selected={i === selectedIndex}
|
||||
onClick={() => selectSession(i)}
|
||||
onDelete={() =>
|
||||
(!isMobileScreen() || confirm(Locale.Home.DeleteChat)) &&
|
||||
!isMobileScreen() &&
|
||||
confirm(Locale.Home.DeleteChat) &&
|
||||
removeSession(i)
|
||||
}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user