Skip to content

Commit

Permalink
drop roles
Browse files Browse the repository at this point in the history
  • Loading branch information
lyoshenka committed Mar 20, 2024
1 parent fa83d73 commit 6e8e44d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 22 deletions.
11 changes: 1 addition & 10 deletions components/core/ProfileIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface ProfileIconsProps {
}

export const ProfileIcons = (props: ProfileIconsProps) => {
const { citizenshipStatus, roleInfos, size } = props
const { citizenshipStatus, size } = props

const citizenshipInfo = citizenshipInfoFromStatus(citizenshipStatus)

Expand All @@ -29,15 +29,6 @@ export const ProfileIcons = (props: ProfileIconsProps) => {
/>
</Tooltip>
)}
{roleInfos.map((roleInfo) => (
<Tooltip key={roleInfo.name} tooltip={roleInfo.name}>
<Icon
name={roleInfo.iconName}
color="yellow600"
size={size ?? ICON_SIZE}
/>
</Tooltip>
))}
</Container>
)
}
Expand Down
4 changes: 0 additions & 4 deletions components/profile/EditProfileForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { HorizontalDivider } from '@/components/core/Divider'
import { AboutInput } from '@/components/profile/AboutInput'
import { ContactInput } from '@/components/profile/ContactInput'
import { Identity } from './edit-profile/Identity'
import { Roles } from './edit-profile/Roles'

export interface UpdateProfileProps {
user: MeFragment
Expand All @@ -23,7 +22,6 @@ export const EditProfileForm = ({
user,
profileEditParams,
onChange,
onRolesChange,
}: {
user: MeFragment
profileEditParams: ProfileEditParams['data'] | null
Expand All @@ -48,8 +46,6 @@ export const EditProfileForm = ({
onChange={onChange}
/>
<HorizontalDivider />
<Roles user={user} onChange={onRolesChange} />
<HorizontalDivider />
<Contact
user={user}
profileEditParams={profileEditParams}
Expand Down
5 changes: 0 additions & 5 deletions components/profile/setup-profile/step-configuration.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ContactFieldType } from '@/utils/types/profile'
import { AboutStep } from './AboutStep'
import { ContactStep } from './ContactStep'
import { RoleStep } from './RoleStep'

export type StepConfig = {
name: string
Expand All @@ -19,10 +18,6 @@ export const steps: StepConfig[] = [
name: 'About',
component: AboutStep,
},
{
name: 'Roles',
component: RoleStep,
},
{
name: 'Contact',
component: ContactStep,
Expand Down
2 changes: 0 additions & 2 deletions components/profile/view-profile/ProfileContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ProfileSetupSection } from './ProfileSetupSection'
import { ProfileInnerContainer } from '../profile.styles'
import { ProfileAboutSection } from './ProfileAboutSection'
import { ProfileHeaderSection } from './ProfileHeaderSection'
import { ProfileRolesSection } from './ProfileRolesSection'
import { ProfilePassportsSection } from './ProfilePassportsSection'
import { ProfileActivitiesSection } from './ProfileActivitiesSection'
import { ProfileCitizenSection } from './ProfileCitizenSection'
Expand Down Expand Up @@ -31,7 +30,6 @@ export const ProfileContent = ({
)}
<ProfileAboutSection profile={profile} />
<ProfileCitizenSection isOwnProfile={isOwnProfile} profile={profile} />
<ProfileRolesSection profile={profile} />
<ProfilePassportsSection profile={profile} />
<ProfileActivitiesSection profile={profile} />
</ProfileInnerContainer>
Expand Down
6 changes: 5 additions & 1 deletion components/profile/view-profile/ProfileSetupSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Button } from '@/components/core/Button'
import events from '@/lib/googleAnalytics/events'
import { MeFragment, ProfileSetupStateParams } from '@/utils/types/profile'
import { useBackend } from '@/components/hooks/useBackend'
import { useState } from 'react'

interface ProfileSetupSectionProps {
profileId: string
Expand All @@ -24,13 +25,16 @@ export const ProfileSetupSection = ({
const { post } = useBackend()
const progress = complete ? 100 : 25

if (!me || me.isProfileSetupDismissed) return null
const [hideLinkContainer, setHideLinkContainer] = useState(false)

if (!me || me.isProfileSetupDismissed || hideLinkContainer) return null

const handleSetupClick = () => {
router.push(`/profile/${profileId}/setup`)
}

const handleDismissClick = () => {
setHideLinkContainer(true)
post('PROFILE_SETUP_STATE', {
state: 'dismissed',
} as ProfileSetupStateParams)
Expand Down

0 comments on commit 6e8e44d

Please sign in to comment.