Skip to content

Commit

Permalink
Fix project owner field create flow (#4098)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyd-eth authored Oct 17, 2023
1 parent cb9647d commit 2dd53f3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { t } from '@lingui/macro'
import { Trans, t } from '@lingui/macro'
import EthereumAddress from 'components/EthereumAddress'
import ProjectLogo from 'components/ProjectLogo'
import { ProjectTagsList } from 'components/ProjectTags/ProjectTagsList'
import { RichPreview } from 'components/RichPreview'
import { useWallet } from 'hooks/Wallet'
import { useMemo } from 'react'
import { useAppSelector } from 'redux/hooks/useAppSelector'
import { wrapNonAnchorsInAnchor } from 'utils/wrapNonAnchorsInAnchor'
import { ReviewDescription } from '../ReviewDescription'

export const ProjectDetailsReview = () => {
const { userAddress } = useWallet()
const {
projectMetadata: {
description,
Expand All @@ -25,6 +27,8 @@ export const ProjectDetailsReview = () => {
inputProjectOwner,
} = useAppSelector(state => state.editingV2Project)

const ownerAddress = inputProjectOwner ?? userAddress

const wrappedDescription = useMemo(() => {
if (!description) return undefined
return wrapNonAnchorsInAnchor(description)
Expand Down Expand Up @@ -123,7 +127,13 @@ export const ProjectDetailsReview = () => {
{/* END: Bottom */}
<ReviewDescription
title={t`Project owner`}
desc={<EthereumAddress address={inputProjectOwner} />}
desc={
ownerAddress ? (
<EthereumAddress address={ownerAddress} />
) : (
<Trans>Wallet not connected</Trans>
)
}
/>
</div>
)
Expand Down
3 changes: 3 additions & 0 deletions src/locales/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ msgstr ""
msgid "Extensible"
msgstr ""

msgid "Wallet not connected"
msgstr ""

msgid "Projects using a reserved rate of {reservedRateRiskyMin}% or more will appear risky to contributors, as a relatively small number of tokens will be received in exchange for paying your project."
msgstr ""

Expand Down

0 comments on commit 2dd53f3

Please sign in to comment.