Skip to content

Commit c7fe3c6

Browse files
committed
update: removed the unwanted codes from "app.jsx"
1 parent 9c03b2a commit c7fe3c6

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

src/App.jsx

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ const ShortcutGeneratorPage = React.lazy(() => import("./Pages/ShortcutGenerator
114114

115115
const App = () => {
116116
const [isCookie, setIsCookie] = useState(false)
117-
const [cursorPosition, setCursorPosition] = useState({x: 0, y: 0});
118-
const [isMemeVisible, setIsMemeVisible] = useState(false)
119117

120118
let Title = document.title;
121119
window.addEventListener('blur', () => {
@@ -125,59 +123,10 @@ const App = () => {
125123
window.addEventListener('focus', () => {
126124
document.title = Title;
127125
})
128-
//
129-
// useEffect(() => {
130-
// const handleRightClick = (event) => {
131-
// event.preventDefault();
132-
// setIsMemeVisible(true);
133-
// const audio = new Audio('/rightclickmeme.mp3');
134-
// audio.play();
135-
// setTimeout(() => {
136-
// setIsMemeVisible(false);
137-
// }, 3500);
138-
// };
139-
//
140-
// const handleKeyCombination = (event) => {
141-
// if (
142-
// (event.ctrlKey && event.shiftKey && event.key === 'I') ||
143-
// (event.ctrlKey && event.shiftKey && event.key === 'J') ||
144-
// (event.key === 'F12') ||
145-
// (event.ctrlKey && event.key === 'U')
146-
// ) {
147-
// event.preventDefault();
148-
// const audio = new Audio('/rightclickmeme.mp3');
149-
// audio.play();
150-
// }
151-
// };
152-
//
153-
// document.addEventListener('contextmenu', handleRightClick);
154-
// document.addEventListener('keydown', handleKeyCombination);
155-
//
156-
// return () => {
157-
// document.removeEventListener('contextmenu', handleRightClick);
158-
// document.removeEventListener('keydown', handleKeyCombination);
159-
// };
160-
// }, []);
161-
162-
document.addEventListener('mousemove', (event) => {
163-
setCursorPosition({
164-
x: event.clientX + 90,
165-
y: event.clientY + window.scrollY
166-
});
167-
});
168126

169127
return (
170128
<Suspense>
171129

172-
<img src='/rightClickMeme.gif' alt='meme' style={{
173-
left: cursorPosition.x + 'px',
174-
top: cursorPosition.y + 'px',
175-
transform: 'translate(-50%, -50%)',
176-
pointerEvents: 'none',
177-
}}
178-
className={`${isMemeVisible ? 'block' : 'hidden'} z-[3000] absolute rounded-full boxShadow w-[150px] h-[150px] transition-all shadow-md object-cover`}/>
179-
180-
181130
{/* all routes */}
182131
<Routes>
183132
<Route path="/" element={<HomePage/>}/>

0 commit comments

Comments
 (0)