Skip to content

Commit

Permalink
Remove profile picture upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bivillar committed Jan 23, 2020
1 parent ac12bef commit 69dac79
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Removed

- Profile picture upload.

## [1.11.4] - 2020-01-03

### Changed
Expand Down
18 changes: 1 addition & 17 deletions react/components/Menu/ProfilePicture/PictureUploader.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React, { Component, Fragment } from 'react'
import { FormattedMessage } from 'react-intl'
import { graphql } from 'react-apollo'
import { Button, Spinner } from 'vtex.styleguide'
import { GenericError } from 'vtex.my-account-commons'

import UpdateProfilePicture from '../../../graphql/updateProfilePicture.gql'
import BaseDropzone from './BaseDropzone'
import PictureRenderer from './PictureRenderer'

Expand Down Expand Up @@ -36,16 +34,6 @@ class PictureUploader extends Component<Props> {

private handleSaveClick = async (event: any) => {
event.stopPropagation()
const { updateProfilePicture } = this.props
const { file } = this.state
this.setState({ isLoading: true, finishedUpload: false })
try {
await updateProfilePicture({ variables: { file } })
this.setState({ isLoading: false, finishedUpload: true })
} catch (e) {
this.setState({ error: 'alert.unknownError', isLoading: false })
}

this.props.onCloseClick()
}

Expand Down Expand Up @@ -120,12 +108,8 @@ class PictureUploader extends Component<Props> {
}

interface Props {
updateProfilePicture: (args: Variables<UpdateProfilePicture>) => void
currentPicture?: string
onCloseClick: () => void
}

export default graphql<any, {}, {}, Props>(UpdateProfilePicture, {
options: { refetchQueries: ['Greeting'] },
name: 'updateProfilePicture',
})(PictureUploader)
export default PictureUploader
4 changes: 2 additions & 2 deletions react/components/Menu/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { compose, branch, withProps, renderComponent } from 'recompose'
import { FormattedMessage } from 'react-intl'

import GetGreeting from '../../graphql/getGreeting.gql'
import UserPicture from './ProfilePicture/UserPicture'
import UserInfoLoading from './UserInfoLoading'
import styles from '../../styles.css'
import PictureRenderer from './ProfilePicture/PictureRenderer'

const UserInfo: FunctionComponent<Props> = ({ profile }) => {
return (
<div className={`${styles.userInfo} flex flex-wrap items-end mb7`}>
<div className={`${styles.userImage} relative mr5 h3 w3`}>
<UserPicture imagePath={profile.profilePicture} />
<PictureRenderer imagePath={profile.profilePicture} />
</div>
{profile.firstName ? (
<div>
Expand Down
6 changes: 0 additions & 6 deletions react/graphql/updateProfilePicture.gql

This file was deleted.

0 comments on commit 69dac79

Please sign in to comment.