import { useEffect } from "react";
import io from "[Link]-client";
const socket = io("[Link]
const App = () => {
let elem = [Link];
/* View in fullscreen */
function openFullscreen() {
if ([Link]) {
[Link]();
} else if ([Link]) {
/* Safari */
[Link]();
} else if ([Link]) {
/* IE11 */
[Link]();
}
}
/* Close fullscreen */
function closeFullscreen() {
if ([Link]) {
[Link]();
} else if ([Link]) {
/* Safari */
[Link]();
} else if ([Link]) {
/* IE11 */
[Link]();
}
}
useEffect(() => {
[Link]("visibilitychange", (event) => {
if ([Link] == "hidden") {
[Link]("tab is inactive");
}
});
[Link]("blur", () => {
[Link]("User switched to another application");
});
[Link]("focus", () => {
[Link]("User is back to the website");
});
});
return (
<div>
<button onClick={openFullscreen}>Open Full Screen</button>{" "}
<button onClick={closeFullscreen}>Close screen</button>
</div>
);
};
export default App;