File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,6 @@ const login = async (variables: Variables) => {
3232 return data ;
3333} ;
3434
35- export const useLogin = createMutation < Response , Variables , Error > ( {
35+ export const useLogin = createMutation < Response , Variables > ( {
3636 mutationFn : ( variables ) => login ( variables ) ,
3737} ) ;
Original file line number Diff line number Diff line change @@ -6,19 +6,19 @@ import { client } from '../common';
66import { type Comment } from './types' ;
77
88type Variables = {
9- id : number ;
9+ id ? : number ;
1010} ;
1111
1212type Response = {
1313 comments : Comment [ ] ;
1414} ;
1515
16- const getPostComments = async ( id : number ) => {
16+ const getPostComments = async ( id ? : number ) => {
1717 const { data } = await client . get ( `posts/${ id } /comments` ) ;
1818 return data ;
1919} ;
2020
2121export const usePostComments = createQuery < Response , Variables > ( {
2222 ...queryFactory . posts . detail ( 1 ) . _ctx . comments ,
23- fetcher : ( variables ) => getPostComments ( variables . id ) ,
23+ fetcher : ( variables ) => getPostComments ( variables ? .id ) ,
2424} ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export default function Post() {
1515 data : { comments } = { comments : [ ] } ,
1616 isLoading : isLoadingComments ,
1717 } = usePostComments ( {
18- variables : { id : data ?. id ! } ,
18+ variables : { id : data ?. id } ,
1919 } ) ;
2020
2121 if ( isPending ) {
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const ProductRow = ({ product }: { product: Product }) => (
5252 < Image
5353 source = { { uri : product . thumbnail } }
5454 className = "h-16 w-16 rounded"
55- resizeMode = "cover"
55+ contentFit = "cover"
5656 />
5757 < View className = "ml-4 flex-1" >
5858 < Text className = "font-medium" > { product . title } </ Text >
You can’t perform that action at this time.
0 commit comments