Skip to content

Commit

Permalink
fix: update styling and other improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sajald77 committed Oct 31, 2023
1 parent 9528c49 commit eee9e11
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
8 changes: 4 additions & 4 deletions src/pages/projectDashboard/ProjectDashboard.tsx
Expand Up @@ -37,14 +37,14 @@ export const projectSections: Record<string, DashboardSection> = {
label: 'Connect wallet',
path: 'dashboardWallet',
},
settings: {
label: 'Project settings',
path: 'dashboardSettings',
},
nostr: {
label: 'Nostr settings',
path: 'dashboardNostr',
},
settings: {
label: 'Project settings',
path: 'dashboardSettings',
},
}

const sections = { ...projectSections }
Expand Down
Expand Up @@ -31,7 +31,7 @@ export const ExportNostrKeysModal = ({

const { loading, data } = useProjectNostrKeysQuery({
variables: { where: { id: projectId } },
skip: !projectId,
skip: !projectId || !isOpen,
})

const projectNostrKeys = data?.projectGet?.keys.nostrKeys
Expand Down
4 changes: 0 additions & 4 deletions src/pages/projectDashboard/sections/ProjectNostrSettings.tsx
Expand Up @@ -89,10 +89,6 @@ export const ProjectNostrSettings = () => {
borderRadius={'8px'}
alignItems="flex-start"
>
<Input
width="full"
value={`nsec***********************************************`}
/>
<Body2 color="secondary.red">
{t(
'Warning: Before exporting your private keys, make sure to read the following message.',
Expand Down
21 changes: 12 additions & 9 deletions src/pages/projectView/projectMainBody/components/NpubDisplay.tsx
Expand Up @@ -8,9 +8,10 @@ import { copyTextToClipboard } from '../../../../utils'

interface NpubDisplayProps extends ButtonProps {
npub: string
iconOnly?: boolean
}

export const NpubDisplay = ({ npub, ...rest }: NpubDisplayProps) => {
export const NpubDisplay = ({ npub, iconOnly, ...rest }: NpubDisplayProps) => {
const { t } = useTranslation()
const [copy, setCopy] = useState(false)

Expand Down Expand Up @@ -53,14 +54,16 @@ export const NpubDisplay = ({ npub, ...rest }: NpubDisplayProps) => {
color={'neutral.600'}
/>
}
<Body1
semiBold
isTruncated
onClick={handleOnCopy}
color={'neutral.600'}
>
{`${text}`}
</Body1>
{!iconOnly && (
<Body1
semiBold
isTruncated
onClick={handleOnCopy}
color={'neutral.600'}
>
{`${text}`}
</Body1>
)}
</HStack>
</Button>
</Tooltip>
Expand Down
Expand Up @@ -9,7 +9,10 @@ import { useExternalAccountsButtons } from '../../../../hooks/useExternalAccount
import { NpubDisplay } from '../components/NpubDisplay'

export const CreatorSocial = () => {
const isMd = useBreakpointValue({ base: false, md: true }, { ssr: false })
const isMd = useBreakpointValue(
{ base: true, sm: false, md: false, lg: true, xl: false },
{ ssr: false },
)
const { project } = useProjectContext()

const user = project?.owners[0]?.user
Expand Down Expand Up @@ -55,7 +58,7 @@ export const CreatorSocial = () => {
}

if (key === 'nostr') {
return <NpubDisplay key={index} npub={username} />
return <NpubDisplay key={index} npub={username} iconOnly={isMd} />
}

return (
Expand All @@ -73,7 +76,7 @@ export const CreatorSocial = () => {
py={1}
>
{icon}
{isMd ? (
{!isMd ? (
<Body1 semiBold ml={2} maxW="12em" isTruncated>
{username}
</Body1>
Expand Down
5 changes: 3 additions & 2 deletions src/translations/English.json
Expand Up @@ -733,6 +733,7 @@
"Handle the key with a lot of care. Anyone holding the private key can post on the project's behalf. If you leak your private key, the project risks being compromised, and there is nothing Geyser can do to prevent it.": "Handle the key with a lot of care. Anyone holding the private key can post on the project's behalf. If you leak your private key, the project risks being compromised, and there is nothing Geyser can do to prevent it.",
"The Relays": "The Relays",
"These are the relays that we publish to.": "These are the relays that we publish to.",
"Copy Lightning Address / Nostr identifier (NIP-05)'":"Copy Lightning Address / Nostr identifier (NIP-05)"

"Copy Lightning Address / Nostr identifier (NIP-05)":"Copy Lightning Address / Nostr identifier (NIP-05)",
"Share":"Share",
"followers":"followers"
}

0 comments on commit eee9e11

Please sign in to comment.