Skip to content

Commit 8381865

Browse files
committed
Errors fix
1 parent 39b04b8 commit 8381865

File tree

3 files changed

+15
-20
lines changed

3 files changed

+15
-20
lines changed

packages/nextjs/app/profile/[address]/page.tsx

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface Post extends Partial<NFTMetaData> {
2121
}
2222

2323
const ProfilePage: NextPage = () => {
24-
const [activeTab, setActiveTab] = useState("Listed");
24+
const [activeTab, setActiveTab] = useState("Bought");
2525

2626
const handleTabClick = (tab: any) => {
2727
setActiveTab(tab);
@@ -38,34 +38,29 @@ const ProfilePage: NextPage = () => {
3838
return (
3939
<>
4040
<ProfileInfo address={address} />
41-
<div className="flex flex-col items-center justify-center">
42-
<div className="tabs-bar ">
43-
<button className={`tab ${activeTab === "Listed" ? "active" : ""}`} onClick={() => handleTabClick("Listed")}>
44-
Listed
45-
</button>
41+
<div className="flex items-center justify-center">
42+
<div className="tabs-bar overflow-x-auto whitespace-nowrap flex">
4643
<button className={`tab ${activeTab === "Bought" ? "active" : ""}`} onClick={() => handleTabClick("Bought")}>
4744
Bought
4845
</button>
49-
<button className={`tab 0 ${activeTab === "Saved" ? "active" : ""}`} onClick={() => handleTabClick("Saved")}>
46+
<button className={`tab ${activeTab === "Saved" ? "active" : ""}`} onClick={() => handleTabClick("Saved")}>
5047
Saved
5148
</button>
49+
<button className={`tab ${activeTab === "Listed" ? "active" : ""}`} onClick={() => handleTabClick("Listed")}>
50+
Listed
51+
</button>
5252
<button
5353
className={`tab text-red-600 ${activeTab === "Activity" ? "active" : ""}`}
5454
onClick={() => handleTabClick("Activity")}
5555
>
5656
Activity
5757
</button>
58-
<button
59-
className={`tab text-red-600 ${activeTab === "Revenue" ? "active" : ""}`}
60-
onClick={() => handleTabClick("Revenue")}
61-
>
62-
Revenue
63-
</button>
6458
</div>
65-
{activeTab === "Listed" && <ListedArticles />}
66-
{activeTab === "Bought" && <BoughtArticles />}
67-
{activeTab === "Saved" && <BookmarkedArticles />}
6859
</div>
60+
61+
{activeTab === "Bought" && <BoughtArticles />}
62+
{activeTab === "Saved" && <BookmarkedArticles />}
63+
{activeTab === "Listed" && <ListedArticles />}
6964
</>
7065
);
7166
};

packages/nextjs/app/profile/_components/ProfileInfo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ const ProfileInfo: React.FC<ProfileInfoProps> = ({ address }) => {
8787
<div>
8888
{/* User Profile Section */}
8989
{loadingProfile ? (
90-
<div className="relative flex flex-col md:flex-row justify-between items-center bg-base-100 p-6 rounded-lg shadow-md w-full m-2">
91-
<div className="flex items-center justify-center w-full h-full">
90+
<div className="relative flex flex-col md:flex-row justify-between items-center bg-base-100 p-6 rounded-lg shadow-md w-full my-2">
91+
<div className="flex items-center justify-center w-full">
9292
<LoadingBars />
9393
</div>
9494
</div>
9595
) : (
96-
<div className="relative flex flex-col md:flex-row justify-between items-center bg-base-100 p-6 rounded-lg shadow-md w-full m-2">
96+
<div className="relative flex flex-col md:flex-row justify-between items-center bg-base-100 p-6 rounded-lg shadow-md w-full my-2">
9797
{/* Profile Picture */}
9898
<div className="avatar ">
9999
<ProfilePictureUpload

packages/nextjs/styles/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
display: flex;
3232
justify-content: center;
3333
items-align: center;
34-
padding-bottom: 7px;
34+
padding-bottom: 8px;
3535
border-bottom: 1px solid;
3636
max-width: 500px;
3737
}

0 commit comments

Comments
 (0)