From f050b2a2c2ccfc6f83263a51bdaff5c8fece8d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Sat, 21 May 2022 18:43:09 +0400 Subject: [PATCH] Add CircularProgress to ChecheAwtis --- components/awtis/cheche-awtis.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/components/awtis/cheche-awtis.js b/components/awtis/cheche-awtis.js index 7bb3b1c..df25f7d 100644 --- a/components/awtis/cheche-awtis.js +++ b/components/awtis/cheche-awtis.js @@ -2,7 +2,9 @@ import {useEffect, useState} from 'react' import {useRouter} from 'next/router' import TextField from '@mui/material/TextField' import Autocomplete from '@mui/material/Autocomplete' -import {Avatar, Container} from '@mui/material' +import Avatar from '@mui/material/Avatar' +import CircularProgress from '@mui/material/CircularProgress' +import Container from '@mui/material/Container' import {jwennToutAwtis} from '../../lib/oki-api' @@ -65,7 +67,21 @@ export default function ChecheAwtis() { )} sx={{width: 300}} - renderInput={params => } + renderInput={params => ( + + {loading ? : null} + {params.InputProps.endAdornment} + + ), + }} + /> + )} onChange={(event, newValue) => { router.push(`/awtis/${newValue.slug}`) }}