Add profile pictures to people and fix account/workspace deletion (#984)

* Fix LinkedIn URL not redirecting to the right url

* add avatars for people and seeds

* Fix delete account/workspace

* Add people picture on other pages

* Change style of delete button

* Revert modal to previous size

* Fix tests
This commit is contained in:
Félix Malfait
2023-07-28 15:40:03 -07:00
committed by GitHub
parent 557e56492a
commit 5c376cbabb
24 changed files with 184 additions and 93 deletions
@@ -1,4 +1,4 @@
import { useState } from 'react';
import { ReactNode, useState } from 'react';
import styled from '@emotion/styled';
import { AnimatePresence, LayoutGroup } from 'framer-motion';
import { useRecoilValue } from 'recoil';
@@ -12,7 +12,7 @@ import { debounce } from '~/utils/debounce';
interface DeleteModalProps {
isOpen: boolean;
title: string;
subtitle: string;
subtitle: ReactNode;
setIsOpen: (val: boolean) => void;
handleConfirmDelete: () => void;
deleteButtonText?: string;
@@ -23,6 +23,10 @@ const StyledTitle = styled.div`
font-weight: ${({ theme }) => theme.font.weight.semiBold};
`;
const StyledSubtitle = styled.div`
text-align: center;
`;
const StyledModal = styled(Modal)`
color: ${({ theme }) => theme.font.color.primary};
> * + * {
@@ -70,22 +74,18 @@ export function DeleteModal({
250,
);
const errorMessage =
email && !isValidEmail ? 'email provided is not correct' : '';
return (
<AnimatePresence mode="wait">
<LayoutGroup>
<StyledModal isOpen={isOpen}>
<StyledModal isOpen={isOpen} onOutsideClick={() => setIsOpen(!isOpen)}>
<StyledTitle>{title}</StyledTitle>
<div>{subtitle}</div>
<StyledSubtitle>{subtitle}</StyledSubtitle>
<TextInput
value={email}
onChange={handleEmailChange}
placeholder={userEmail}
fullWidth
key={'email-' + userEmail}
error={errorMessage}
/>
<StyledDeleteButton
onClick={handleConfirmDelete}