Skip to content

A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.

548 B
Raw Blame
import { Redirect, Stack } from 'expo-router';
import { useAuth } from '@microsoft/power-apps-native-host';

/**
 * Protected layout — any screen inside (app)/ is only reachable when signed in.
 * Unauthenticated users are redirected to /login automatically.
 */
export default function AppLayout() {
  const { isSignedIn, isLoading } = useAuth();

  if (!isLoading && !isSignedIn) {
    return <Redirect href="/login" />;
  }

  return (
    <Stack
      screenOptions={{
        headerShown: false,
      }}
    />
  );
}