File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ const App = () => {
2424 } ) ;
2525
2626 // Toast position state for responsive behavior
27- const [ toastPosition , setToastPosition ] = useState ( 'top-center' ) ;
27+ const [ toastPosition , setToastPosition ] = useState <
28+ 'top-center' | 'bottom-right'
29+ > ( 'top-center' ) ;
2830
2931 // ----------------------------------------------------------
3032 // * USEEFFECT for light/dark mode toggle
@@ -45,7 +47,11 @@ const App = () => {
4547 useEffect ( ( ) => {
4648 const mediaQuery = window . matchMedia ( '(min-width: 640px)' ) ;
4749
48- const updateToastPosition = ( e ) => {
50+ interface MediaQueryEvent {
51+ matches : boolean ;
52+ }
53+
54+ const updateToastPosition = ( e : MediaQueryEvent ) => {
4955 setToastPosition ( e . matches ? 'bottom-right' : 'top-center' ) ;
5056 } ;
5157
You can’t perform that action at this time.
0 commit comments