diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-13 22:37:41 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2024-03-14 16:40:45 +0000 |
| commit | a03f1dc2ac25579df30e8cb59d2703110c3e564d (patch) | |
| tree | 59315e73cd83dc391660071c70752cf23989b3da /apps/mobile/app/dashboard | |
| parent | 04572a8e5081b1e4871e273cde9dbaaa44c52fe0 (diff) | |
| download | karakeep-a03f1dc2ac25579df30e8cb59d2703110c3e564d.tar.zst | |
lint: Lint and format the entire repo with the new configs
Diffstat (limited to 'apps/mobile/app/dashboard')
| -rw-r--r-- | apps/mobile/app/dashboard/(tabs)/_layout.tsx | 2 | ||||
| -rw-r--r-- | apps/mobile/app/dashboard/(tabs)/index.tsx | 5 | ||||
| -rw-r--r-- | apps/mobile/app/dashboard/(tabs)/lists.tsx | 3 | ||||
| -rw-r--r-- | apps/mobile/app/dashboard/(tabs)/search.tsx | 5 | ||||
| -rw-r--r-- | apps/mobile/app/dashboard/(tabs)/settings.tsx | 3 | ||||
| -rw-r--r-- | apps/mobile/app/dashboard/add-link.tsx | 11 | ||||
| -rw-r--r-- | apps/mobile/app/dashboard/add-note.tsx | 11 | ||||
| -rw-r--r-- | apps/mobile/app/dashboard/archive.tsx | 1 | ||||
| -rw-r--r-- | apps/mobile/app/dashboard/favourites.tsx | 1 | ||||
| -rw-r--r-- | apps/mobile/app/dashboard/lists/[slug].tsx | 3 |
10 files changed, 18 insertions, 27 deletions
diff --git a/apps/mobile/app/dashboard/(tabs)/_layout.tsx b/apps/mobile/app/dashboard/(tabs)/_layout.tsx index 5b2d810a..ce73a5c9 100644 --- a/apps/mobile/app/dashboard/(tabs)/_layout.tsx +++ b/apps/mobile/app/dashboard/(tabs)/_layout.tsx @@ -1,6 +1,6 @@ +import React from "react"; import { Tabs } from "expo-router"; import { ClipboardList, Home, Search, Settings } from "lucide-react-native"; -import React from "react"; export default function TabLayout() { return ( diff --git a/apps/mobile/app/dashboard/(tabs)/index.tsx b/apps/mobile/app/dashboard/(tabs)/index.tsx index b2349525..fe15956c 100644 --- a/apps/mobile/app/dashboard/(tabs)/index.tsx +++ b/apps/mobile/app/dashboard/(tabs)/index.tsx @@ -1,8 +1,7 @@ -import { Link, Stack } from "expo-router"; -import { SquarePen, Link as LinkIcon } from "lucide-react-native"; import { View } from "react-native"; - +import { Link, Stack } from "expo-router"; import BookmarkList from "@/components/bookmarks/BookmarkList"; +import { Link as LinkIcon, SquarePen } from "lucide-react-native"; function HeaderRight() { return ( diff --git a/apps/mobile/app/dashboard/(tabs)/lists.tsx b/apps/mobile/app/dashboard/(tabs)/lists.tsx index b534ddda..a293757b 100644 --- a/apps/mobile/app/dashboard/(tabs)/lists.tsx +++ b/apps/mobile/app/dashboard/(tabs)/lists.tsx @@ -1,7 +1,6 @@ -import { Link } from "expo-router"; import { useEffect, useState } from "react"; import { FlatList, View } from "react-native"; - +import { Link } from "expo-router"; import { api } from "@/lib/trpc"; export default function Lists() { diff --git a/apps/mobile/app/dashboard/(tabs)/search.tsx b/apps/mobile/app/dashboard/(tabs)/search.tsx index 980cab36..0025262e 100644 --- a/apps/mobile/app/dashboard/(tabs)/search.tsx +++ b/apps/mobile/app/dashboard/(tabs)/search.tsx @@ -1,12 +1,11 @@ -import { keepPreviousData } from "@tanstack/react-query"; import { useState } from "react"; import { View } from "react-native"; -import { useDebounce } from "use-debounce"; - import BookmarkList from "@/components/bookmarks/BookmarkList"; import { Divider } from "@/components/ui/Divider"; import { Input } from "@/components/ui/Input"; import { api } from "@/lib/trpc"; +import { keepPreviousData } from "@tanstack/react-query"; +import { useDebounce } from "use-debounce"; export default function Search() { const [search, setSearch] = useState(""); diff --git a/apps/mobile/app/dashboard/(tabs)/settings.tsx b/apps/mobile/app/dashboard/(tabs)/settings.tsx index 9f86d5ec..81b21fc8 100644 --- a/apps/mobile/app/dashboard/(tabs)/settings.tsx +++ b/apps/mobile/app/dashboard/(tabs)/settings.tsx @@ -1,7 +1,6 @@ -import { useRouter } from "expo-router"; import { useEffect } from "react"; import { Text, View } from "react-native"; - +import { useRouter } from "expo-router"; import Logo from "@/components/Logo"; import { Button } from "@/components/ui/Button"; import { useSession } from "@/lib/session"; 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}`; } diff --git a/apps/mobile/app/dashboard/add-note.tsx b/apps/mobile/app/dashboard/add-note.tsx index cf775a15..1f903e94 100644 --- a/apps/mobile/app/dashboard/add-note.tsx +++ b/apps/mobile/app/dashboard/add-note.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}`; } diff --git a/apps/mobile/app/dashboard/archive.tsx b/apps/mobile/app/dashboard/archive.tsx index d75cfe22..2c559684 100644 --- a/apps/mobile/app/dashboard/archive.tsx +++ b/apps/mobile/app/dashboard/archive.tsx @@ -1,5 +1,4 @@ import { View } from "react-native"; - import BookmarkList from "@/components/bookmarks/BookmarkList"; export default function Archive() { diff --git a/apps/mobile/app/dashboard/favourites.tsx b/apps/mobile/app/dashboard/favourites.tsx index 90374f18..42a139f9 100644 --- a/apps/mobile/app/dashboard/favourites.tsx +++ b/apps/mobile/app/dashboard/favourites.tsx @@ -1,5 +1,4 @@ import { View } from "react-native"; - import BookmarkList from "@/components/bookmarks/BookmarkList"; export default function Favourites() { diff --git a/apps/mobile/app/dashboard/lists/[slug].tsx b/apps/mobile/app/dashboard/lists/[slug].tsx index 54744874..fdd67763 100644 --- a/apps/mobile/app/dashboard/lists/[slug].tsx +++ b/apps/mobile/app/dashboard/lists/[slug].tsx @@ -1,6 +1,5 @@ -import { useLocalSearchParams, Stack } from "expo-router"; import { View } from "react-native"; - +import { Stack, useLocalSearchParams } from "expo-router"; import BookmarkList from "@/components/bookmarks/BookmarkList"; import FullPageSpinner from "@/components/ui/FullPageSpinner"; import { api } from "@/lib/trpc"; |
