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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user