Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mertbagt committed Jan 22, 2025
1 parent 3bd3a91 commit 5222db7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions components/EditProfilePage/EditProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ import { TestimoniesTab } from "./TestimoniesTab"
import { useFlags } from "components/featureFlags"
import { PendingUpgradeBanner } from "components/PendingUpgradeBanner"

const tabTitles = ["about-you", "testimonies", "following"] as const
export type TabTitles = (typeof tabTitles)[number]
const tabTitle = ["about-you", "testimonies", "following"] as const
export type TabTitles = (typeof tabTitle)[number]

export default function EditProfile({
tabTitles = "about-you"
tabTitle = "about-you"
}: {
tabTitles?: TabTitles
tabTitle?: TabTitles
}) {
const { user } = useAuth()
const uid = user?.uid
Expand All @@ -52,7 +52,7 @@ export default function EditProfile({
<EditProfileForm
actions={result}
profile={result.profile}
tabTitles={tabTitles}
tabTitle={tabTitle}
uid={uid}
/>
)
Expand All @@ -64,12 +64,12 @@ export default function EditProfile({
export function EditProfileForm({
actions,
profile,
tabTitles,
tabTitle,
uid
}: {
actions: ProfileHook
profile: Profile
tabTitles: TabTitles
tabTitle: TabTitles
uid: string
}) {
const handleOnClick = (t: TabTitles) => {
Expand Down Expand Up @@ -164,8 +164,8 @@ export function EditProfileForm({
/>
<TabContainer
defaultActiveKey="about-you"
activeKey={tabTitles}
onSelect={(tabTitles: any) => handleOnClick(tabTitles)}
activeKey={tabTitle}
onSelect={(tabTitle: any) => handleOnClick(tabTitle)}
>
<TabNavWrapper>
{tabs.map((t, i) => (
Expand Down

0 comments on commit 5222db7

Please sign in to comment.