diff --git a/docs/Remix.md b/docs/Remix.md index 289f4537db5..ca45154e62a 100644 --- a/docs/Remix.md +++ b/docs/Remix.md @@ -66,8 +66,8 @@ export default defineConfig({ { // ... "resolutions": { - "react-router": "6.24.1", - "react-router-dom": "6.24.1" + "react-router": "6.26.1", + "react-router-dom": "6.26.1" } } ``` @@ -88,11 +88,6 @@ To do so, add a [splat route](https://remix.run/docs/en/main/file-conventions/ro // in app/routes/admin.$.tsx import { Admin, Resource, ListGuesser } from "react-admin"; import jsonServerProvider from "ra-data-json-server"; -import styles from "~/styles/admin.css"; - -export function links() { - return [{ rel: "stylesheet", href: styles }]; -} const dataProvider = jsonServerProvider("https://jsonplaceholder.typicode.com"); @@ -106,12 +101,6 @@ export default function App() { } ``` -The stylesheet link is necessary to reset the default styles of the admin app. Create it in `app/styles/admin.css`: - -```css -body { margin: 0; } -``` - **Tip** Don't forget to set the `` prop, so that react-admin generates links relative to the "/admin" subpath: You can now start the app in `development` mode with `npm run dev`. The admin should render at `http://localhost:3000/admin`, and you can use the Remix routing system to add more pages. diff --git a/docs/Vite.md b/docs/Vite.md index 81e2396ac38..f33ba41ac0a 100644 --- a/docs/Vite.md +++ b/docs/Vite.md @@ -12,13 +12,13 @@ title: "Installing React-admin With Vite" Create a new Vite project with React template using the command line: ```sh -yarn create vite my-admin --template react +yarn create vite my-admin --template react-ts ``` -We recommend using the TypeScript template: +**Tip**: If you prefer using JavaScript instead of TypeScript, change the template to `react`. ```sh -yarn create vite my-admin --template react-ts +yarn create vite my-admin --template react ``` ## Setting Up React-Admin @@ -61,16 +61,22 @@ const App = () => ; export default App; ``` -Then, change the `index.css` file to look like this: +Remove the `index.css` import in the `main.tsx` file: -```css -/* in src/index.css */ -body { - margin: 0; -} +```diff +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import App from './App.tsx' +-import './index.css' + +createRoot(document.getElementById('root')!).render( + + + , +) ``` -Next, add the `Roboto` font to your `index.html` file: +Finally, add the `Roboto` font to your `index.html` file: ```diff // in ./index.html diff --git a/examples/crm/index.html b/examples/crm/index.html index ac5e949cdfc..31edf18552e 100644 --- a/examples/crm/index.html +++ b/examples/crm/index.html @@ -1,4 +1,4 @@ - + @@ -11,12 +11,6 @@ Atomic CRM