Remove "makeToaster" usage

This commit is contained in:
schroda
2024-09-07 01:23:48 +02:00
parent e0b58652f4
commit fea710b5dc

View File

@@ -30,7 +30,7 @@ import {
} from '@/screens/util/Extensions'; } from '@/screens/util/Extensions';
import { AppbarSearch } from '@/components/util/AppbarSearch'; import { AppbarSearch } from '@/components/util/AppbarSearch';
import { LoadingPlaceholder } from '@/components/util/LoadingPlaceholder'; import { LoadingPlaceholder } from '@/components/util/LoadingPlaceholder';
import { makeToaster } from '@/components/util/Toast'; import { makeToast } from '@/components/util/Toast';
import { LangSelect } from '@/components/navbar/action/LangSelect'; import { LangSelect } from '@/components/navbar/action/LangSelect';
import { ExtensionCard } from '@/components/ExtensionCard'; import { ExtensionCard } from '@/components/ExtensionCard';
import { NavBarContext } from '@/components/context/NavbarContext.tsx'; import { NavBarContext } from '@/components/context/NavbarContext.tsx';
@@ -155,8 +155,6 @@ export function Extensions({ tabsMenuHeight }: { tabsMenuHeight: number }) {
[filteredGroupedExtensions], [filteredGroupedExtensions],
); );
const [toasts, makeToast] = makeToaster(useState<React.ReactElement[]>([]));
const submitExternalExtension = (file: File) => { const submitExternalExtension = (file: File) => {
if (file.name.toLowerCase().endsWith('apk')) { if (file.name.toLowerCase().endsWith('apk')) {
if (inputRef.current) { if (inputRef.current) {
@@ -261,7 +259,6 @@ export function Extensions({ tabsMenuHeight }: { tabsMenuHeight: number }) {
if (showAddRepoInfo) { if (showAddRepoInfo) {
return ( return (
<> <>
{toasts}
{FileInputComponent} {FileInputComponent}
<Stack <Stack
sx={{ sx={{
@@ -282,7 +279,6 @@ export function Extensions({ tabsMenuHeight }: { tabsMenuHeight: number }) {
return ( return (
<> <>
{toasts}
{FileInputComponent} {FileInputComponent}
<StyledGroupedVirtuoso <StyledGroupedVirtuoso
heightToSubtract={tabsMenuHeight} heightToSubtract={tabsMenuHeight}