From 76fd093c08ebc60116786815186fcf528e0e9786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 6 Mar 2024 14:01:37 +0100 Subject: [PATCH] fix: ToggleThemeButton deprecation --- CONTRIBUTING.md | 40 ++++++++++++++++++++++++++++++++++++++++ src/layout/AppBar.tsx | 3 +-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c5f70424..f0feafe3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,6 +24,46 @@ Then, if it appears that it's a real bug, you may report it using GitHub by foll Please base your changes on the `master` branch. + +### Testing Changes With the Distribution + +Start your project: + +```console +docker compose up --wait +``` + +Clone the API Platform Admin repository: + +```console +git clone https://github.com/api-platform/admin.git +``` + +Start your distribution-based project: + +```console +cd +docker compose up --wait +``` + +Change the entrypoint of the API to use the one served by Docker in `pwa/pages/admin/index.tsx`: + +```patch +- setDynamicAdmin(); ++ setDynamicAdmin(); +``` + +Link your local version of API Plarform Admin and start the PWA locally (outside Docker): + +```console +cd pwa/ +pnpm link ../../admin +pnpm run dev +``` + + + + ### Installing the Source Version To install the source version of API Platform Admin in your project and contribute a patch, follow the instructions below. diff --git a/src/layout/AppBar.tsx b/src/layout/AppBar.tsx index 0f2cafdd..3dc83d50 100644 --- a/src/layout/AppBar.tsx +++ b/src/layout/AppBar.tsx @@ -9,7 +9,6 @@ import type { AppBarProps } from 'react-admin'; import { Box, Typography } from '@mui/material'; import Logo from './Logo.js'; -import { darkTheme, lightTheme } from './themes.js'; const CustomAppBar = ({ classes, userMenu, ...props }: AppBarProps) => { const authProvider = useAuthProvider(); @@ -24,7 +23,7 @@ const CustomAppBar = ({ classes, userMenu, ...props }: AppBarProps) => { /> - + ); };