Sha256: 5612a6a30361ec19a6be216a5c9a8c23c266af6d06265e04120e058cd0e5baa1

Contents?: true

Size: 759 Bytes

Versions: 92

Compression:

Stored size: 759 Bytes

Contents

import "../styles/application.css"
import { createInertiaApp } from '@inertiajs/react'
import { createRoot } from 'react-dom/client'
import Layout from '../layouts/Layout';

document.addEventListener('DOMContentLoaded', () => {
  createInertiaApp({
    resolve: name => {
      const pages = import.meta.glob('../pages/**/*.tsx', { eager: true })
      let page = pages[`../${name}.tsx`];
      if (!page.default) {
        alert(`The page ${name} could not be found, you probably forgot to export default.`);
        return;
      }
      page.default.layout = page.default.layout || (page => <Layout children={page} />)
      return page;
    },
    setup({ el, App, props }) {
      createRoot(el).render(
        <App {...props} />
      )
    },
  })
}) 

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
easy_ml-0.2.0.pre.rc105 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc104 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc103 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc102 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc101 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc100 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc99 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc98 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc97 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc96 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc95 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc94 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc93 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc92 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc91 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc90 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc89 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc88 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc85 app/frontend/entrypoints/Application.tsx
easy_ml-0.2.0.pre.rc84 app/frontend/entrypoints/Application.tsx