File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 11import React , { useEffect , useRef } from 'react' ;
2- import { Grid } from '@material-ui/core' ;
2+ import { Grid } from '@mui/material' ; // Ensure correct import based on version
33
44import { SpeechState , useSpeechContext } from "@speechly/react-client" ;
55import { PushToTalkButton , PushToTalkButtonContainer } from '@speechly/react-ui' ;
@@ -10,9 +10,13 @@ import useStyles from './styles';
1010const App = ( ) => {
1111 const classes = useStyles ( ) ;
1212 const { speechState } = useSpeechContext ( ) ;
13- const main = useRef ( null )
13+ const main = useRef ( null ) ;
1414
15- const executeScroll = ( ) => main . current . scrollIntoView ( )
15+ const executeScroll = ( ) => {
16+ if ( main . current ) {
17+ main . current . scrollIntoView ( ) ;
18+ }
19+ } ;
1620
1721 useEffect ( ( ) => {
1822 if ( speechState === SpeechState . Recording ) {
@@ -22,7 +26,14 @@ const App = () => {
2226
2327 return (
2428 < div >
25- < Grid className = { classes . grid } container spacing = { 0 } alignItems = "center" justify = "center" style = { { height : '100vh' } } >
29+ < Grid
30+ className = { classes . grid }
31+ container
32+ spacing = { 0 }
33+ alignItems = "center"
34+ justifyContent = "center" // Change this line based on Material-UI version
35+ style = { { height : '100vh' } }
36+ >
2637 < Grid item xs = { 12 } sm = { 4 } className = { classes . mobile } >
2738 < Details title = "Income" />
2839 </ Grid >
You can’t perform that action at this time.
0 commit comments