From 19b5d73f50587f49321fe119d65524e6902e6d3d Mon Sep 17 00:00:00 2001 From: Alexander Alemayhu Date: Wed, 8 May 2024 17:57:49 +0200 Subject: [PATCH] fix: make props readonly --- src/components/NavigationBar/components/RightSide.tsx | 2 +- src/pages/HomePage/HomePage.tsx | 2 +- src/pages/SettingsPage/SettingsPage.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/NavigationBar/components/RightSide.tsx b/src/components/NavigationBar/components/RightSide.tsx index bb4ede7..676e5cd 100644 --- a/src/components/NavigationBar/components/RightSide.tsx +++ b/src/components/NavigationBar/components/RightSide.tsx @@ -8,7 +8,7 @@ interface RightSideProps { path: string; } -export function RightSide({ cookies, path }: RightSideProps) { +export function RightSide({ cookies, path }: Readonly) { if (cookies.token) { return getNavbarEnd(path, get2ankiApi()); } diff --git a/src/pages/HomePage/HomePage.tsx b/src/pages/HomePage/HomePage.tsx index ac0866f..cbcba97 100644 --- a/src/pages/HomePage/HomePage.tsx +++ b/src/pages/HomePage/HomePage.tsx @@ -12,7 +12,7 @@ interface HomePageProps { setErrorMessage: ErrorHandlerType; } -export function HomePage({ setErrorMessage }: HomePageProps) { +export function HomePage({ setErrorMessage }: Readonly) { return ( diff --git a/src/pages/SettingsPage/SettingsPage.tsx b/src/pages/SettingsPage/SettingsPage.tsx index 6fcb8ff..8fbe6b4 100644 --- a/src/pages/SettingsPage/SettingsPage.tsx +++ b/src/pages/SettingsPage/SettingsPage.tsx @@ -18,7 +18,7 @@ interface SettingsPageProps { } -export default function SettingsPage({ setErrorMessage }: SettingsPageProps) { +export default function SettingsPage({ setErrorMessage }: Readonly) { const customerPortal = process.env.NODE_ENV === 'development' ? portalLinks.development : portalLinks.production;