From 90be951ac44cf27922faf46d04e31fb2c9a5c972 Mon Sep 17 00:00:00 2001
From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>
Date: Tue, 23 Apr 2024 16:59:15 +0500
Subject: [PATCH] refactor: resolved lint issues
---
src/profile/forms/SocialLinks.jsx | 204 +++++++++++++++---------------
1 file changed, 102 insertions(+), 102 deletions(-)
diff --git a/src/profile/forms/SocialLinks.jsx b/src/profile/forms/SocialLinks.jsx
index 19b728260..f7d178ecd 100644
--- a/src/profile/forms/SocialLinks.jsx
+++ b/src/profile/forms/SocialLinks.jsx
@@ -33,6 +33,108 @@ const platformDisplayInfo = {
},
};
+const SocialLink = ({ url, name, platform }) => (
+
+
+ {name}
+
+);
+
+SocialLink.propTypes = {
+ url: PropTypes.string.isRequired,
+ platform: PropTypes.string.isRequired,
+ name: PropTypes.string.isRequired,
+};
+
+const EditableListItem = ({
+ url, platform, onClickEmptyContent, name,
+}) => {
+ const linkDisplay = url ? (
+
+ ) : (
+ Add {name}
+ );
+
+ return
{linkDisplay};
+};
+
+EditableListItem.propTypes = {
+ url: PropTypes.string,
+ platform: PropTypes.string.isRequired,
+ name: PropTypes.string.isRequired,
+ onClickEmptyContent: PropTypes.func,
+};
+EditableListItem.defaultProps = {
+ url: null,
+ onClickEmptyContent: null,
+};
+
+const EditingListItem = ({
+ platform, name, value, onChange, error,
+}) => (
+
+
+
+
+);
+
+EditingListItem.propTypes = {
+ platform: PropTypes.string.isRequired,
+ value: PropTypes.string,
+ name: PropTypes.string.isRequired,
+ onChange: PropTypes.func.isRequired,
+ error: PropTypes.string,
+};
+
+EditingListItem.defaultProps = {
+ value: null,
+ error: null,
+};
+
+const EmptyListItem = ({ onClick, name }) => (
+
+
+
+
+
+);
+
+EmptyListItem.propTypes = {
+ name: PropTypes.string.isRequired,
+ onClick: PropTypes.func.isRequired,
+};
+
+const StaticListItem = ({ name, url, platform }) => (
+
+
+
+);
+
+StaticListItem.propTypes = {
+ name: PropTypes.string.isRequired,
+ url: PropTypes.string,
+ platform: PropTypes.string.isRequired,
+};
+
+StaticListItem.defaultProps = {
+ url: null,
+};
+
class SocialLinks extends React.Component {
constructor(props) {
super(props);
@@ -243,105 +345,3 @@ export default connect(
editableFormSelector,
{},
)(injectIntl(SocialLinks));
-
-const SocialLink = ({ url, name, platform }) => (
-
-
- {name}
-
-);
-
-SocialLink.propTypes = {
- url: PropTypes.string.isRequired,
- platform: PropTypes.string.isRequired,
- name: PropTypes.string.isRequired,
-};
-
-const EditableListItem = ({
- url, platform, onClickEmptyContent, name,
-}) => {
- const linkDisplay = url ? (
-
- ) : (
- Add {name}
- );
-
- return {linkDisplay};
-};
-
-EditableListItem.propTypes = {
- url: PropTypes.string,
- platform: PropTypes.string.isRequired,
- name: PropTypes.string.isRequired,
- onClickEmptyContent: PropTypes.func,
-};
-EditableListItem.defaultProps = {
- url: null,
- onClickEmptyContent: null,
-};
-
-const EditingListItem = ({
- platform, name, value, onChange, error,
-}) => (
-
-
-
-
-);
-
-EditingListItem.propTypes = {
- platform: PropTypes.string.isRequired,
- value: PropTypes.string,
- name: PropTypes.string.isRequired,
- onChange: PropTypes.func.isRequired,
- error: PropTypes.string,
-};
-
-EditingListItem.defaultProps = {
- value: null,
- error: null,
-};
-
-const EmptyListItem = ({ onClick, name }) => (
-
-
-
-
-
-);
-
-EmptyListItem.propTypes = {
- name: PropTypes.string.isRequired,
- onClick: PropTypes.func.isRequired,
-};
-
-const StaticListItem = ({ name, url, platform }) => (
-
-
-
-);
-
-StaticListItem.propTypes = {
- name: PropTypes.string.isRequired,
- url: PropTypes.string,
- platform: PropTypes.string.isRequired,
-};
-
-StaticListItem.defaultProps = {
- url: null,
-};