Changed props to be read-only, started using coalescing operator

This commit is contained in:
Moyasee
2025-09-19 17:43:21 +03:00
parent ab163ffa39
commit 04be5c754e
3 changed files with 6 additions and 13 deletions

View File

@@ -17,10 +17,10 @@ export interface SidebarAddingCustomGameModalProps {
onClose: () => void;
}
export function SidebarAddingCustomGameModal({
export function SidebarAddingCustomGameModal ({
visible,
onClose,
}: SidebarAddingCustomGameModalProps) {
}: Readonly<SidebarAddingCustomGameModalProps>) {
const { t } = useTranslation("sidebar");
const { updateLibrary } = useLibrary();
const { showSuccessToast, showErrorToast } = useToast();

View File

@@ -20,7 +20,7 @@ export function EditCustomGameModal({
onClose,
game,
onGameUpdated,
}: EditCustomGameModalProps) {
}: Readonly<EditCustomGameModalProps>) {
const { t } = useTranslation("sidebar");
const { showSuccessToast, showErrorToast } = useToast();