Skip to content

Commit

Permalink
feat: optimize db queries
Browse files Browse the repository at this point in the history
  • Loading branch information
FallenDeity committed Jul 29, 2023
1 parent 38b81a1 commit 4f97dee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/Chat/AudioBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,18 +213,18 @@ export default function AudioBar({
)}
<div
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
className={`w-32 sm:w-48 lg:w-60 ${MessageSearch && "lg:w-32"}`}
className={`w-32 sm:w-48 lg:w-60 ${MessageSearch && "lg:w-28"}`}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
ref={waveFormRef}
hidden={recording}
/>
{audio && isPlaying && (
{audio && isPlaying && !MessageSearch && (
<span className="hidden text-xs text-[#54656f] dark:text-[#aebac1] sm:flex">
{formatTime(currentPlaybackTime)} / {formatTime(totalDuration)}
</span>
)}
{audio && !isPlaying && !recording && (
{audio && !isPlaying && !recording && !MessageSearch && (
<span className="hidden text-xs text-[#54656f] dark:text-[#aebac1] sm:flex">
{formatTime(currentPlaybackTime)} / {formatTime(totalDuration)}
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Chat/VoiceMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function VoiceMessage({
<div className="relative">
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
{/* @ts-expect-error */}
<div className={`mb-1 w-48 lg:w-60 ${MessageSearch && "lg:w-32"}`} ref={waveFormRef} />
<div className={`mb-1 w-48 lg:w-60 ${MessageSearch && "lg:w-28"}`} ref={waveFormRef} />
{audio && isPlaying && (
<span className="text-xs text-[#54656f] dark:text-[#aebac1]">
{formatTime(currentPlaybackTime)} / {formatTime(totalDuration)}
Expand Down

0 comments on commit 4f97dee

Please sign in to comment.