-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modal cleanup and fix Project Migrated bug
- Loading branch information
1 parent
90d193d
commit 575c8c9
Showing
13 changed files
with
317 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
40 changes: 40 additions & 0 deletions
40
web/src/components/ProfileEditFormModal/ProfileEditFormModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react' | ||
import './ProfileEditFormModal.scss' | ||
import Modal from '../Modal/Modal' | ||
import ProfileEditForm from '../ProfileEditForm/ProfileEditForm' | ||
import { Profile } from 'zod-models' | ||
import { WireRecord } from '../../api/hdkCrud' | ||
import { AgentPubKeyB64 } from '../../types/shared' | ||
|
||
export type ProfileEditFormModalProps = { | ||
active: boolean | ||
onClose: () => void | ||
onProfileSubmit: (profile: Profile) => Promise<void> | ||
whoami: WireRecord<Profile> | ||
agentAddress: AgentPubKeyB64 | ||
} | ||
|
||
const ProfileEditFormModal: React.FC<ProfileEditFormModalProps> = ({ | ||
active, | ||
whoami, | ||
agentAddress, | ||
onClose, | ||
onProfileSubmit, | ||
}) => { | ||
return ( | ||
<Modal white active={active} onClose={onClose}> | ||
<ProfileEditForm | ||
onSubmit={onProfileSubmit} | ||
whoami={whoami ? whoami.entry : null} | ||
pending={false} | ||
pendingText={'Submitting...'} | ||
titleText={'Profile Settings'} | ||
subText={''} | ||
submitText={'Save Changes'} | ||
agentAddress={agentAddress} | ||
/> | ||
</Modal> | ||
) | ||
} | ||
|
||
export default ProfileEditFormModal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.