mirror of
https://github.com/DerTyp7/dertyp7.github.io.git
synced 2025-10-28 20:32:19 +01:00
Remove console logs and clean up code
This commit is contained in:
@@ -33,16 +33,10 @@ export default function App() {
|
||||
(entries) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
// console.log("====================================");
|
||||
// console.log(`Previous Hash: ${prevHash.current}`);
|
||||
// console.log(`Current Hash: ${window.location.hash}`);
|
||||
// console.log(`Target ID: ${entry.target.id}`);
|
||||
|
||||
const difference = Math.abs(
|
||||
sections.indexOf(prevHash.current.replace("#", "")) -
|
||||
sections.indexOf(window.location.hash.replace("#", ""))
|
||||
);
|
||||
// console.log(`Difference: ${difference}`);
|
||||
if (difference > 1) {
|
||||
prevHash.current = entry.target.id;
|
||||
return;
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function About() {
|
||||
setJob(jobs[jobIndex]);
|
||||
}, 7000);
|
||||
|
||||
return () => clearInterval(intervalId); // Clean up on unmount
|
||||
return () => clearInterval(intervalId);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user