frontend client for gemstone. decentralised workplace app
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: move loading component, provide optional colour prop

serenity 5227d5f7 8e613fd3

+15 -12
+1 -1
src/app/(protected)/index.tsx
··· 1 1 import ChatComponentProfiled from "@/components/ChatComponentProfiled"; 2 - import { Loading } from "@/components/Loading"; 2 + import { Loading } from "@/components/primitives/Loading"; 3 3 import { useChannelRecords } from "@/providers/authed/ChannelsProvider"; 4 4 import { useSessions } from "@/providers/authed/SessionsProvider"; 5 5 import { View } from "react-native";
+1 -1
src/app/login.tsx
··· 1 1 import { Login } from "@/components/Auth/Login"; 2 - import { Loading } from "@/components/Loading"; 2 + import { Loading } from "@/components/primitives/Loading"; 3 3 import { useOAuthValue } from "@/providers/OAuthProvider"; 4 4 import { Redirect } from "expo-router"; 5 5 import { View } from "react-native";
+1 -1
src/components/Auth/SessionGate.tsx
··· 1 - import { Loading } from "@/components/Loading"; 1 + import { Loading } from "@/components/primitives/Loading"; 2 2 import { useOAuthValue } from "@/providers/OAuthProvider"; 3 3 import { Redirect } from "expo-router"; 4 4 import type { ReactNode } from "react";
-9
src/components/Loading.tsx
··· 1 - import { ActivityIndicator, View } from "react-native"; 2 - 3 - export const Loading = () => { 4 - return ( 5 - <View> 6 - <ActivityIndicator size="large" /> 7 - </View> 8 - ); 9 - };
+12
src/components/primitives/Loading.tsx
··· 1 + import type { HexCode } from "@/lib/facet/src/palette"; 2 + import { useCurrentPalette } from "@/providers/ThemeProvider"; 3 + import { ActivityIndicator, View } from "react-native"; 4 + 5 + export const Loading = ({ color }: { color?: HexCode }) => { 6 + const { semantic } = useCurrentPalette() 7 + return ( 8 + <View> 9 + <ActivityIndicator size="large" color={color ?? semantic.primary} /> 10 + </View> 11 + ); 12 + };