Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
iqbalpa committed Jul 14, 2024
1 parent f50f387 commit ee8d26d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/components/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ const antiHeader: string[] = ['/signup', '/signin'];

const Header: React.FC = () => {
const pathname = usePathname();
const isSidebarDisabled = antiHeader.includes(pathname);
if (isSidebarDisabled) {
return null;
}

const user = useSelector((state: RootState) => state.user.user);
const dispatch = useDispatch();
const router = useRouter();
Expand All @@ -37,6 +32,11 @@ const Header: React.FC = () => {
return () => window.removeEventListener('scroll', handleScroll);
}, []);

const isSidebarDisabled = antiHeader.includes(pathname);
if (isSidebarDisabled) {
return null;
}

const handleLogout = () => {
dispatch(logout());
toast.success('Logged out');
Expand Down
2 changes: 1 addition & 1 deletion src/modules/signin/signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const SignInModule: React.FC = () => {
/>
</form>
<p className="mt-5 text-sm text-white">
doesn't have an account?{' '}
doesn{`'`}t have an account?{' '}
<Link href="/signup" className="text-green-500 hover:text-green-700">
register
</Link>
Expand Down
7 changes: 5 additions & 2 deletions src/modules/watchlist/watchlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const WatchlistModule = () => {
}
};
fetchWatchlist();
}, [user, accessToken]);
}, [user, accessToken, router]);

return (
<div className="flex min-h-screen w-full justify-center bg-black pb-14 pt-10 text-white md:pt-20">
Expand All @@ -59,7 +59,10 @@ const WatchlistModule = () => {
<div className="w-full border-t-[1px] border-slate-500"></div>
<div className="flex flex-col items-center">
{watchlist.map((movie, index) => (
<div className="flex w-full flex-col items-center gap-3 border-b-[1px] border-slate-500 p-2 md:flex-row">
<div
key={movie.id}
className="flex w-full flex-col items-center gap-3 border-b-[1px] border-slate-500 p-2 md:flex-row"
>
<Image
src={`${baseUrl}${movie.poster_path}`}
alt={movie.title}
Expand Down

0 comments on commit ee8d26d

Please sign in to comment.