Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Error message is displayed in case no file is found in custom sound section. #28302

Merged
merged 9 commits into from
Mar 15, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ const CustomSoundsRoute = (): ReactElement => {
async () => {
const { sounds } = await getSounds(query);

if (sounds.length === 0) {
throw new Error(t('No_results_found'));
}
return sounds;
},
{
Expand Down Expand Up @@ -112,6 +109,7 @@ const CustomSoundsRoute = (): ReactElement => {
</Page.Header>
<Page.Content>
<>
<FilterByText onChange={({ text }): void => setParams(text)} />
{isLoading && (
<GenericTable>
<GenericTableHeader>{headers}</GenericTableHeader>
Expand All @@ -122,7 +120,6 @@ const CustomSoundsRoute = (): ReactElement => {
)}
{isSuccess && data && data.length > 0 && (
<>
<FilterByText onChange={({ text }): void => setParams(text)} />
<GenericTable>
<GenericTableHeader>{headers}</GenericTableHeader>
<GenericTableBody>
Expand Down