chore: extract back/parent text
This commit is contained in:
parent
9e8a8c1fac
commit
630d0ab6cd
@ -271,6 +271,7 @@ export default function Thread(props: ThreadProps) {
|
||||
const navigate = useNavigate();
|
||||
const isSingleNote = parsedNotes.filter(a => a.Kind === EventKind.TextNote).length === 1;
|
||||
const location = useLocation();
|
||||
const { formatMessage } = useIntl();
|
||||
const urlNoteId = location?.pathname.slice(3);
|
||||
const urlNoteHex = urlNoteId && bech32ToHex(urlNoteId);
|
||||
|
||||
@ -366,9 +367,17 @@ export default function Thread(props: ThreadProps) {
|
||||
}
|
||||
}
|
||||
|
||||
const parentText = formatMessage({
|
||||
defaultMessage: "Parent",
|
||||
description: "Link to parent note in thread",
|
||||
});
|
||||
const backText = formatMessage({
|
||||
defaultMessage: "Back",
|
||||
description: "Navigate back button on threads view",
|
||||
});
|
||||
return (
|
||||
<div className="main-content mt10">
|
||||
<BackButton onClick={goBack} text={path?.length > 1 ? "Parent" : "Back"} />
|
||||
<BackButton onClick={goBack} text={path?.length > 1 ? parentText : backText} />
|
||||
<div className="thread-container">
|
||||
{currentRoot && renderRoot(currentRoot)}
|
||||
{currentRoot && renderChain(currentRoot.Id)}
|
||||
|
@ -134,6 +134,10 @@
|
||||
"9wO4wJ": {
|
||||
"string": "Lightning Invoice"
|
||||
},
|
||||
"ADmfQT": {
|
||||
"developer_comment": "Link to parent note in thread",
|
||||
"string": "Parent"
|
||||
},
|
||||
"ASRK0S": {
|
||||
"string": "This author has been muted"
|
||||
},
|
||||
@ -522,6 +526,10 @@
|
||||
"jCA7Cw": {
|
||||
"string": "Preview on snort"
|
||||
},
|
||||
"jfV8Wr": {
|
||||
"developer_comment": "Navigate back button on threads view",
|
||||
"string": "Back"
|
||||
},
|
||||
"juhqvW": {
|
||||
"string": "Improve login security with browser extensions"
|
||||
},
|
||||
|
@ -43,6 +43,7 @@
|
||||
"9WRlF4": "Send",
|
||||
"9gqH2W": "Login",
|
||||
"9wO4wJ": "Lightning Invoice",
|
||||
"ADmfQT": "Parent",
|
||||
"ASRK0S": "This author has been muted",
|
||||
"Adk34V": "Setup your Profile",
|
||||
"AyGauy": "Login",
|
||||
@ -170,6 +171,7 @@
|
||||
"izWS4J": "Unfollow",
|
||||
"jA3OE/": "{n,plural,=1{{n} sat} other{{n} sats}}",
|
||||
"jCA7Cw": "Preview on snort",
|
||||
"jfV8Wr": "Back",
|
||||
"juhqvW": "Improve login security with browser extensions",
|
||||
"jvo0vs": "Save",
|
||||
"k2veDA": "Write",
|
||||
|
Loading…
x
Reference in New Issue
Block a user