Skip to content

Commit

Permalink
Merge pull request danny-avila#114 from aitok-ai/change-back-button-c…
Browse files Browse the repository at this point in the history
…olor

changed bg color for back-button
  • Loading branch information
Thomasbulls committed Sep 3, 2023
2 parents 0fb32fc + 9983bd6 commit 883a7ea
Showing 1 changed file with 1 addition and 63 deletions.
64 changes: 1 addition & 63 deletions client/src/components/Profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -344,68 +344,6 @@ function ProfileContent() {
</div>

{/* User bio */}
{/* {userId === user?.id ? ( // Check if the current user matches the profile user
<div className="w-full rounded-lg p-6 dark:text-gray-200">
{editMode ? (
<form className="flex flex-col space-y-4" onSubmit={handleSubmit}>
<div className="flex items-center">
<label htmlFor="bio" className="flex items-center justify-center pl-5 pr-5">
<span className="text-lg">{localize(lang, 'com_ui_about_yourself')}</span>
</label>
<textarea
id="bio"
value={bio}
placeholder="分享一下你的兴趣、技能和人生态度..."
onChange={(e) => setBio(e.target.value)}
className="flex-1 border border-gray-300 bg-transparent p-2"
></textarea>
</div>
<div className="flex justify-end space-x-4">
<button
type="button"
onClick={handleEditProfile}
className="rounded bg-gray-300 px-4 py-1 hover:bg-gray-500"
>
Back
</button>
<button
type="submit"
className="rounded bg-green-500 px-4 py-1 text-white hover:bg-green-600"
onClick={handleSubmit}
>
Save
</button>
</div>
</form>
) : (
<>
{userId === user?.id && (
<>
<div className="pl-7">{bio}</div>
<div className="flex flex-col md:flex-row md:items-start md:space-x-4">
<div className="ml-auto md:flex-none">
<p className="mt-4">
<button
className="flex w-24 flex-col items-center leading-[22px] text-gray-600 hover:text-black dark:text-gray-400 dark:hover:text-gray-200"
onClick={handleEditProfile}
>
编辑资料
</button>
</p>
</div>
</div>
</>
)}
</>
)}
</div>
) : (
<div className="w-full rounded-lg p-6 dark:text-gray-200">
<div className="pl-7">{bio}</div>
</div>
)} */}

{userId === user?.id ? (
// Current user's profile view
<div className="w-full rounded-lg p-6 dark:text-gray-200">
Expand All @@ -429,7 +367,7 @@ function ProfileContent() {
<button
type="button"
onClick={handleEditProfile}
className="rounded bg-gray-300 px-4 py-1 hover:bg-gray-500"
className="rounded px-4 py-1 hover:bg-gray-500"
>
Back
</button>
Expand Down

0 comments on commit 883a7ea

Please sign in to comment.