a tool for shared writing and social publishing
0

Configure Feed

Select the types of activity you want to include in your feed.

don't show email if no newsletter mode

Jared Pereira (Apr 30, 2026, 5:23 PM EDT) 4c1fd1aa 7026174b

+37 -37
+37 -37
components/Subscribe/SubscribeButton.tsx
··· 138 138 user={user} 139 139 /> 140 140 141 - {/*{props.newsletterMode && 141 + {props.newsletterMode && 142 142 user.atprotoSubscribed && 143 - !user.emailSubscribed ? (*/} 144 - <div 145 - className="text-secondary w-full text-sm p-2 pt-1.5 mt-1 rounded-md flex flex-col gap-1" 146 - style={{ 147 - background: 148 - "color-mix(in oklab, rgb(var(--accent-contrast)), rgb(var(--bg-page)) 70%", 149 - }} 150 - > 151 - <div className="font-bold">Opt in to get updates via email!</div> 152 - <div className="max-w-sm w-full mx-auto"> 153 - <EmailInput 154 - value={email} 155 - onChange={setEmail} 156 - disabled={user.loggedIn && !!user.email} 157 - autoFocus={props.autoFocus} 158 - loading={requesting} 159 - action={ 160 - <ButtonPrimary 161 - compact 162 - className="leading-tight! outline-none! text-sm!" 163 - disabled={requesting || !email} 164 - onClick={async () => { 165 - if (requesting) return; 166 - if (needsLinkConfirmation) { 167 - setLinkModalOpen(true); 168 - return; 169 - } 170 - await sendRequest(false); 171 - }} 172 - > 173 - Get Emails 174 - </ButtonPrimary> 175 - } 176 - /> 143 + !user.emailSubscribed ? ( 144 + <div 145 + className="text-secondary w-full text-sm p-2 pt-1.5 mt-1 rounded-md flex flex-col gap-1" 146 + style={{ 147 + background: 148 + "color-mix(in oklab, rgb(var(--accent-contrast)), rgb(var(--bg-page)) 70%", 149 + }} 150 + > 151 + <div className="font-bold">Opt in to get updates via email!</div> 152 + <div className="max-w-sm w-full mx-auto"> 153 + <EmailInput 154 + value={email} 155 + onChange={setEmail} 156 + disabled={user.loggedIn && !!user.email} 157 + autoFocus={props.autoFocus} 158 + loading={requesting} 159 + action={ 160 + <ButtonPrimary 161 + compact 162 + className="leading-tight! outline-none! text-sm!" 163 + disabled={requesting || !email} 164 + onClick={async () => { 165 + if (requesting) return; 166 + if (needsLinkConfirmation) { 167 + setLinkModalOpen(true); 168 + return; 169 + } 170 + await sendRequest(false); 171 + }} 172 + > 173 + Get Emails 174 + </ButtonPrimary> 175 + } 176 + /> 177 + </div> 177 178 </div> 178 - </div> 179 - {/*) : null}*/} 179 + ) : null} 180 180 </> 181 181 ) : props.newsletterMode ? ( 182 182 <div className="max-w-sm w-full mx-auto">