add search term to header, rm search page autofocus
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
386276845c
commit
6e4de8c17a
@ -34,7 +34,14 @@ export function Header() {
|
||||
}, [pageName]);
|
||||
|
||||
let title: React.ReactNode = <span className="capitalize">{pageName}</span>;
|
||||
if (nostrLink) {
|
||||
if (location.pathname.startsWith("/search/")) {
|
||||
const searchTerm = location.pathname.split("/search/")[1];
|
||||
title = (
|
||||
<>
|
||||
<FormattedMessage defaultMessage="Search" id="xmcVZ0" />: {searchTerm}
|
||||
</>
|
||||
);
|
||||
} else if (nostrLink) {
|
||||
if (nostrLink.type === NostrPrefix.Event || nostrLink.type === NostrPrefix.Note) {
|
||||
title = <NoteTitle link={nostrLink} />;
|
||||
} else if (nostrLink.type === NostrPrefix.PublicKey || nostrLink.type === NostrPrefix.Profile) {
|
||||
|
@ -101,7 +101,6 @@ const SearchPage = () => {
|
||||
placeholder={formatMessage({ defaultMessage: "Search...", id: "0BUTMv" })}
|
||||
value={search}
|
||||
onChange={e => setSearch(e.target.value)}
|
||||
autoFocus={true}
|
||||
/>
|
||||
<Tabs tabs={SearchTab} tab={tab} setTab={setTab} />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user