Skip to content

Commit

Permalink
use direct import
Browse files Browse the repository at this point in the history
  • Loading branch information
suren-atoyan committed Mar 1, 2025
1 parent bb2e0f5 commit bf28d09
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests:e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run test:e2e
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
Expand Down
8 changes: 4 additions & 4 deletions src/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ComponentType, StrictMode } from 'react';
import { createRoot } from 'react-dom/client';

// from MUI's toolpad we use only Notifications
// from MUI's toolpad we only use Notifications
import { NotificationsProvider } from '@toolpad/core/useNotifications';
import { Provider } from 'jotai';
import { Provider as JotaiProvider } from 'jotai';

import ThemeProvider from '@/theme/Provider';

Expand All @@ -13,13 +13,13 @@ const root = createRoot(container);
function render(App: ComponentType) {
root.render(
<StrictMode>
<Provider>
<JotaiProvider>
<ThemeProvider>
<NotificationsProvider>
<App />
</NotificationsProvider>
</ThemeProvider>
</Provider>
</JotaiProvider>
</StrictMode>,
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import App from '@/App';
import render from '@/root';
import welcome from '@/utils/welcome';

import './index.css';
Expand All @@ -10,9 +12,7 @@ import './index.css';
// Importing them with Promise.all (by using HTTP/2/3 multiplexing) we can load them in parallel
// and achieve the best possible performance

Promise.all([import('@/root'), import('@/App')]).then(([{ default: render }, { default: App }]) => {
render(App);
});
render(App);

// welcome message for users in the console
welcome();
2 changes: 1 addition & 1 deletion tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"module": "ESNext",
"skipLibCheck": true,
"baseUrl": ".",
"paths": { "@/*": ["./src/*"] },
"paths": { "@/*": ["src/*"] },

/* Bundler mode */
"moduleResolution": "bundler",
Expand Down

0 comments on commit bf28d09

Please sign in to comment.