import { AppProvider } from "@shopify/polaris";
import polarisTranslations from "@shopify/polaris/locales/en.json";
import OverviewDashboard, { loader as appIndexLoader, action as appIndexAction } from "./app._index";

export const headers = () => {
  return {
    "X-Frame-Options": "ALLOWALL",
    "Content-Security-Policy": "frame-ancestors https://admin.shopify.com https://*.myshopify.com;",
  };
};

export const loader = appIndexLoader;
export const action = appIndexAction;

export default function RootIndex() {
 return (
    <AppProvider i18n={polarisTranslations}>
      <OverviewDashboard />
    </AppProvider>
  );
}
