From e0f20d253d15e29bfe45c21d643dfeee80ceccf7 Mon Sep 17 00:00:00 2001 From: Ruidy Nemausat Date: Thu, 14 May 2020 18:35:22 +0200 Subject: [PATCH] conditional display of social links --- src/pages/EditProfile.tsx | 115 +++++++++++++++++++++----------------- 1 file changed, 63 insertions(+), 52 deletions(-) diff --git a/src/pages/EditProfile.tsx b/src/pages/EditProfile.tsx index e7a3dba..219e04f 100644 --- a/src/pages/EditProfile.tsx +++ b/src/pages/EditProfile.tsx @@ -1,4 +1,4 @@ -import React, {FC} from 'react'; +import React, {FC, useState} from 'react'; import {Link} from 'react-router-dom'; import Routes from '../constants/routes'; // Style @@ -33,6 +33,7 @@ interface InitFormData { * Form to update dev's personal information. */ const EditProfile: FC = () => { + const [showLinks, setShowLinks] = useState(false); const initFormData = { status: '', company: '', @@ -70,6 +71,8 @@ const EditProfile: FC = () => { e.preventDefault(); console.log('Submitted'); }; + + const revealSocialLinks = () => setShowLinks(true); return (
{
- Optional
-
- - -
+ {showLinks && ( + <> +
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
+ + )}