rm nostr:// in search text input

This commit is contained in:
mroxso
2024-08-25 23:19:09 +02:00
parent c7070154c0
commit dbac84dd79

View File

@@ -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}`);