11"use client" ;
22
3- import { TopHeader } from "@/components/TopHeader" ;
3+ import { LoaderComp } from "@/components/LoaderComp" ;
4+ import { Dialog , DialogContent , DialogTrigger } from "@/components/ui/dialog" ;
45import { Avatar , AvatarFallback , AvatarImage } from "@radix-ui/react-avatar" ;
56import axios from "axios" ;
67import { useSession } from "next-auth/react" ;
@@ -9,11 +10,8 @@ import { AiOutlineLink } from "react-icons/ai";
910import { GrLocation } from "react-icons/gr" ;
1011import { IoCalendarOutline } from "react-icons/io5" ;
1112import { PiBalloon } from "react-icons/pi" ;
12- import { Button } from "../button" ;
1313import { TweetComp } from "../TweetComp" ;
14- import { NextResponse } from "next/server" ;
15- import { LoaderComp } from "@/components/LoaderComp" ;
16-
14+ import { EditProfileComp } from "./EditProfileComp" ;
1715interface UserDataProps {
1816 DOB : string ;
1917 location : string ;
@@ -61,7 +59,7 @@ export const UserInfo = () => {
6159 try {
6260 const response = await axios . get ( `api/post/$[userID]` ) ;
6361 const tweetsByUser = response . data . data ;
64- console . log ( tweetsByUser , "This is from user" ) ;
62+ // console.log(tweetsByUser, "This is from user");
6563 setUserTweet ( tweetsByUser ) ;
6664 } catch ( error ) {
6765 console . log ( error ) ;
@@ -96,9 +94,17 @@ export const UserInfo = () => {
9694 </ div >
9795 < div className = "text-right pr-4 mt-4" >
9896 < div >
99- < Button className = "bg-black text-white rounded-2xl border px-7 border-white hover:bg-neutral-900 transition duration-200 font-bold text-md" >
97+ { /* <Button className="bg-black text-white rounded-2xl border px-7 border-white hover:bg-neutral-900 transition duration-200 font-bold text-md">
10098 Edit Profile
101- </ Button >
99+ </Button> */ }
100+ < Dialog >
101+ < DialogTrigger className = "bg-black text-white rounded-2xl border px-7 border-white hover:bg-neutral-900 transition duration-200 font-bold text-md" >
102+ Edit Profile
103+ </ DialogTrigger >
104+ < DialogContent className = "bg-black w-full" >
105+ < EditProfileComp />
106+ </ DialogContent >
107+ </ Dialog >
102108 </ div >
103109 </ div >
104110 </ div >
@@ -145,137 +151,7 @@ export const UserInfo = () => {
145151 < span className = "text-gray-500 ml-1" > Followers</ span >
146152 </ div >
147153 </ div >
148- </ div >
149-
150- { /* <div className="mb-4 border-b border-gray-200 dark:border-gray-700">
151- <ul
152- className="flex flex-wrap -mb-px text-sm font-medium text-center"
153- id="default-styled-tab"
154- data-tabs-toggle="#default-styled-tab-content"
155- data-tabs-active-classes="text-purple-600 hover:text-purple-600 dark:text-purple-500 dark:hover:text-purple-500 border-purple-600 dark:border-purple-500"
156- data-tabs-inactive-classes="dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300"
157- role="tablist"
158- >
159- <li className="me-2" role="presentation">
160- <button
161- className="inline-block p-4 border-b-2 rounded-t-lg"
162- id="profile-styled-tab"
163- data-tabs-target="#styled-profile"
164- type="button"
165- role="tab"
166- aria-controls="profile"
167- aria-selected="false"
168- >
169- Profile
170- </button>
171- </li>
172- <li className="me-2" role="presentation">
173- <button
174- className="inline-block p-4 border-b-2 rounded-t-lg hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300"
175- id="dashboard-styled-tab"
176- data-tabs-target="#styled-dashboard"
177- type="button"
178- role="tab"
179- aria-controls="dashboard"
180- aria-selected="false"
181- >
182- Dashboard
183- </button>
184- </li>
185- <li className="me-2" role="presentation">
186- <button
187- className="inline-block p-4 border-b-2 rounded-t-lg hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300"
188- id="settings-styled-tab"
189- data-tabs-target="#styled-settings"
190- type="button"
191- role="tab"
192- aria-controls="settings"
193- aria-selected="false"
194- >
195- Settings
196- </button>
197- </li>
198- <li role="presentation">
199- <button
200- className="inline-block p-4 border-b-2 rounded-t-lg hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300"
201- id="contacts-styled-tab"
202- data-tabs-target="#styled-contacts"
203- type="button"
204- role="tab"
205- aria-controls="contacts"
206- aria-selected="false"
207- >
208- Contacts
209- </button>
210- </li>
211- </ul>
212- </div>
213- <div id="default-styled-tab-content">
214- <div
215- className="hidden p-4 rounded-lg bg-gray-50 dark:bg-gray-800"
216- id="styled-profile"
217- role="tabpanel"
218- aria-labelledby="profile-tab"
219- >
220- <p className="text-sm text-gray-500 dark:text-gray-400">
221- This is some placeholder content the{" "}
222- <strong className="font-medium text-gray-800 dark:text-white">
223- Profile tab associated content
224- </strong>
225- . Clicking another tab will toggle the visibility of this one
226- for the next. The tab JavaScript swaps classes to control the
227- content visibility and styling.
228- </p>
229- </div>
230- <div
231- className="hidden p-4 rounded-lg bg-gray-50 dark:bg-gray-800"
232- id="styled-dashboard"
233- role="tabpanel"
234- aria-labelledby="dashboard-tab"
235- >
236- <p className="text-sm text-gray-500 dark:text-gray-400">
237- This is some placeholder content the{" "}
238- <strong className="font-medium text-gray-800 dark:text-white">
239- Dashboard tabs associated content
240- </strong>
241- . Clicking another tab will toggle the visibility of this one
242- for the next. The tab JavaScript swaps classes to control the
243- content visibility and styling.
244- </p>
245- </div>
246- <div
247- className="hidden p-4 rounded-lg bg-gray-50 dark:bg-gray-800"
248- id="styled-settings"
249- role="tabpanel"
250- aria-labelledby="settings-tab"
251- >
252- <p className="text-sm text-gray-500 dark:text-gray-400">
253- This is some placeholder content the{" "}
254- <strong className="font-medium text-gray-800 dark:text-white">
255- Settings tabs associated content
256- </strong>
257- . Clicking another tab will toggle the visibility of this one
258- for the next. The tab JavaScript swaps classNamees to control
259- the content visibility and styling.
260- </p>
261- </div>
262- <div
263- className="hidden p-4 rounded-lg bg-gray-50 dark:bg-gray-800"
264- id="styled-contacts"
265- role="tabpanel"
266- aria-labelledby="contacts-tab"
267- >
268- <p className="text-sm text-gray-500 dark:text-gray-400">
269- This is some placeholder content the{" "}
270- <strong className="font-medium text-gray-800 dark:text-white">
271- Contacts tabs associated content
272- </strong>
273- . Clicking another tab will toggle the visibility of this one
274- for the next. The tab JavaScript swaps classes to control the
275- content visibility and styling.
276- </p>
277- </div>
278- </div> */ }
154+ </ div > { " " }
279155 </ div >
280156 </ div >
281157 < br />
0 commit comments