frontend client for gemstone. decentralised workplace app

refactor: stub implementation of home

serenity 92a82f2c 4955b50c

Changed files
+19 -17
src
app
(protected)
components
Home
+12 -9
src/app/(protected)/_layout.tsx
···
import { SessionGate } from "@/components/Auth/SessionGate";
-
import { ChannelsDrawer } from "@/components/Navigation/ChannelsDrawer";
import { TopBar } from "@/components/Navigation/TopBar";
import { Stack } from "@/components/primitives/Stack";
import { AuthedProviders } from "@/providers/authed";
···
export default function ProtectedLayout() {
const { semantic } = useCurrentPalette();
return (
<SessionGate>
<AuthedProviders>
···
}}
>
<TopBar />
-
<ChannelsDrawer />
-
<Stack
-
screenOptions={{
-
contentStyle: {
-
backgroundColor: semantic.background,
-
},
-
}}
-
/>
</View>
</AuthedProviders>
</SessionGate>
···
import { SessionGate } from "@/components/Auth/SessionGate";
+
import { ChannelsPicker } from "@/components/Navigation/ChannelsPicker";
import { TopBar } from "@/components/Navigation/TopBar";
import { Stack } from "@/components/primitives/Stack";
import { AuthedProviders } from "@/providers/authed";
···
export default function ProtectedLayout() {
const { semantic } = useCurrentPalette();
+
return (
<SessionGate>
<AuthedProviders>
···
}}
>
<TopBar />
+
<View style={{ flex: 1, flexDirection: "row" }}>
+
<ChannelsPicker />
+
<Stack
+
screenOptions={{
+
contentStyle: {
+
backgroundColor: semantic.background,
+
},
+
}}
+
/>
+
</View>
</View>
</AuthedProviders>
</SessionGate>
+2 -8
src/app/(protected)/index.tsx
···
-
import { Chat } from "@/components/Chat";
import { Loading } from "@/components/primitives/Loading";
-
import { useChannelRecords } from "@/providers/authed/ChannelsProvider";
import { useSessions } from "@/providers/authed/SessionsProvider";
import { View } from "react-native";
export default function Index() {
-
const { channels } = useChannelRecords();
const { isInitialising } = useSessions();
const isAppReady = !isInitialising;
···
alignItems: "stretch",
}}
>
-
{isAppReady ? (
-
<Chat channelAtUri={channels[0].channelAtUri} />
-
) : (
-
<Loading />
-
)}
</View>
);
}
···
+
import { Home } from "@/components/Home";
import { Loading } from "@/components/primitives/Loading";
import { useSessions } from "@/providers/authed/SessionsProvider";
import { View } from "react-native";
export default function Index() {
const { isInitialising } = useSessions();
const isAppReady = !isInitialising;
···
alignItems: "stretch",
}}
>
+
{isAppReady ? <Home /> : <Loading />}
</View>
);
}
+5
src/components/Home/index.tsx
···
···
+
import { View } from "react-native";
+
+
export const Home = () => {
+
return <View></View>;
+
};