fixing compile errors
This commit is contained in:
@@ -195,9 +195,25 @@ export default function Header() {
|
|||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const handleSilenceOrLivenMode = (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
silenceOrLivenMode();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleMuteUnmute = (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
muteOrUnmute();
|
||||||
|
};
|
||||||
|
|
||||||
const audioOutputDropMenu = (
|
const audioOutputDropMenu = (
|
||||||
<Menu title="audio ouput">
|
<Menu title="audio ouput">
|
||||||
<Menu.Item danger key={"silence output"} onClick={silenceOrLivenMode}>
|
<Menu.Item
|
||||||
|
danger
|
||||||
|
key={"silence output"}
|
||||||
|
onClick={handleSilenceOrLivenMode}
|
||||||
|
>
|
||||||
<button>{isSilenceMode ? "Unsilence" : "Silence"}</button>
|
<button>{isSilenceMode ? "Unsilence" : "Silence"}</button>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
|
||||||
@@ -231,7 +247,7 @@ export default function Header() {
|
|||||||
|
|
||||||
if (isMuted) {
|
if (isMuted) {
|
||||||
return (
|
return (
|
||||||
<span onClick={muteOrUnmute}>
|
<span onClick={handleMuteUnmute}>
|
||||||
<FaMicrophoneAltSlash className="text-xl text-orange-400 ease-in-out duration-300 hover:scale-110 hover:cursor-pointer" />
|
<FaMicrophoneAltSlash className="text-xl text-orange-400 ease-in-out duration-300 hover:scale-110 hover:cursor-pointer" />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
@@ -239,7 +255,7 @@ export default function Header() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown overlay={audioInputDropMenu}>
|
<Dropdown overlay={audioInputDropMenu}>
|
||||||
<span onClick={muteOrUnmute}>
|
<span onClick={handleMuteUnmute}>
|
||||||
<FaMicrophoneAlt className="text-xl text-gray-200 hover:text-white ease-in-out duration-300 hover:scale-110 hover:cursor-pointer" />
|
<FaMicrophoneAlt className="text-xl text-gray-200 hover:text-white ease-in-out duration-300 hover:scale-110 hover:cursor-pointer" />
|
||||||
</span>
|
</span>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
@@ -249,7 +265,7 @@ export default function Header() {
|
|||||||
function renderAudioOutput() {
|
function renderAudioOutput() {
|
||||||
if (isSilenceMode) {
|
if (isSilenceMode) {
|
||||||
return (
|
return (
|
||||||
<span onClick={silenceOrLivenMode}>
|
<span onClick={handleSilenceOrLivenMode}>
|
||||||
<FaVolumeMute className="text-xl text-orange-400 ease-in-out duration-300 hover:scale-110 hover:cursor-pointer" />
|
<FaVolumeMute className="text-xl text-orange-400 ease-in-out duration-300 hover:scale-110 hover:cursor-pointer" />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
@@ -257,7 +273,7 @@ export default function Header() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown overlay={audioOutputDropMenu}>
|
<Dropdown overlay={audioOutputDropMenu}>
|
||||||
<span onClick={silenceOrLivenMode}>
|
<span onClick={handleSilenceOrLivenMode}>
|
||||||
<FaHeadphonesAlt className="text-xl text-gray-200 hover:text-white ease-in-out duration-300 hover:scale-110 hover:cursor-pointer" />
|
<FaHeadphonesAlt className="text-xl text-gray-200 hover:text-white ease-in-out duration-300 hover:scale-110 hover:cursor-pointer" />
|
||||||
</span>
|
</span>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
@@ -266,6 +282,7 @@ export default function Header() {
|
|||||||
|
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
const periodOfDay = generateGreetings();
|
const periodOfDay = generateGreetings();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="flex-1 flex flex-row items-center justify-between py-5">
|
<section className="flex-1 flex flex-row items-center justify-between py-5">
|
||||||
{/* welcome message */}
|
{/* welcome message */}
|
||||||
|
|||||||
Reference in New Issue
Block a user