Want to have query display button element when there's no results

I’m building a quick locator page to find our dealers vs a database, and I want it to display a button element when the query returns no results (currently it just displays a blank table)

Currently, the code allows you to search by zipcode by entering it into the “Input1” field. It then runs a query against that input and builds a table (not including the table builder code here).

Here’s the code that I have so far…I cannot seem to figure out how to implement what I am looking for.

import wixData from ‘wix-data’;
export function button16_click(event, $w) {
// Runs a query on the “Members” collection
wixData.query(‘DealerLocator’)
// Query the collection for any items whose “Name” field contains
// the value the user entered in the input element
.contains(‘zipcode’, $w(‘#input1’).value)
.find()
.then(res => {
// Set the table data to be the results of the query
$w(‘#table1’).rows = res.items;
$w(‘#table1’).expand();
}) ;

The table element is collapsed on load, as is the button I would like displayed when no results are found. (Element ID is Button21)
What I would like to do is have the above be an “if” statement (if database entry contains “input1” value) then display the table results.

“else” display button 21

Can anyone assist me with this?

Thank you!