remove unused fields from me fragment (#1466)

This commit is contained in:
Keyan 2024-10-09 11:56:29 -05:00 committed by GitHub
parent 29b3f6008e
commit e48cd61721
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 31 deletions

View File

@ -15,31 +15,16 @@ export const ME = gql`
diagnostics diagnostics
noReferralLinks noReferralLinks
fiatCurrency fiatCurrency
autoWithdrawMaxFeePercent
autoWithdrawThreshold
withdrawMaxFeeDefault
satsFilter satsFilter
hideCowboyHat
hideFromTopUsers hideFromTopUsers
hideGithub
hideNostr
hideTwitter
hideInvoiceDesc
hideIsContributor
hideWalletBalance hideWalletBalance
hideWelcomeBanner hideWelcomeBanner
imgproxyOnly imgproxyOnly
showImagesAndVideos showImagesAndVideos
lastCheckedJobs
nostrCrossposting nostrCrossposting
noteAllDescendants
noteCowboyHat
noteDeposits
noteWithdrawals
noteEarning
noteForwardedSats
noteInvites
noteItemSats
noteJobIndicator
noteMentions
noteItemMentions
sats sats
tipDefault tipDefault
tipRandom tipRandom
@ -50,19 +35,12 @@ export const ME = gql`
zapUndos zapUndos
upvotePopover upvotePopover
wildWestMode wildWestMode
withdrawMaxFeeDefault
lnAddr
autoWithdrawMaxFeePercent
autoWithdrawThreshold
disableFreebies disableFreebies
} }
optional { optional {
isContributor isContributor
stacked stacked
streak streak
githubId
nostrAuthPubkey
twitterId
} }
} }
}` }`

View File

@ -385,14 +385,14 @@ export default function Settings ({ ssrData }) {
groupClassName='mb-0' groupClassName='mb-0'
/> />
<Checkbox <Checkbox
disabled={me.optional.githubId === null} disabled={!settings?.authMethods?.github}
label={ label={
<div className='d-flex align-items-center'>hide my linked github profile <div className='d-flex align-items-center'>hide my linked github profile
<Info> <Info>
<ul> <ul>
<li>Linked accounts are hidden from your profile by default</li> <li>Linked accounts are hidden from your profile by default</li>
<li>uncheck this to display your github on your profile</li> <li>uncheck this to display your github on your profile</li>
{me.optional.githubId === null && {!settings?.authMethods?.github &&
<div className='my-2'> <div className='my-2'>
<li><i>You don't seem to have a linked github account</i></li> <li><i>You don't seem to have a linked github account</i></li>
<ul><li>If this is wrong, try unlinking/relinking</li></ul> <ul><li>If this is wrong, try unlinking/relinking</li></ul>
@ -405,14 +405,14 @@ export default function Settings ({ ssrData }) {
groupClassName='mb-0' groupClassName='mb-0'
/> />
<Checkbox <Checkbox
disabled={me.optional.nostrAuthPubkey === null} disabled={!settings?.authMethods?.nostr}
label={ label={
<div className='d-flex align-items-center'>hide my linked nostr profile <div className='d-flex align-items-center'>hide my linked nostr profile
<Info> <Info>
<ul> <ul>
<li>Linked accounts are hidden from your profile by default</li> <li>Linked accounts are hidden from your profile by default</li>
<li>Uncheck this to display your npub on your profile</li> <li>Uncheck this to display your npub on your profile</li>
{me.optional.nostrAuthPubkey === null && {!settings?.authMethods?.nostr &&
<div className='my-2'> <div className='my-2'>
<li>You don't seem to have a linked nostr account</li> <li>You don't seem to have a linked nostr account</li>
<ul><li>If this is wrong, try unlinking/relinking</li></ul> <ul><li>If this is wrong, try unlinking/relinking</li></ul>
@ -425,14 +425,14 @@ export default function Settings ({ ssrData }) {
groupClassName='mb-0' groupClassName='mb-0'
/> />
<Checkbox <Checkbox
disabled={me.optional.twitterId === null} disabled={!settings?.authMethods?.twitter}
label={ label={
<div className='d-flex align-items-center'>hide my linked twitter profile <div className='d-flex align-items-center'>hide my linked twitter profile
<Info> <Info>
<ul> <ul>
<li>Linked accounts are hidden from your profile by default</li> <li>Linked accounts are hidden from your profile by default</li>
<li>Uncheck this to display your twitter on your profile</li> <li>Uncheck this to display your twitter on your profile</li>
{me.optional.twitterId === null && {!settings?.authMethods?.twitter &&
<div className='my-2'> <div className='my-2'>
<i>You don't seem to have a linked twitter account</i> <i>You don't seem to have a linked twitter account</i>
<ul><li>If this is wrong, try unlinking/relinking</li></ul> <ul><li>If this is wrong, try unlinking/relinking</li></ul>