style: set modal false at dropdown item
This commit is contained in:
parent
c42e719381
commit
67f2fccd33
|
|
@ -6,8 +6,6 @@ export const POST = withBody(async (_req, body) => {
|
|||
try {
|
||||
const result = await scrapeTokopediaProduct(body.url);
|
||||
|
||||
console.log(result);
|
||||
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
data: result,
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ export const GET = withAuth(async (_req, _context, session) => {
|
|||
|
||||
const allKeywords = await wordCloudService(email);
|
||||
|
||||
console.log(allKeywords);
|
||||
|
||||
return NextResponse.json(
|
||||
{ success: true, data: allKeywords },
|
||||
{ status: 200 },
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import Footer from "@/src/components/dashboards/Footer";
|
||||
import { Header } from "@/src/components/dashboards/Header";
|
||||
import ProfileClient from "@/src/components/dashboards/ProfileClient";
|
||||
|
||||
|
|
@ -6,6 +7,7 @@ export default async function ProfilePage() {
|
|||
<div className="min-h-screen bg-[#F8FBFF]">
|
||||
<Header />
|
||||
<ProfileClient />
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ import { useHeader } from "@/src/hooks/useHeader";
|
|||
import { useDashboards } from "@/src/hooks/useDashboard";
|
||||
|
||||
export function Header() {
|
||||
const { open, setOpen, session, mounted, productCount } =
|
||||
useHeader();
|
||||
const { open, setOpen, session, mounted, productCount } = useHeader();
|
||||
const { totalReviews } = useDashboards();
|
||||
|
||||
if (!mounted) return null;
|
||||
|
|
@ -56,7 +55,7 @@ export function Header() {
|
|||
</div>
|
||||
</div>
|
||||
<div onClick={() => setOpen(true)}>
|
||||
<DropdownMenu open={open} onOpenChange={setOpen}>
|
||||
<DropdownMenu open={open} onOpenChange={setOpen} modal={false}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<div className="flex items-center gap-2 text-muted-foreground cursor-pointer">
|
||||
<span>{`Hi, ${session.data?.user?.name || "Guest"}`}</span>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ export default function ProfileCard(props: ProfileClientProps) {
|
|||
|
||||
<Button
|
||||
size="sm"
|
||||
className="w-full sm:w-auto gap-2 rounded-full shadow-sm"
|
||||
className="w-full sm:w-auto gap-2 shadow-sm"
|
||||
onClick={() => setShowModal(true)}
|
||||
>
|
||||
<Pencil className="h-4 w-4" />
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { ArrowLeft } from "lucide-react";
|
|||
import Link from "next/link";
|
||||
import { getAnotherUserData } from "@/src/app/profile/lib/action";
|
||||
import ProfileCard from "./ProfileCard";
|
||||
import Footer from "./Footer";
|
||||
|
||||
export default async function ProfileClient() {
|
||||
const user = await getAnotherUserData();
|
||||
|
|
@ -27,6 +28,7 @@ export default async function ProfileClient() {
|
|||
budgetMax={user?.preference?.budgetMax || 0}
|
||||
budgetMin={user?.preference?.budgetMin || 0}
|
||||
/>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const ProfileModal = ({
|
|||
>
|
||||
<form
|
||||
onSubmit={handleSubmit(onSubmit)}
|
||||
className="flex flex-col bg-card w-1/3 p-6 rounded-2xl border relative gap-4"
|
||||
className="flex flex-col bg-card w-xs sm:w-sm lg:w-lg md:w-md p-6 rounded-2xl border relative gap-4 "
|
||||
>
|
||||
<div className="flex flex-col gap-1">
|
||||
<div className="flex items-center gap-2">
|
||||
|
|
@ -260,7 +260,7 @@ export const ProfileModal = ({
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mt-2 flex justify-start gap-4">
|
||||
<div className="mt-2 flex flex-col-reverse sm:flex-row justify-start gap-4">
|
||||
<Button
|
||||
type="button"
|
||||
onClick={() => setShowModal(false)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue