From a03f1dc2ac25579df30e8cb59d2703110c3e564d Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Wed, 13 Mar 2024 22:37:41 +0000
Subject: lint: Lint and format the entire repo with the new configs

---
 apps/mobile/app/dashboard/add-link.tsx | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

(limited to 'apps/mobile/app/dashboard/add-link.tsx')

diff --git a/apps/mobile/app/dashboard/add-link.tsx b/apps/mobile/app/dashboard/add-link.tsx
index 69a9c7a2..568a36b6 100644
--- a/apps/mobile/app/dashboard/add-link.tsx
+++ b/apps/mobile/app/dashboard/add-link.tsx
@@ -1,7 +1,6 @@
-import { useRouter } from "expo-router";
 import { useState } from "react";
-import { View, Text } from "react-native";
-
+import { Text, View } from "react-native";
+import { useRouter } from "expo-router";
 import { Button } from "@/components/ui/Button";
 import { Input } from "@/components/ui/Input";
 import { api } from "@/lib/trpc";
@@ -24,9 +23,9 @@ export default function AddNote() {
     },
     onError: (e) => {
       let message;
-      if (e.data?.code === "BAD_REQUEST") {
-        const error = JSON.parse(e.message)[0];
-        message = error.message;
+      if (e.data?.zodError) {
+        const zodError = e.data.zodError;
+        message = JSON.stringify(zodError);
       } else {
         message = `Something went wrong: ${e.message}`;
       }
-- 
cgit v1.2.3-70-g09d2

