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