Skip to content

Commit

Permalink
validate
Browse files Browse the repository at this point in the history
  • Loading branch information
mckaywrigley committed Mar 2, 2023
1 parent b7e04af commit 5142360
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ export default function Home() {
};

const handleAnswer = async () => {
if (!apiKey) {
alert("Please enter an API key.");
return;
}

if (!query) {
alert("Please enter a query.");
return;
}

const results = await handleSearch();

setLoading(true);
Expand Down

0 comments on commit 5142360

Please sign in to comment.