Fix issues related to search apps, notification duration, and loading icon on the explore page (#6374)
This commit is contained in:
@@ -22,7 +22,6 @@ export type IToastProps = {
|
||||
type IToastContext = {
|
||||
notify: (props: IToastProps) => void
|
||||
}
|
||||
const defaultDuring = 3000
|
||||
|
||||
export const ToastContext = createContext<IToastContext>({} as IToastContext)
|
||||
export const useToastContext = () => useContext(ToastContext)
|
||||
@@ -89,10 +88,10 @@ export const ToastProvider = ({
|
||||
const placeholder: IToastProps = {
|
||||
type: 'info',
|
||||
message: 'Toast message',
|
||||
duration: 3000,
|
||||
duration: 6000,
|
||||
}
|
||||
const [params, setParams] = React.useState<IToastProps>(placeholder)
|
||||
|
||||
const defaultDuring = params.type === 'success' ? 3000 : 6000
|
||||
const [mounted, setMounted] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
|
Reference in New Issue
Block a user