Skip to content

Commit 5e549f1

Browse files
committed
Fix keyboard shorcut hint showing on mobile
1 parent f0b1ebf commit 5e549f1

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

src/client/components/ChatV2/ChatBox.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const ChatBox = ({
3636
handleContinue,
3737
handleSubmit,
3838
handleReset,
39+
isMobile,
3940
}: {
4041
disabled: boolean
4142
currentModel: string
@@ -56,6 +57,7 @@ export const ChatBox = ({
5657
handleContinue: (message: string) => void
5758
handleSubmit: (message: string) => void
5859
handleReset: () => void
60+
isMobile: boolean
5961
}) => {
6062
const { courseId } = useParams()
6163
const isEmbedded = useIsEmbedded()
@@ -271,19 +273,21 @@ export const ChatBox = ({
271273
</Tooltip>
272274
</Box>
273275

274-
<Typography
275-
sx={{
276-
display: { sm: 'none', md: 'block' },
277-
ml: 'auto',
278-
opacity: acuallyDisabled ? 0 : 1,
279-
transition: 'opacity 0.2s ease-in-out',
280-
fontSize: '14px',
281-
}}
282-
variant="body1"
283-
color="textSecondary"
284-
>
285-
{user?.preferences?.sendShortcutMode === 'enter' ? <ShiftEnterForNewline t={t} /> : <ShiftEnterToSend t={t} />}
286-
</Typography>
276+
{!isMobile && (
277+
<Typography
278+
sx={{
279+
display: { sm: 'none', md: 'block' },
280+
ml: 'auto',
281+
opacity: acuallyDisabled ? 0 : 1,
282+
transition: 'opacity 0.2s ease-in-out',
283+
fontSize: '14px',
284+
}}
285+
variant="body1"
286+
color="textSecondary"
287+
>
288+
{user?.preferences?.sendShortcutMode === 'enter' ? <ShiftEnterForNewline t={t} /> : <ShiftEnterToSend t={t} />}
289+
</Typography>
290+
)}
287291

288292
{!isEmbedded && (
289293
<Tooltip

src/client/components/ChatV2/ChatV2.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ export const ChatV2 = () => {
514514
handleSubmit(newMessage, false)
515515
}}
516516
handleReset={handleReset}
517+
isMobile={isMobile}
517518
/>
518519
</Box>
519520
</Box>

0 commit comments

Comments
 (0)