fix: 🐛
This commit is contained in:
@@ -194,7 +194,7 @@ export default function NoteList({
|
||||
>
|
||||
<div className="space-y-2 sm:space-y-2">
|
||||
{newEvents.filter(eventFilter).length > 0 && (
|
||||
<div className="flex justify-center w-full max-sm:mt-2">
|
||||
<div className="flex justify-center w-full mt-2">
|
||||
<Button size="lg" onClick={showNewEvents}>
|
||||
{t('show new notes')}
|
||||
</Button>
|
||||
@@ -219,7 +219,7 @@ export default function NoteList({
|
||||
) : events.length ? (
|
||||
t('no more notes')
|
||||
) : (
|
||||
<div className="flex justify-center w-full max-sm:mt-2">
|
||||
<div className="flex justify-center w-full mt-2">
|
||||
<Button size="lg" onClick={() => setRefreshCount((pre) => pre + 1)}>
|
||||
{t('reload notes')}
|
||||
</Button>
|
||||
|
||||
@@ -17,12 +17,15 @@ export function SearchDialog({ open, setOpen }: { open: boolean; setOpen: Dispat
|
||||
const [debouncedInput, setDebouncedInput] = useState(input)
|
||||
const { profiles } = useSearchProfiles(debouncedInput, 10)
|
||||
const normalizedUrl = useMemo(() => {
|
||||
if (['w', 'ws', 'ws:', 'ws:/', 'wss', 'wss:', 'wss:/'].includes(input)) {
|
||||
return undefined
|
||||
}
|
||||
try {
|
||||
return normalizeUrl(debouncedInput)
|
||||
return normalizeUrl(input)
|
||||
} catch {
|
||||
return undefined
|
||||
}
|
||||
}, [debouncedInput])
|
||||
}, [input])
|
||||
|
||||
const list = useMemo(() => {
|
||||
const search = input.trim()
|
||||
@@ -55,9 +58,9 @@ export function SearchDialog({ open, setOpen }: { open: boolean; setOpen: Dispat
|
||||
|
||||
return (
|
||||
<>
|
||||
{!!normalizedUrl && <RelayItem url={normalizedUrl} onClick={() => setOpen(false)} />}
|
||||
<NormalItem search={search} onClick={() => setOpen(false)} />
|
||||
<HashtagItem search={search} onClick={() => setOpen(false)} />
|
||||
{!!normalizedUrl && <RelayItem url={normalizedUrl} onClick={() => setOpen(false)} />}
|
||||
{profiles.map((profile) => (
|
||||
<ProfileItem key={profile.pubkey} profile={profile} onClick={() => setOpen(false)} />
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user