From 2b94b40bf38d674414174910289e9955cd5c9f92 Mon Sep 17 00:00:00 2001 From: Ariful Alam Date: Sat, 19 Mar 2022 15:50:29 +0600 Subject: [PATCH] Change style of details section --- src/components/details/index.jsx | 228 +++++++++++++++++-------------- 1 file changed, 127 insertions(+), 101 deletions(-) diff --git a/src/components/details/index.jsx b/src/components/details/index.jsx index 4d0f300..5a4e67c 100644 --- a/src/components/details/index.jsx +++ b/src/components/details/index.jsx @@ -12,11 +12,25 @@ import { FaGlobe, } from 'react-icons/fa'; import PropTypes from 'prop-types'; -import { useContext } from 'react'; +import { Fragment, useContext } from 'react'; import { LoadingContext } from '../../contexts/LoadingContext'; import { skeleton } from '../../helpers/utils'; import config from '../../ezprofile.config'; +const ListItem = ({ icon, title, value, link }) => { + return ( +
+ {icon} +
{title}
+ +
+ ); +}; + const Details = (props) => { const [loading] = useContext(LoadingContext); @@ -39,108 +53,78 @@ const Details = (props) => { return (
-
    + {loading || !props.profile ? ( + renderSkeleton() + ) : ( +
    + {props.profile.location && ( + } + title="Based on" + value={props.profile.location} + /> + )} + {props.profile.company && ( + } + title="Company" + value={props.profile.company} + /> + )} + } + title="GitHub" + value={config.github.username} + link={`https://github.com/${config.github.username}`} + /> + {typeof config.social.twitter !== 'undefined' && + config.social.twitter && ( + } + title="Twitter" + value={config.social.twitter} + link={`https://twitter.com/${config.social.twitter}`} + /> + )} + {typeof config.social.linkedin !== 'undefined' && + config.social.linkedin && ( + } + title="LinkedIn" + value={config.social.linkedin} + link={`https://www.linkedin.com/in/${config.social.linkedin}`} + /> + )} + {typeof config.social.dribbble !== 'undefined' && + config.social.dribbble && ( + } + title="Dribbble" + value={config.social.dribbble} + link={`https://dribbble.com/${config.social.dribbble}`} + /> + )} + {typeof config.social.behance !== 'undefined' && + config.social.behance && ( + } + title="Behance" + value={config.social.behance} + link={`https://www.behance.net/${config.social.behance}`} + /> + )} +
    + )} + {/*
      {loading || !props.profile ? ( renderSkeleton() ) : ( <> - {props.profile.location && ( -
    • - -
      - -
      -
      {props.profile.location}
      -
      -
    • - )} - {props.profile.company && ( -
    • - -
      - -
      -
      {props.profile.company}
      -
      -
    • - )} -
    • - -
      - -
      - -
      -
    • - {typeof config.social.linkedin !== 'undefined' && - config.social.linkedin && ( -
    • - -
      - -
      - -
      -
    • - )} - {typeof config.social.twitter !== 'undefined' && - config.social.twitter && ( -
    • - -
      - -
      - -
      -
    • - )} - {typeof config.social.dribbble !== 'undefined' && - config.social.dribbble && ( -
    • - -
      - -
      - -
      -
    • - )} + + + + + {typeof config.social.behance !== 'undefined' && config.social.behance && (
    • @@ -150,7 +134,7 @@ const Details = (props) => {
{ )} )} - + */} + + {/*
+
+ + + +
Based on
+
+ London +
+
+
+ +
Taylor Otwell
+
+ Member +
+
+
+ +
Adam Wathan
+
+ Member +
+
+
+ +
+ Duke Street Studio Inc. +
+
+ Team +
+
+
+ +
Jeffrey Wey
+
+ Member +
+
+
*/}
);