aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/components
diff options
context:
space:
mode:
Diffstat (limited to 'apps/mobile/components')
-rw-r--r--apps/mobile/components/Logo.tsx2
-rw-r--r--apps/mobile/components/bookmarks/BookmarkCard.tsx15
-rw-r--r--apps/mobile/components/bookmarks/BookmarkList.tsx5
-rw-r--r--apps/mobile/components/ui/ActionButton.tsx3
-rw-r--r--apps/mobile/components/ui/Button.tsx4
-rw-r--r--apps/mobile/components/ui/Divider.tsx1
-rw-r--r--apps/mobile/components/ui/FullPageSpinner.tsx2
-rw-r--r--apps/mobile/components/ui/Input.tsx5
-rw-r--r--apps/mobile/components/ui/Skeleton.tsx6
-rw-r--r--apps/mobile/components/ui/Toast.tsx3
10 files changed, 23 insertions, 23 deletions
diff --git a/apps/mobile/components/Logo.tsx b/apps/mobile/components/Logo.tsx
index 57f7a5c3..f5f823b5 100644
--- a/apps/mobile/components/Logo.tsx
+++ b/apps/mobile/components/Logo.tsx
@@ -1,5 +1,5 @@
+import { Text, View } from "react-native";
import { PackageOpen } from "lucide-react-native";
-import { View, Text } from "react-native";
export default function Logo() {
return (
diff --git a/apps/mobile/components/bookmarks/BookmarkCard.tsx b/apps/mobile/components/bookmarks/BookmarkCard.tsx
index 25947790..93a059f8 100644
--- a/apps/mobile/components/bookmarks/BookmarkCard.tsx
+++ b/apps/mobile/components/bookmarks/BookmarkCard.tsx
@@ -1,16 +1,16 @@
-import { ZBookmark } from "@hoarder/trpc/types/bookmarks";
-import * as WebBrowser from "expo-web-browser";
-import { Star, Archive, Trash, ArchiveRestore } from "lucide-react-native";
-import { View, Text, Image, ScrollView, Pressable } from "react-native";
+import { Image, Pressable, ScrollView, Text, View } from "react-native";
import Markdown from "react-native-markdown-display";
+import * as WebBrowser from "expo-web-browser";
+import { api } from "@/lib/trpc";
+import { Archive, ArchiveRestore, Star, Trash } from "lucide-react-native";
+
+import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
import { ActionButton } from "../ui/ActionButton";
import { Divider } from "../ui/Divider";
import { Skeleton } from "../ui/Skeleton";
import { useToast } from "../ui/Toast";
-import { api } from "@/lib/trpc";
-
const MAX_LOADING_MSEC = 30 * 1000;
export function isBookmarkStillCrawling(bookmark: ZBookmark) {
@@ -155,6 +155,7 @@ function LinkCard({ bookmark }: { bookmark: ZBookmark }) {
/>
) : (
<Image
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
source={require("@/assets/blur.jpeg")}
className="h-56 w-full rounded-t-lg"
/>
@@ -168,7 +169,7 @@ function LinkCard({ bookmark }: { bookmark: ZBookmark }) {
className="line-clamp-2 text-xl font-bold"
onPress={() => WebBrowser.openBrowserAsync(url)}
>
- {bookmark.content.title || parsedUrl.host}
+ {bookmark.content.title ?? parsedUrl.host}
</Text>
<TagList bookmark={bookmark} />
<Divider orientation="vertical" className="mt-2 h-0.5 w-full" />
diff --git a/apps/mobile/components/bookmarks/BookmarkList.tsx b/apps/mobile/components/bookmarks/BookmarkList.tsx
index 8e408709..79d3d79e 100644
--- a/apps/mobile/components/bookmarks/BookmarkList.tsx
+++ b/apps/mobile/components/bookmarks/BookmarkList.tsx
@@ -1,11 +1,10 @@
import { useEffect, useState } from "react";
import { Text, View } from "react-native";
import Animated, { LinearTransition } from "react-native-reanimated";
+import { api } from "@/lib/trpc";
-import BookmarkCard from "./BookmarkCard";
import FullPageSpinner from "../ui/FullPageSpinner";
-
-import { api } from "@/lib/trpc";
+import BookmarkCard from "./BookmarkCard";
export default function BookmarkList({
favourited,
diff --git a/apps/mobile/components/ui/ActionButton.tsx b/apps/mobile/components/ui/ActionButton.tsx
index c51eb332..1f2e05ca 100644
--- a/apps/mobile/components/ui/ActionButton.tsx
+++ b/apps/mobile/components/ui/ActionButton.tsx
@@ -1,4 +1,5 @@
-import { ActivityIndicator, Pressable, PressableProps } from "react-native";
+import type { PressableProps } from "react-native";
+import { ActivityIndicator, Pressable } from "react-native";
export function ActionButton({
children,
diff --git a/apps/mobile/components/ui/Button.tsx b/apps/mobile/components/ui/Button.tsx
index 4c3cbc69..0f3b4ab3 100644
--- a/apps/mobile/components/ui/Button.tsx
+++ b/apps/mobile/components/ui/Button.tsx
@@ -1,7 +1,7 @@
-import { type VariantProps, cva } from "class-variance-authority";
+import type { VariantProps } from "class-variance-authority";
import { Text, TouchableOpacity } from "react-native";
-
import { cn } from "@/lib/utils";
+import { cva } from "class-variance-authority";
const buttonVariants = cva(
"flex flex-row items-center justify-center rounded-md",
diff --git a/apps/mobile/components/ui/Divider.tsx b/apps/mobile/components/ui/Divider.tsx
index 1da0a71e..cf1b4624 100644
--- a/apps/mobile/components/ui/Divider.tsx
+++ b/apps/mobile/components/ui/Divider.tsx
@@ -1,5 +1,4 @@
import { View } from "react-native";
-
import { cn } from "@/lib/utils";
function Divider({
diff --git a/apps/mobile/components/ui/FullPageSpinner.tsx b/apps/mobile/components/ui/FullPageSpinner.tsx
index 01187f11..89b66090 100644
--- a/apps/mobile/components/ui/FullPageSpinner.tsx
+++ b/apps/mobile/components/ui/FullPageSpinner.tsx
@@ -1,4 +1,4 @@
-import { View, ActivityIndicator } from "react-native";
+import { ActivityIndicator, View } from "react-native";
export default function FullPageSpinner() {
return (
diff --git a/apps/mobile/components/ui/Input.tsx b/apps/mobile/components/ui/Input.tsx
index 2fcb2764..01c9fb2f 100644
--- a/apps/mobile/components/ui/Input.tsx
+++ b/apps/mobile/components/ui/Input.tsx
@@ -1,6 +1,5 @@
import { forwardRef } from "react";
import { Text, TextInput, View } from "react-native";
-
import { cn } from "@/lib/utils";
export interface InputProps
@@ -15,14 +14,16 @@ const Input = forwardRef<React.ElementRef<typeof TextInput>, InputProps>(
<View className={cn("flex flex-col gap-1.5", className)}>
{label && <Text className={cn("text-base", labelClasses)}>{label}</Text>}
<TextInput
+ ref={ref}
className={cn(
inputClasses,
- "border-input rounded-lg border px-4 py-2.5",
+ "rounded-lg border border-input px-4 py-2.5",
)}
{...props}
/>
</View>
),
);
+Input.displayName = "Input";
export { Input };
diff --git a/apps/mobile/components/ui/Skeleton.tsx b/apps/mobile/components/ui/Skeleton.tsx
index 68b22e1e..3287b9ef 100644
--- a/apps/mobile/components/ui/Skeleton.tsx
+++ b/apps/mobile/components/ui/Skeleton.tsx
@@ -1,6 +1,6 @@
+import type { View } from "react-native";
import { useEffect, useRef } from "react";
-import { Animated, type View } from "react-native";
-
+import { Animated } from "react-native";
import { cn } from "@/lib/utils";
function Skeleton({
@@ -28,7 +28,7 @@ function Skeleton({
return (
<Animated.View
- className={cn("bg-muted rounded-md", className)}
+ className={cn("rounded-md bg-muted", className)}
style={[{ opacity: fadeAnim }]}
{...props}
/>
diff --git a/apps/mobile/components/ui/Toast.tsx b/apps/mobile/components/ui/Toast.tsx
index fb319f84..9aa25e5c 100644
--- a/apps/mobile/components/ui/Toast.tsx
+++ b/apps/mobile/components/ui/Toast.tsx
@@ -1,6 +1,5 @@
import { createContext, useContext, useEffect, useRef, useState } from "react";
import { Animated, Text, View } from "react-native";
-
import { cn } from "@/lib/utils";
const toastVariants = {
@@ -67,7 +66,7 @@ function Toast({
],
}}
>
- <Text className="text-background text-left font-semibold">{message}</Text>
+ <Text className="text-left font-semibold text-background">{message}</Text>
{showProgress && (
<View className="mt-2 rounded">
<Animated.View