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.

1.2 KB
Raw Blame
// @ts-nocheck
import { Stack } from 'expo-router'
import { StatusBar } from 'expo-status-bar'
import { useColorScheme } from 'react-native'
import { PowerAppsProvider, lightTheme, darkTheme } from '@microsoft/power-apps-native-host'

import authConfig from '../auth.config.json'
// @ts-ignore - power.config.json is generated by power-apps init
import powerConfig from '../power.config.json'
// @ts-ignore - connectorSchemas is generated after data sources are added
import { schemaMap } from '../src/generated/connectorSchemas'
import { tamaguiConfig } from '../tamagui.config'

export default function RootLayout() {
  const colorScheme = useColorScheme()

  return (
    <PowerAppsProvider
      msalConfig={authConfig.msal}
      powerConfig={powerConfig}
      schemaMap={schemaMap}
      tamaguiConfig={tamaguiConfig}
      defaultTheme={colorScheme ?? 'light'}
      theme={lightTheme}
      darkTheme={darkTheme}
    >
      <StatusBar style="auto" />
      <Stack screenOptions={{ headerShown: true }}>
        <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
        <Stack.Screen name="(auth)" options={{ headerShown: false, presentation: 'modal' }} />
        <Stack.Screen name="+not-found" />
      </Stack>
    </PowerAppsProvider>
  )
}