Skip to content

Commit 94099df

Browse files
committed
Use /a as a default for articles
1 parent 4dde94b commit 94099df

File tree

11 files changed

+11
-19
lines changed

11 files changed

+11
-19
lines changed

src/components/ArticlePreview/ArticleCompactPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ const ArticleCompactPreview: Component<{
328328
const articleUrl = () => {
329329
const vanityName = app?.verifiedUsers[props.article.pubkey];
330330

331-
if (!vanityName) return `/e/${props.article.naddr}`;
331+
if (!vanityName) return `/a/${props.article.naddr}`;
332332

333333
const decoded = nip19.decode(props.article.naddr);
334334

src/components/ArticlePreview/ArticlePreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ const ArticlePreview: Component<{
330330
const articleUrl = () => {
331331
const vanityName = app?.verifiedUsers[props.article.pubkey];
332332

333-
if (!vanityName) return `/e/${props.article.naddr}`;
333+
if (!vanityName) return `/a/${props.article.naddr}`;
334334

335335
const decoded = nip19.decode(props.article.naddr);
336336

src/components/ArticlePreview/ArticlePreviewPhone.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ const ArticlePreviewPhone: Component<{
331331
const articleUrl = () => {
332332
const vanityName = app?.verifiedUsers[props.article.pubkey];
333333

334-
if (!vanityName) return `/e/${props.article.naddr}`;
334+
if (!vanityName) return `/a/${props.article.naddr}`;
335335

336336
const decoded = nip19.decode(props.article.naddr);
337337

src/components/ArticlePreview/ArticleShort.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const ArticleShort: Component<{
8383
const articleUrl = () => {
8484
const vanityName = app?.verifiedUsers[props.article.pubkey];
8585

86-
if (!vanityName) return `/e/${props.article.naddr}`;
86+
if (!vanityName) return `/a/${props.article.naddr}`;
8787

8888
const decoded = nip19.decode(props.article.naddr);
8989

src/components/DirectMessages/DirectMessageParsedContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ const DirectMessageParsedContent: Component<{
706706
}
707707

708708
const unknownMention = (nid: string) => {
709-
return <A href={`/e/${nid}`}>{token}</A>
709+
return <A href={`/a/${nid}`}>{token}</A>
710710
}
711711

712712
const decoded = decodeIdentifier(id);

src/components/Layout/LayoutDesktop.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const LayoutDesktop: Component<{
3838
});
3939

4040
const containerClass = () => {
41-
if (location.pathname.startsWith('/e/naddr')) return styles.containerLF;
41+
if (location.pathname.startsWith('/e/naddr') || location.pathname.startsWith('/a/naddr')) return styles.containerLF;
4242

4343
return styles.container;
4444
}

src/components/NavMenu/NavMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const NavMenu: Component< { id?: string } > = (props) => {
133133
</Show>
134134
}
135135
>
136-
<Match when={loc.pathname.startsWith('/reads') || loc.pathname.startsWith('/e/naddr')}>
136+
<Match when={loc.pathname.startsWith('/reads') || loc.pathname.startsWith('/e/naddr') || loc.pathname.startsWith('/a/naddr')}>
137137
<Show
138138
when={isBigScreen()}
139139
fallback={

src/components/ParsedNote/ParsedNote.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,7 @@ const ParsedNote: Component<{
16631663
const [kind, pubkey, identifier] = tag[1].split(':');
16641664
const naddr = nip19.naddrEncode({ kind: parseInt(kind), pubkey, identifier });
16651665
const noteId = `nostr:${naddr}`;
1666-
let path = `/e/${naddr}`;
1666+
let path = `/a/${naddr}`;
16671667

16681668
const vanityName = app?.verifiedUsers[pubkey];
16691669

src/components/PrimalMarkdown/PrimalMarkdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ const PrimalMarkdown: Component<{
568568
break;
569569
case 'naddr':
570570
if ([Kind.Text, Kind.LongForm].includes(decode.data.kind)) {
571-
navigate(`/e/${id}`);
571+
navigate(`/a/${id}`);
572572
}
573573
break;
574574
default:

src/components/ProfileNoteZap/ProfileNoteZap.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,6 @@ const ProfileNoteZap: Component<{
3636
let link = '';
3737
let name = '';
3838

39-
const noteLinkId = (note: PrimalNote) => {
40-
try {
41-
return `/e/${note.noteId}`;
42-
} catch(e) {
43-
return '/404';
44-
}
45-
};
46-
4739
if (props.subject.msg.kind === Kind.Text) {
4840
const sub = props.subject as PrimalNote;
4941

@@ -57,7 +49,7 @@ const ProfileNoteZap: Component<{
5749
const sub = props.subject as PrimalArticle;
5850
content = sub.title;
5951
time = props.zap.created_at || 0;
60-
link = `/e/${sub.noteId}`;
52+
link = `/a/${sub.noteId}`;
6153
name = userName(sub.user);
6254
}
6355

0 commit comments

Comments
 (0)