onClickUpload()}
25 | className="
26 | relative
27 | cursor-pointer
28 | hover:opacity-70
29 | transition
30 | border-dashed
31 | border-2
32 | p-20
33 | border-neutral-300
34 | flex
35 | flex-col
36 | justify-center
37 | items-center
38 | gap-4
39 | text-neutral-600
40 | mb-5
41 | h-72
42 | "
43 | >
44 | {!featuredImage ? (
45 | <>
46 |
47 |
Click to upload
48 | >
49 | ) : (
50 |
60 | )}
61 |
62 |
63 |
64 |
65 |
66 | Nextjs
67 |
68 |
69 |
70 | TypeScript
71 |
72 |
73 |
74 |
75 | Tailwind
76 |
77 |
78 | {!featuredImage ? (
79 | <>>
80 | ) : (
81 |
setFeaturedImage(undefined)}
83 | className="mr-1 text-sm text-red-500 hover:text-red-600 cursor-pointer"
84 | >
85 | Remove image
86 |
87 | )}
88 |
89 | >
90 | );
91 | };
92 |
93 | export default CardBody;
94 |
--------------------------------------------------------------------------------
/components/sign-in-form.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 |
5 | import { cn } from "@/lib/utils";
6 | import { Button } from "@/components/ui/button";
7 | import { Input } from "@/components/ui/input";
8 | import { Label } from "@/components/ui/label";
9 | import { Icons } from "./ui/icons";
10 | import { createClientComponentClient } from "@supabase/auth-helpers-nextjs";
11 | import { Database } from "@/types_db";
12 | import { useState } from "react";
13 | import { useRouter } from "next/navigation";
14 | import { toast } from "react-hot-toast";
15 |
16 | interface SignInFormProps extends React.HTMLAttributes