{"action":"created","comment":{"url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/comments/241942704","pull_request_review_id":185347585,"id":241942704,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTk0MjcwNA==","diff_hunk":"@@ -47,89 +54,91 @@ class Profile extends React.Component {\n         error: err.message\n       })\n     }\n+    this.setState(this.initialState);\n   }\n \n   render() {\n     const { user } = this.props;\n     const update = this.state;\n \n-    return (\n-      <div className=\"container\">\n+    return <>\n+        {this.state.error && (\n+          <p className=\"notification is-danger\">{this.state.error}</p>\n+        )}\n+        <div className=\"container\">\n \n-        <div className=\"columns\">\n-          <div className=\"column\">\n-            <p>username: {user.username}</p>\n-            <p>bio: {user.bio}</p>\n-          </div>\n+          <div className=\"columns\">\n+            <div className=\"column\">\n+              <p>username: {user.username}</p>\n+              <p>bio: {user.bio}</p>\n+            </div>\n \n-          <div className=\"column\">\n-            <form action=\"\">\n-              <h1>Update profile</h1>\n-\n-              <div className=\"field\">\n-                <label htmlFor=\"\" className=\"label\">username</label>\n-                <div className=\"control\">\n-                  <input\n-                    type=\"text\"\n-                    name=\"username\"\n-                    className=\"input\"\n-                    onChange={this.handleChange}\n-                    placeholder={user.username}\n-                    value={update.username} />\n-                </div>\n-              </div>\n-\n-              <div className=\"field\">\n-                <label htmlFor=\"\" className=\"label\">bio</label>\n-                <div className=\"control\">\n-                  <textarea\n-                    type=\"text\"\n-                    name=\"bio\"\n-                    className=\"textarea\"\n-                    onChange={this.handleChange}\n-                    placeholder={user.bio}\n-                    value={update.bio} />\n+            <div className=\"column\">\n+              <form onSubmit={this.handleSubmit} encType=\"multipart/form-data\">\n+                <h1>Update profile</h1>\n+\n+                <div className=\"field\">\n+                  <label htmlFor=\"\" className=\"label\">username</label>\n+                  <div className=\"control\">\n+                    <input\n+                      type=\"text\"\n+                      name=\"username\"\n+                      className=\"input\"\n+                      onChange={this.handleChange}\n+                      placeholder={user.username}\n+                      value={update.username} />\n+                  </div>\n                 </div>\n-              </div>\n-\n-              <div className=\"field\">\n-                <div class=\"file has-name\">\n-                  <label class=\"file-label\">\n-                    <input \n-                      className=\"file-input\" \n-                      type=\"file\" \n-                      name=\"profile_image\"\n-                      onChange={this.handleFileUpload} />\n-                      <span class=\"file-cta\">\n-                        <span class=\"file-icon\">\n-                          📷\n-                        </span>\n-                        <span class=\"file-label\">\n-                          Choose a file…\n-                        </span>\n-                      </span>\n-                      <span className=\"file-name\">\n-                        {this.state.image_upload\n-                        ? this.state.image_name\n-                        : <>\n-                            no image uploaded\n-                          </>}\n-                      </span>\n-                  </label>\n-                </div>  \n-              </div>\n \n                 <div className=\"field\">\n+                  <label htmlFor=\"\" className=\"label\">bio</label>\n                   <div className=\"control\">\n-                    <button className=\"button\" type=\"submit\" value=\"submit\">Update</button>\n+                    <textarea\n+                      type=\"text\"\n+                      name=\"bio\"\n+                      className=\"textarea\"\n+                      onChange={this.handleChange}\n+                      placeholder={user.bio}\n+                      value={update.bio} />\n                   </div>\n                 </div>\n-            </form>\n-          </div>\n-          </div>\n \n-        </div>\n-        );\n+                <div className=\"field\">\n+                  <div className=\"file has-name is-fullwidth\">\n+                    <label className=\"file-label\">\n+                      <input \n+                        className=\"file-input\" \n+                        type=\"file\" \n+                        name=\"profile_image\"\n+                        onChange={this.handleFileUpload} />\n+                        <span className=\"file-cta\">\n+                          <span aria-label=\"Camera\" roll=\"img\" className=\"file-icon\">📷</span>\n+                          <span className=\"file-label\">\n+                            Choose a file…\n+                          </span>\n+                        </span>\n+                        <span className=\"file-name\">\n+                          {this.state.profile_image\n+                          ? this.state.image_name\n+                          : <>\n+                              no image uploaded\n+                            </>}","path":"client/src/components/pages/Account/Profile.jsx","position":195,"original_position":195,"commit_id":"ffa6932876faa304d8bd4b25e0153ac98aeb03f6","original_commit_id":"ffa6932876faa304d8bd4b25e0153ac98aeb03f6","user":{"login":"benwaffle","id":1713819,"node_id":"MDQ6VXNlcjE3MTM4MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1713819?v=4","gravatar_id":"","url":"https://api.github.com/users/benwaffle","html_url":"https://github.com/benwaffle","followers_url":"https://api.github.com/users/benwaffle/followers","following_url":"https://api.github.com/users/benwaffle/following{/other_user}","gists_url":"https://api.github.com/users/benwaffle/gists{/gist_id}","starred_url":"https://api.github.com/users/benwaffle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwaffle/subscriptions","organizations_url":"https://api.github.com/users/benwaffle/orgs","repos_url":"https://api.github.com/users/benwaffle/repos","events_url":"https://api.github.com/users/benwaffle/events{/privacy}","received_events_url":"https://api.github.com/users/benwaffle/received_events","type":"User","site_admin":false},"body":"use a string `'no image uploaded'`, not a fragment","created_at":"2018-12-15T08:40:54Z","updated_at":"2018-12-15T08:43:00Z","html_url":"https://github.com/cbouwense/CS554_Final_Project/pull/35#discussion_r241942704","pull_request_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/35","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/comments/241942704"},"html":{"href":"https://github.com/cbouwense/CS554_Final_Project/pull/35#discussion_r241942704"},"pull_request":{"href":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/35","id":238884781,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4ODg0Nzgx","html_url":"https://github.com/cbouwense/CS554_Final_Project/pull/35","diff_url":"https://github.com/cbouwense/CS554_Final_Project/pull/35.diff","patch_url":"https://github.com/cbouwense/CS554_Final_Project/pull/35.patch","issue_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/issues/35","number":35,"state":"open","locked":false,"title":"upload profile images to s3, update user in backend","user":{"login":"mrota97","id":16786116,"node_id":"MDQ6VXNlcjE2Nzg2MTE2","avatar_url":"https://avatars3.githubusercontent.com/u/16786116?v=4","gravatar_id":"","url":"https://api.github.com/users/mrota97","html_url":"https://github.com/mrota97","followers_url":"https://api.github.com/users/mrota97/followers","following_url":"https://api.github.com/users/mrota97/following{/other_user}","gists_url":"https://api.github.com/users/mrota97/gists{/gist_id}","starred_url":"https://api.github.com/users/mrota97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrota97/subscriptions","organizations_url":"https://api.github.com/users/mrota97/orgs","repos_url":"https://api.github.com/users/mrota97/repos","events_url":"https://api.github.com/users/mrota97/events{/privacy}","received_events_url":"https://api.github.com/users/mrota97/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-15T02:16:28Z","updated_at":"2018-12-15T08:43:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[{"login":"keyurved","id":14223964,"node_id":"MDQ6VXNlcjE0MjIzOTY0","avatar_url":"https://avatars3.githubusercontent.com/u/14223964?v=4","gravatar_id":"","url":"https://api.github.com/users/keyurved","html_url":"https://github.com/keyurved","followers_url":"https://api.github.com/users/keyurved/followers","following_url":"https://api.github.com/users/keyurved/following{/other_user}","gists_url":"https://api.github.com/users/keyurved/gists{/gist_id}","starred_url":"https://api.github.com/users/keyurved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keyurved/subscriptions","organizations_url":"https://api.github.com/users/keyurved/orgs","repos_url":"https://api.github.com/users/keyurved/repos","events_url":"https://api.github.com/users/keyurved/events{/privacy}","received_events_url":"https://api.github.com/users/keyurved/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/35/commits","review_comments_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/35/comments","review_comment_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/issues/35/comments","statuses_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/statuses/ffa6932876faa304d8bd4b25e0153ac98aeb03f6","head":{"label":"cbouwense:page/profile","ref":"page/profile","sha":"ffa6932876faa304d8bd4b25e0153ac98aeb03f6","user":{"login":"cbouwense","id":6403586,"node_id":"MDQ6VXNlcjY0MDM1ODY=","avatar_url":"https://avatars3.githubusercontent.com/u/6403586?v=4","gravatar_id":"","url":"https://api.github.com/users/cbouwense","html_url":"https://github.com/cbouwense","followers_url":"https://api.github.com/users/cbouwense/followers","following_url":"https://api.github.com/users/cbouwense/following{/other_user}","gists_url":"https://api.github.com/users/cbouwense/gists{/gist_id}","starred_url":"https://api.github.com/users/cbouwense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbouwense/subscriptions","organizations_url":"https://api.github.com/users/cbouwense/orgs","repos_url":"https://api.github.com/users/cbouwense/repos","events_url":"https://api.github.com/users/cbouwense/events{/privacy}","received_events_url":"https://api.github.com/users/cbouwense/received_events","type":"User","site_admin":false},"repo":{"id":155435654,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU0MzU2NTQ=","name":"CS554_Final_Project","full_name":"cbouwense/CS554_Final_Project","private":false,"owner":{"login":"cbouwense","id":6403586,"node_id":"MDQ6VXNlcjY0MDM1ODY=","avatar_url":"https://avatars3.githubusercontent.com/u/6403586?v=4","gravatar_id":"","url":"https://api.github.com/users/cbouwense","html_url":"https://github.com/cbouwense","followers_url":"https://api.github.com/users/cbouwense/followers","following_url":"https://api.github.com/users/cbouwense/following{/other_user}","gists_url":"https://api.github.com/users/cbouwense/gists{/gist_id}","starred_url":"https://api.github.com/users/cbouwense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbouwense/subscriptions","organizations_url":"https://api.github.com/users/cbouwense/orgs","repos_url":"https://api.github.com/users/cbouwense/repos","events_url":"https://api.github.com/users/cbouwense/events{/privacy}","received_events_url":"https://api.github.com/users/cbouwense/received_events","type":"User","site_admin":false},"html_url":"https://github.com/cbouwense/CS554_Final_Project","description":"Fitness tracking web app","fork":false,"url":"https://api.github.com/repos/cbouwense/CS554_Final_Project","forks_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/forks","keys_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/teams","hooks_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/hooks","issue_events_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/issues/events{/number}","events_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/events","assignees_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/assignees{/user}","branches_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/branches{/branch}","tags_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/tags","blobs_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/statuses/{sha}","languages_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/languages","stargazers_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/stargazers","contributors_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/contributors","subscribers_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/subscribers","subscription_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/subscription","commits_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/contents/{+path}","compare_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/merges","archive_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/downloads","issues_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/issues{/number}","pulls_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls{/number}","milestones_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/milestones{/number}","notifications_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/labels{/name}","releases_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/releases{/id}","deployments_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/deployments","created_at":"2018-10-30T18:22:01Z","updated_at":"2018-12-15T00:00:08Z","pushed_at":"2018-12-15T02:16:29Z","git_url":"git://github.com/cbouwense/CS554_Final_Project.git","ssh_url":"git@github.com:cbouwense/CS554_Final_Project.git","clone_url":"https://github.com/cbouwense/CS554_Final_Project.git","svn_url":"https://github.com/cbouwense/CS554_Final_Project","homepage":null,"size":667,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"cbouwense:master","ref":"master","sha":"c5ccd2d6a3adf577f36a4e1e90a5300940e90ae0","user":{"login":"cbouwense","id":6403586,"node_id":"MDQ6VXNlcjY0MDM1ODY=","avatar_url":"https://avatars3.githubusercontent.com/u/6403586?v=4","gravatar_id":"","url":"https://api.github.com/users/cbouwense","html_url":"https://github.com/cbouwense","followers_url":"https://api.github.com/users/cbouwense/followers","following_url":"https://api.github.com/users/cbouwense/following{/other_user}","gists_url":"https://api.github.com/users/cbouwense/gists{/gist_id}","starred_url":"https://api.github.com/users/cbouwense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbouwense/subscriptions","organizations_url":"https://api.github.com/users/cbouwense/orgs","repos_url":"https://api.github.com/users/cbouwense/repos","events_url":"https://api.github.com/users/cbouwense/events{/privacy}","received_events_url":"https://api.github.com/users/cbouwense/received_events","type":"User","site_admin":false},"repo":{"id":155435654,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU0MzU2NTQ=","name":"CS554_Final_Project","full_name":"cbouwense/CS554_Final_Project","private":false,"owner":{"login":"cbouwense","id":6403586,"node_id":"MDQ6VXNlcjY0MDM1ODY=","avatar_url":"https://avatars3.githubusercontent.com/u/6403586?v=4","gravatar_id":"","url":"https://api.github.com/users/cbouwense","html_url":"https://github.com/cbouwense","followers_url":"https://api.github.com/users/cbouwense/followers","following_url":"https://api.github.com/users/cbouwense/following{/other_user}","gists_url":"https://api.github.com/users/cbouwense/gists{/gist_id}","starred_url":"https://api.github.com/users/cbouwense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbouwense/subscriptions","organizations_url":"https://api.github.com/users/cbouwense/orgs","repos_url":"https://api.github.com/users/cbouwense/repos","events_url":"https://api.github.com/users/cbouwense/events{/privacy}","received_events_url":"https://api.github.com/users/cbouwense/received_events","type":"User","site_admin":false},"html_url":"https://github.com/cbouwense/CS554_Final_Project","description":"Fitness tracking web app","fork":false,"url":"https://api.github.com/repos/cbouwense/CS554_Final_Project","forks_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/forks","keys_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/teams","hooks_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/hooks","issue_events_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/issues/events{/number}","events_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/events","assignees_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/assignees{/user}","branches_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/branches{/branch}","tags_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/tags","blobs_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/statuses/{sha}","languages_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/languages","stargazers_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/stargazers","contributors_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/contributors","subscribers_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/subscribers","subscription_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/subscription","commits_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/contents/{+path}","compare_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/merges","archive_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/downloads","issues_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/issues{/number}","pulls_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls{/number}","milestones_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/milestones{/number}","notifications_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/labels{/name}","releases_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/releases{/id}","deployments_url":"https://api.github.com/repos/cbouwense/CS554_Final_Project/deployments","created_at":"2018-10-30T18:22:01Z","updated_at":"2018-12-15T00:00:08Z","pushed_at":"2018-12-15T02:16:29Z","git_url":"git://github.com/cbouwense/CS554_Final_Project.git","ssh_url":"git@github.com:cbouwense/CS554_Final_Project.git","clone_url":"https://github.com/cbouwense/CS554_Final_Project.git","svn_url":"https://github.com/cbouwense/CS554_Final_Project","homepage":null,"size":667,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/35"},"html":{"href":"https://github.com/cbouwense/CS554_Final_Project/pull/35"},"issue":{"href":"https://api.github.com/repos/cbouwense/CS554_Final_Project/issues/35"},"comments":{"href":"https://api.github.com/repos/cbouwense/CS554_Final_Project/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cbouwense/CS554_Final_Project/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/cbouwense/CS554_Final_Project/statuses/ffa6932876faa304d8bd4b25e0153ac98aeb03f6"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"benwaffle"}}