frontend client for gemstone. decentralised workplace app

refactor: move loading component, provide optional colour prop

serenity 5227d5f7 8e613fd3

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