@nextsparkjs/mobile 0.1.0-beta.161 → 0.1.0-beta.163

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextsparkjs/mobile",
3
- "version": "0.1.0-beta.161",
3
+ "version": "0.1.0-beta.163",
4
4
  "description": "Mobile app infrastructure for NextSpark - API client, providers, and utilities for Expo apps",
5
5
  "license": "MIT",
6
6
  "author": "NextSpark <hello@nextspark.dev>",
@@ -33,7 +33,7 @@ export default function EditCustomerScreen() {
33
33
  )
34
34
  }
35
35
 
36
- if (error || !data?.data) {
36
+ if (error || !data) {
37
37
  return (
38
38
  <View style={styles.centered}>
39
39
  <Text style={styles.errorText}>
@@ -46,7 +46,7 @@ export default function EditCustomerScreen() {
46
46
  return (
47
47
  <CustomerForm
48
48
  mode="edit"
49
- initialData={data.data}
49
+ initialData={data}
50
50
  onSubmit={handleSubmit}
51
51
  onDelete={handleDelete}
52
52
  isLoading={updateCustomer.isPending || deleteCustomer.isPending}
@@ -46,7 +46,7 @@ export default function EditTaskScreen() {
46
46
  return (
47
47
  <TaskForm
48
48
  mode="edit"
49
- initialData={data.data}
49
+ initialData={data}
50
50
  onSubmit={handleSubmit}
51
51
  onDelete={handleDelete}
52
52
  isLoading={updateTask.isPending || deleteTask.isPending}
@@ -0,0 +1 @@
1
+ /// <reference types="nativewind/types" />
@@ -36,13 +36,16 @@
36
36
  "react-native-screens": "~4.16.0",
37
37
  "react-native-svg": "15.12.1",
38
38
  "tailwind-merge": "^3.4.0",
39
- "tailwindcss": "^3"
39
+ "tailwindcss": "^3",
40
+ "clsx": "^2.1.1",
41
+ "class-variance-authority": "^0.7.1"
40
42
  },
41
43
  "devDependencies": {
42
44
  "@babel/core": "^7.25.0",
43
45
  "@testing-library/jest-native": "^5.4.3",
44
46
  "@testing-library/react-native": "^13.3.3",
45
47
  "@types/jest": "^29.5.0",
48
+ "@types/node": "^22.10.7",
46
49
  "@types/react": "^19",
47
50
  "jest": "^29.7.0",
48
51
  "jest-expo": "^54.0.16",
@@ -32,8 +32,8 @@ export function useUpdateCustomer() {
32
32
  mutationFn: ({ id, data }: { id: string; data: UpdateCustomerInput }) =>
33
33
  customersApi.update(id, data),
34
34
  onSuccess: (response) => {
35
- // Update the specific customer in cache
36
- queryClient.setQueryData([...CUSTOMERS_QUERY_KEY, response.data.id], response)
35
+ // update() returns the entity directly (createEntityApi unwraps SingleResponse)
36
+ queryClient.setQueryData([...CUSTOMERS_QUERY_KEY, response.id], response)
37
37
  // Invalidate list to refetch
38
38
  queryClient.invalidateQueries({ queryKey: CUSTOMERS_QUERY_KEY })
39
39
  },
@@ -33,8 +33,8 @@ export function useUpdateTask() {
33
33
  mutationFn: ({ id, data }: { id: string; data: UpdateTaskInput }) =>
34
34
  tasksApi.update(id, data),
35
35
  onSuccess: (response) => {
36
- // Update the specific task in cache
37
- queryClient.setQueryData([...TASKS_QUERY_KEY, response.data.id], response)
36
+ // update() returns the entity directly (createEntityApi unwraps SingleResponse)
37
+ queryClient.setQueryData([...TASKS_QUERY_KEY, response.id], response)
38
38
  // Invalidate list to refetch
39
39
  queryClient.invalidateQueries({ queryKey: TASKS_QUERY_KEY })
40
40
  },