File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
layouts/calendar/components/todos Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 11import { QueryClient , QueryClientProvider } from '@tanstack/react-query'
22import { RouterProvider } from 'react-router-dom'
33import { AppRoutes } from './routes'
4- const queryClient = new QueryClient ( )
4+
5+ const queryClient = new QueryClient ( {
6+ defaultOptions : {
7+ queries : {
8+ refetchOnWindowFocus : false ,
9+ } ,
10+ } ,
11+ } )
512
613function App ( ) {
714 return (
Original file line number Diff line number Diff line change @@ -6,27 +6,27 @@ interface Prop {
66
77export function TodoInput ( { onAdd } : Prop ) {
88 const [ text , setText ] = useState ( '' )
9-
9+
1010 const handleSubmit = ( e : React . FormEvent ) => {
1111 e . preventDefault ( )
1212 if ( text . trim ( ) ) {
1313 onAdd ( text . trim ( ) )
1414 setText ( '' )
1515 }
1616 }
17-
17+
1818 return (
19- < form onSubmit = { handleSubmit } className = "flex gap-2 mb-4" >
19+ < form onSubmit = { handleSubmit } className = "flex flex-col sm:flex-row gap-2 mb-4" >
2020 < input
2121 type = "text"
2222 value = { text }
2323 onChange = { ( e ) => setText ( e . target . value ) }
2424 placeholder = "یادداشت جدید..."
25- className = "flex-1 px-3 py-2 text-gray-600 placeholder-gray-500 rounded-lg dark:placeholder-gray-500/80 dark:text-gray-300 bg-gray-300/50 dark:bg-gray-700/50 focus:outline-none focus:ring-2 focus:ring-blue-500 "
25+ className = "flex-1 px-3 py-2 text-gray-600 placeholder-gray-500 rounded-lg dark:placeholder-gray-500/80 dark:text-gray-300 bg-gray-300/50 dark:bg-gray-700/50 focus:outline-none focus:ring-2 focus:ring-blue-500"
2626 />
2727 < button
2828 type = "submit"
29- className = "px-4 py-2 text-white transition-colors bg-blue-500 rounded-lg hover:bg-blue-600"
29+ className = "px-4 py-2 text-white transition-colors bg-blue-500 rounded-lg hover:bg-blue-600 sm:w-auto w-full "
3030 >
3131 افزودن
3232 </ button >
You can’t perform that action at this time.
0 commit comments