mirror of
https://github.com/lumina-rocks/lumina.git
synced 2026-06-04 09:41:32 +02:00
rm nostr:// in search text input
This commit is contained in:
@@ -10,12 +10,14 @@ import { useRouter } from 'next/navigation';
|
||||
export function Search() {
|
||||
const router = useRouter();
|
||||
|
||||
const [inputValue, setInputValue] = useState('');
|
||||
let [inputValue, setInputValue] = useState('');
|
||||
const [isLoading, setIsLoading] = useState(false); // Neuer Zustand für das Laden
|
||||
|
||||
const calculateAndRedirect = async () => {
|
||||
setIsLoading(true);
|
||||
|
||||
inputValue = inputValue.replace('nostr://','');
|
||||
|
||||
if (inputValue.startsWith('npub')) { // npub Search
|
||||
// window.location.href = `/profile/${inputValue}`;
|
||||
router.push(`/profile/${inputValue}`);
|
||||
|
||||
Reference in New Issue
Block a user