Fix issues related to search apps, notification duration, and loading icon on the explore page (#6374)
This commit is contained in:
parent
a6dbd26f75
commit
65bc4e0fc0
6 changed files with 59 additions and 28 deletions
|
|
@ -106,7 +106,7 @@ const ChatInput: FC<ChatInputProps> = ({
|
|||
}
|
||||
|
||||
const logError = (message: string) => {
|
||||
notify({ type: 'error', message, duration: 3000 })
|
||||
notify({ type: 'error', message })
|
||||
}
|
||||
const handleVoiceInputShow = () => {
|
||||
(Recorder as any).getPermission().then(() => {
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue