Skip to content

Commit

Permalink
some changes in scroll to top
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaBhattacharjee committed Aug 26, 2023
1 parent fa66b37 commit b48c55b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/components/shared/ScrollToTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ const ScrollToTop = () => {
}
};

if (typeof window !== 'undefined') {
window.addEventListener('scroll', listenToScroll);
return () => window.removeEventListener('scroll', listenToScroll);
}
window.addEventListener('scroll', listenToScroll);
return () => {
window.removeEventListener('scroll', listenToScroll);
};
}, []);

return (
Expand Down
1 change: 0 additions & 1 deletion src/components/shared/cards/characterCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import Anime from '@/types/animetypes';
import { Frown } from 'lucide-react';
import ContentNotFound from '@/components/error/Contentnotfound';

export default function CharacterCard({ characters }: { characters: Anime[] }) {
Expand Down

0 comments on commit b48c55b

Please sign in to comment.