mirror of
https://github.com/dergigi/boris.git
synced 2025-12-20 16:14:20 +01:00
feat: add ants link to empty writings state for other users
- Update empty writings message for other users' profiles - Show 'No articles written. You can find other stuff from this user using ants.' - Link 'ants' to the ants.sh profile page for that user - Keep original message for own profile
This commit is contained in:
@@ -23,6 +23,7 @@ import { getCachedMeData, setCachedMeData, updateCachedHighlights } from '../ser
|
|||||||
import { faBooks } from '../icons/customIcons'
|
import { faBooks } from '../icons/customIcons'
|
||||||
import { usePullToRefresh } from '../hooks/usePullToRefresh'
|
import { usePullToRefresh } from '../hooks/usePullToRefresh'
|
||||||
import PullToRefreshIndicator from './PullToRefreshIndicator'
|
import PullToRefreshIndicator from './PullToRefreshIndicator'
|
||||||
|
import { getProfileUrl } from '../config/nostrGateways'
|
||||||
|
|
||||||
interface MeProps {
|
interface MeProps {
|
||||||
relayPool: RelayPool
|
relayPool: RelayPool
|
||||||
@@ -311,7 +312,24 @@ const Me: React.FC<MeProps> = ({ relayPool, activeTab: propActiveTab, pubkey: pr
|
|||||||
case 'writings':
|
case 'writings':
|
||||||
return writings.length === 0 ? (
|
return writings.length === 0 ? (
|
||||||
<div className="explore-empty">
|
<div className="explore-empty">
|
||||||
<p>No articles written yet. Publish your first article to see it here!</p>
|
<p>
|
||||||
|
{isOwnProfile
|
||||||
|
? 'No articles written yet. Publish your first article to see it here!'
|
||||||
|
: (
|
||||||
|
<>
|
||||||
|
No articles written. You can find other stuff from this user using{' '}
|
||||||
|
<a
|
||||||
|
href={viewingPubkey ? getProfileUrl(nip19.npubEncode(viewingPubkey)) : '#'}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
style={{ color: 'rgb(99 102 241)', textDecoration: 'underline' }}
|
||||||
|
>
|
||||||
|
ants
|
||||||
|
</a>
|
||||||
|
.
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="explore-grid">
|
<div className="explore-grid">
|
||||||
|
|||||||
Reference in New Issue
Block a user