Skip to content

Commit

Permalink
Asded forbidden page and alert on like and dislike
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaBhattacharjee committed Nov 14, 2023
1 parent 786d6f5 commit 5c788e7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
8 changes: 2 additions & 6 deletions src/app/bookmark/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Link from "next/link";
import LoadingSkeleton from "@/components/loading/LoadingSkeleton";
import { Error } from "@/types/ErrorTypes";
import Toast from "@/utils/toast";
import Forbidden from "@/components/Forbidden";

type BookmarkItem = {
animeId: string;
Expand Down Expand Up @@ -155,12 +156,7 @@ const Page = () => {
)}
</>
) : (
<div className="flex flex-col font-semibold gap-4 justify-center items-center min-h-[80vh]">
<p className="text-2xl">Login to access bookmark</p>
<Link href="/login" className="p-4 bg-white font-bold w-48 text-center text-black rounded-lg">
Login
</Link>
</div>
<Forbidden />
)}
</div>
);
Expand Down
8 changes: 2 additions & 6 deletions src/app/history/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Link from "next/link";
import LoadingSkeleton from "@/components/loading/LoadingSkeleton";
import { Error } from "@/types/ErrorTypes";
import Toast from "@/utils/toast";
import Forbidden from "@/components/Forbidden";

type HistoryItem = {
streamId: string;
Expand Down Expand Up @@ -163,12 +164,7 @@ const Page = () => {
)}
</>
) : (
<div className="flex flex-col font-semibold gap-4 justify-center items-center min-h-[80vh]">
<p className="text-2xl">Login to access history</p>
<Link href="/login" className="p-4 bg-white font-bold w-48 text-center text-black rounded-lg">
Login
</Link>
</div>
<Forbidden />
)}
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/CommentSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ const CommentSection = ({ streamId }: props) => {
<div className="flex flex-col gap-3">
<h1 className="text-sm md:text-lg font-medium">{comment?.text}</h1>
<div className="flex gap-5 items-center">
<ThumbsUp size={20} />
<ThumbsDown size={20} />
<ThumbsUp size={20} onClick={() => Toast.ErrorShowToast("Under development")} />
<ThumbsDown size={20} onClick={() => Toast.ErrorShowToast("Under Development")} />
{commenterId?.includes(userId) && <Trash size={20} className=" cursor-pointer" onClick={() => handleDeleteComment(comment?._id)} />}
</div>
</div>
Expand Down
16 changes: 16 additions & 0 deletions src/components/Forbidden.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Ghost, KeyRound, Lock } from "lucide-react";
import React from "react";

const Forbidden = () => {
return (
<div className="flex min-h-[70vh] relative flex-col gap-5 justify-center items-center ">
<Ghost size={60} className=" absolute right-10 top-6" />
<h1 className=" text-6xl font-bold">403</h1>
<p className=" font-semibold text-2xl">Sorry Pal , Cant let you in</p>
<KeyRound size={60} className=" absolute bottom-20 right-10" />
<Lock size={60} className=" absolute bottom-20 left-20" />
</div>
);
};

export default Forbidden;

0 comments on commit 5c788e7

Please sign in to comment.