⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
fix infinite loading bug + enable corepack during eas submit
daniel31x13cf8447492115
diff --git a/apps/mobile/app/(tabs)/collections/index.tsx b/apps/mobile/app/(tabs)/collections/index.tsxindex 36c082f6..f13a58a0 100644--- a/apps/mobile/app/(tabs)/collections/index.tsx+++ b/apps/mobile/app/(tabs)/collections/index.tsx@@ -44,7 +44,7 @@ export default function CollectionsScreen() {collapsableChildren={false}>{collections.isLoading ? (- <View className="flex justify-center h-full items-center">+ <View className="flex justify-center h-screen items-center"><ActivityIndicator size="large" /><Text className="text-base mt-2.5 text-neutral">Loading...</Text></View>diff --git a/apps/mobile/app/(tabs)/dashboard/_layout.tsx b/apps/mobile/app/(tabs)/dashboard/_layout.tsxindex 72a0407d..c129eafc 100644--- a/apps/mobile/app/(tabs)/dashboard/_layout.tsx+++ b/apps/mobile/app/(tabs)/dashboard/_layout.tsx@@ -27,8 +27,8 @@ export default function Layout() {Platform.OS === "ios"? "transparent": colorScheme === "dark"- ? rawTheme["dark"]["base-100"]- : "white",+ ? rawTheme["dark"]["base-100"]+ : "white",},}}>diff --git a/apps/mobile/app/(tabs)/dashboard/index.tsx b/apps/mobile/app/(tabs)/dashboard/index.tsxindex ffb5ff56..19f734c1 100644--- a/apps/mobile/app/(tabs)/dashboard/index.tsx+++ b/apps/mobile/app/(tabs)/dashboard/index.tsx@@ -1,4 +1,11 @@-import { Platform, ScrollView, StyleSheet } from "react-native";+import {+ ActivityIndicator,+ Platform,+ ScrollView,+ StyleSheet,+ Text,+ View,+} from "react-native";import React, { useEffect, useMemo, useState } from "react";import { useDashboardData } from "@linkwarden/router/dashboardData";import useAuthStore from "@/store/auth";@@ -53,22 +60,36 @@ export default function DashboardScreen() {});}, [dashboardSections]);+ const [pullRefreshing, setPullRefreshing] = useState(false);++ const onRefresh = async () => {+ setPullRefreshing(true);+ try {+ await Promise.all([+ dashboardData.refetch(),+ userData.refetch(),+ collectionsData.refetch(),+ tagsData.refetch(),+ ]);+ } finally {+ setPullRefreshing(false);+ }+ };++ if (orderedSections.length === 0 && dashboardData.isLoading)+ return (+ <View className="flex justify-center h-screen items-center bg-base-100">+ <ActivityIndicator size="large" />+ <Text className="text-base mt-2.5 text-neutral">Loading...</Text>+ </View>+ );+return (<ScrollViewrefreshControl={<Spinner- refreshing={- dashboardData.isRefetching ||- userData.isRefetching ||- collectionsData.isRefetching ||- tagsData.isRefetching- }- onRefresh={() => {- dashboardData.refetch();- userData.refetch();- collectionsData.refetch();- tagsData.refetch();- }}+ refreshing={pullRefreshing}+ onRefresh={onRefresh}progressBackgroundColor={rawTheme[colorScheme as ThemeName]["base-200"]}diff --git a/apps/mobile/app/(tabs)/tags/index.tsx b/apps/mobile/app/(tabs)/tags/index.tsxindex ff20d7d6..12bceaf7 100644--- a/apps/mobile/app/(tabs)/tags/index.tsx+++ b/apps/mobile/app/(tabs)/tags/index.tsx@@ -42,7 +42,7 @@ export default function TagsScreen() {collapsableChildren={false}>{tags.isLoading ? (- <View className="flex justify-center h-full items-center">+ <View className="flex justify-center h-screen items-center"><ActivityIndicator size="large" /><Text className="text-base mt-2.5 text-neutral">Loading...</Text></View>diff --git a/apps/mobile/components/ActionSheets/AddLinkSheet.tsx b/apps/mobile/components/ActionSheets/AddLinkSheet.tsxindex 12b33731..c45e80f3 100644--- a/apps/mobile/components/ActionSheets/AddLinkSheet.tsx+++ b/apps/mobile/components/ActionSheets/AddLinkSheet.tsx@@ -1,4 +1,4 @@-import { Alert, Platform, Text, View } from "react-native";+import { Alert, Text, View } from "react-native";import { useRef, useState } from "react";import ActionSheet, { ActionSheetRef } from "react-native-actions-sheet";import Input from "@/components/ui/Input";diff --git a/apps/mobile/components/ActionSheets/EditLinkSheet.tsx b/apps/mobile/components/ActionSheets/EditLinkSheet.tsxindex c7d82938..531ed6ca 100644--- a/apps/mobile/components/ActionSheets/EditLinkSheet.tsx+++ b/apps/mobile/components/ActionSheets/EditLinkSheet.tsx@@ -1,4 +1,4 @@-import { View, Text, Alert, Platform } from "react-native";+import { View, Text, Alert } from "react-native";import { useCallback, useEffect, useMemo, useState } from "react";import ActionSheet, {FlatList,diff --git a/apps/mobile/components/ActionSheets/NewCollectionSheet.tsx b/apps/mobile/components/ActionSheets/NewCollectionSheet.tsxindex 32aa3070..3a65f54c 100644--- a/apps/mobile/components/ActionSheets/NewCollectionSheet.tsx+++ b/apps/mobile/components/ActionSheets/NewCollectionSheet.tsx@@ -1,4 +1,4 @@-import { Alert, Platform, Text, View } from "react-native";+import { Alert, Text, View } from "react-native";import { useRef, useState } from "react";import ActionSheet, { ActionSheetRef } from "react-native-actions-sheet";import Input from "@/components/ui/Input";diff --git a/apps/mobile/components/Links.tsx b/apps/mobile/components/Links.tsxindex 8c7f6785..88108796 100644--- a/apps/mobile/components/Links.tsx+++ b/apps/mobile/components/Links.tsx@@ -28,7 +28,7 @@ export default function Links({ links, data }: Props) {const [promptedRefetch, setPromptedRefetch] = useState(false);return data.isLoading ? (- <View className="flex justify-center h-full items-center">+ <View className="flex justify-center h-screen items-center"><ActivityIndicator size="large" /><Text className="text-base mt-2.5 text-neutral">Loading...</Text></View>diff --git a/apps/mobile/components/Modals/AddLink.tsx b/apps/mobile/components/Modals/AddLink.tsxdeleted file mode 100644index c2115fc7..00000000--- a/apps/mobile/components/Modals/AddLink.tsx+++ /dev/null@@ -1,17 +0,0 @@-import { PropsWithChildren } from "react";-import { IconSymbol } from "../ui/IconSymbol";-import ModalBase from "../ModalBase";-import { Text } from "react-native";--type Props = PropsWithChildren<{- isVisible: boolean;- onClose: () => void;-}>;--export default function AddLink({ isVisible, onClose }: Props) {- return (- // <ModalBase isVisible={isVisible} onClose={onClose}>- <Text>Hi</Text>- // </ModalBase>- );-}diff --git a/apps/mobile/eas.json b/apps/mobile/eas.jsonindex c8f1025d..036f2f84 100644--- a/apps/mobile/eas.json+++ b/apps/mobile/eas.json@@ -20,6 +20,7 @@}},"production": {+ "corepack": true,"distribution": "store","autoIncrement": true,"channel": "production"diff --git a/package.json b/package.jsonindex 3fbb67a1..5b500f5c 100644--- a/package.json+++ b/package.json@@ -23,10 +23,6 @@"format": "yarn workspaces run format","postinstall": "yarn workspace @linkwarden/web run postinstall && patch-package"},- "resolutions": {- "@types/react": "18.3.1",- "@types/react-dom": "18.3.1"- },"devDependencies": {"dotenv-cli": "^8.0.0"},