From 587e782e61c88280e7c92bf2407dbc0b025d464d Mon Sep 17 00:00:00 2001 From: Nathan Vasse Date: Tue, 23 Sep 2025 15:23:50 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8(demo)=20fix=20demo=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to previous changes, let's fix the lint for this app. --- apps/demo/src/App.tsx | 9 +++++---- apps/demo/src/Create.tsx | 12 +++++++++--- apps/demo/src/Home.tsx | 11 +++++------ 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/apps/demo/src/App.tsx b/apps/demo/src/App.tsx index 4a42bb1..b901cf2 100644 --- a/apps/demo/src/App.tsx +++ b/apps/demo/src/App.tsx @@ -45,11 +45,12 @@ const preferredScheme = window.matchMedia("(prefers-color-scheme: dark)") export const App = () => { const [locale] = useState("en-US"); const [theme, setTheme] = useState( - (sessionStorage.getItem("c-theme") as Theme | null) ?? preferredScheme.theme + (sessionStorage.getItem("c-theme") as Theme | null) ?? + preferredScheme.theme, ); const [variant, setVariant] = useState( (sessionStorage.getItem("c-variant") as Variant | null) ?? - preferredScheme.variant + preferredScheme.variant, ); const activeTheme = useMemo(() => THEMES[theme][variant], [theme, variant]); const modal = useModal(); @@ -97,7 +98,7 @@ export const App = () => { setTheme(e.target.value as Theme); if (THEMES[e.target.value as Theme][variant] === undefined) { setVariant( - variant === Variant.LIGHT ? Variant.DARK : Variant.LIGHT + variant === Variant.LIGHT ? Variant.DARK : Variant.LIGHT, ); } }} @@ -112,7 +113,7 @@ export const App = () => { } onClick={() => { setVariant( - variant === Variant.LIGHT ? Variant.DARK : Variant.LIGHT + variant === Variant.LIGHT ? Variant.DARK : Variant.LIGHT, ); }} disabled={ diff --git a/apps/demo/src/Create.tsx b/apps/demo/src/Create.tsx index 6b63a8a..5648b16 100644 --- a/apps/demo/src/Create.tsx +++ b/apps/demo/src/Create.tsx @@ -55,7 +55,9 @@ export const Create = (props: PageProps) => { >
-

General Information

+

+ General Information +

You are about to add a new character to the collection @@ -91,7 +93,9 @@ export const Create = (props: PageProps) => {
-

Bio

+

+ Bio +

Please be exhaustive, every detail counts! @@ -127,7 +131,9 @@ export const Create = (props: PageProps) => {
-

Add pictures

+

+ Add pictures +

{ // Set the pagination length. pagination.setPagesCount( - Math.ceil(sortedDatabase.length / pagination.pageSize) + Math.ceil(sortedDatabase.length / pagination.pageSize), ); // Select the rows to display on the current page. setRows( sortedDatabase.slice( (pagination.page - 1) * pagination.pageSize, - pagination.page * pagination.pageSize - ) + pagination.page * pagination.pageSize, + ), ); setIsLoading(false); }, [pagination.page, sortModel, modal.isOpen, refresh]); @@ -138,13 +137,13 @@ export const Home = ({ modal }: { modal: PageProps }) => { return; } const index = database.findIndex( - (character) => character.id === params.row.id + (character) => character.id === params.row.id, ); database.splice(index, 1); setRefresh(refresh + 1); toast( "Character deleted successfully", - VariantType.WARNING + VariantType.WARNING, ); }} icon={delete}