Update PriorityConvoRow.tsx
This commit is contained in:
@@ -17,6 +17,7 @@ import { useCallback } from "react";
|
|||||||
import { FaAngleRight } from "react-icons/fa";
|
import { FaAngleRight } from "react-icons/fa";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { Routes } from "@nirvana/common/helpers/routes";
|
import { Routes } from "@nirvana/common/helpers/routes";
|
||||||
|
import { isRecordingAtom } from "../../recoil/main";
|
||||||
|
|
||||||
export default function PriorityConvoRow(props: {
|
export default function PriorityConvoRow(props: {
|
||||||
conversation: Conversation;
|
conversation: Conversation;
|
||||||
@@ -26,6 +27,7 @@ export default function PriorityConvoRow(props: {
|
|||||||
const [selectedConvo, setSelectedConvo] = useRecoilState(selectedConvoAtom);
|
const [selectedConvo, setSelectedConvo] = useRecoilState(selectedConvoAtom);
|
||||||
|
|
||||||
const isSelected = selectedConvo == props.conversation.id ? true : false;
|
const isSelected = selectedConvo == props.conversation.id ? true : false;
|
||||||
|
const isRecording = useRecoilValue(isRecordingAtom);
|
||||||
|
|
||||||
// who was the last sender based on the lastInteractionDate etc.
|
// who was the last sender based on the lastInteractionDate etc.
|
||||||
const isNewIncoming = useRecoilValue(
|
const isNewIncoming = useRecoilValue(
|
||||||
@@ -86,8 +88,15 @@ justify-center rounded-lg text-slate-400 font-bold hover:cursor-pointer text-xs"
|
|||||||
{isSelected && (
|
{isSelected && (
|
||||||
<>
|
<>
|
||||||
<Tooltip title={"Record by pressing and holding R on keyboard."}>
|
<Tooltip title={"Record by pressing and holding R on keyboard."}>
|
||||||
<span className="ml-auto p-2 rounded-full hover:cursor-pointer hover:bg-slate-200">
|
<span
|
||||||
<FaMicrophoneAlt className="ml-auto text-lg text-orange-800" />
|
className={`ml-auto p-2 rounded-full hover:cursor-pointer hover:bg-slate-200 transition-all
|
||||||
|
${
|
||||||
|
isRecording && isSelected
|
||||||
|
? "bg-orange-700 text-white animate-pulse animate-ping scale-125"
|
||||||
|
: "text-orange-800"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<FaMicrophoneAlt className="ml-auto text-lg" />
|
||||||
</span>
|
</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user