From 873da53c68fcc877c6ae7cab4d0c283bfcfd0a41 Mon Sep 17 00:00:00 2001 From: toririm Date: Fri, 20 Sep 2024 02:49:44 +0900 Subject: [PATCH] fmt --unsafe --- app/components/ui/alert-dialog.tsx | 8 ++++---- app/components/ui/card.tsx | 4 ++-- app/components/ui/input.tsx | 2 +- app/components/ui/table.tsx | 2 +- app/repositories/item.ts | 6 ++---- app/repositories/order.ts | 3 +-- app/routes/_header.casher.tsx | 2 +- app/routes/items/route.tsx | 28 ++++++++++++++-------------- 8 files changed, 26 insertions(+), 29 deletions(-) diff --git a/app/components/ui/alert-dialog.tsx b/app/components/ui/alert-dialog.tsx index 92276c3c..4454253a 100644 --- a/app/components/ui/alert-dialog.tsx +++ b/app/components/ui/alert-dialog.tsx @@ -16,7 +16,7 @@ const AlertDialogOverlay = React.forwardRef< >(({ className, ...props }, ref) => ( (({ className, ...props }, ref) => ( )); @@ -89,7 +89,7 @@ const AlertDialogDescription = React.forwardRef< >(({ className, ...props }, ref) => ( )); diff --git a/app/components/ui/card.tsx b/app/components/ui/card.tsx index 5f60ec39..9f30d255 100644 --- a/app/components/ui/card.tsx +++ b/app/components/ui/card.tsx @@ -36,7 +36,7 @@ const CardTitle = React.forwardRef<

(({ className, ...props }, ref) => (

)); diff --git a/app/components/ui/input.tsx b/app/components/ui/input.tsx index 8ac4ede6..325413cc 100644 --- a/app/components/ui/input.tsx +++ b/app/components/ui/input.tsx @@ -11,7 +11,7 @@ const Input = React.forwardRef( (({ className, ...props }, ref) => ( )); diff --git a/app/repositories/item.ts b/app/repositories/item.ts index 24b571ca..888e9d2d 100644 --- a/app/repositories/item.ts +++ b/app/repositories/item.ts @@ -41,9 +41,8 @@ export const itemRepoFactory = (db: Firestore): ItemRepository => { save: async (item) => { if (hasId(item)) { return await update(item); - } else { - return await create(item); } + return await create(item); }, delete: async (id) => { @@ -55,9 +54,8 @@ export const itemRepoFactory = (db: Firestore): ItemRepository => { const docSnap = await getDoc(docRef); if (docSnap.exists()) { return docSnap.data(); - } else { - return null; } + return null; }, findAll: async () => { diff --git a/app/repositories/order.ts b/app/repositories/order.ts index d830c06e..efeaf43e 100644 --- a/app/repositories/order.ts +++ b/app/repositories/order.ts @@ -41,9 +41,8 @@ export const orderRepoFactory = (db: Firestore): OrderRepository => { save: async (order) => { if (hasId(order)) { return await update(order); - } else { - return await create(order); } + return await create(order); }, delete: async (id) => { diff --git a/app/routes/_header.casher.tsx b/app/routes/_header.casher.tsx index e4ff18d1..052c5d1f 100644 --- a/app/routes/_header.casher.tsx +++ b/app/routes/_header.casher.tsx @@ -90,7 +90,7 @@ export default function Casher() {

- + diff --git a/app/routes/items/route.tsx b/app/routes/items/route.tsx index a730c359..e237b254 100644 --- a/app/routes/items/route.tsx +++ b/app/routes/items/route.tsx @@ -54,19 +54,19 @@ export default function Item() { }, [items]); return ( -
-

アイテム管理

+
+

アイテム管理

-
+
-

+

新規アイテム登録

@@ -139,22 +139,22 @@ export default function Item() {
-

+

登録済みアイテム

{itemtypes.map((type) => (
-

+

{type2label[type]}

-
+
{sortedItems[type]?.map((item) => (
-

+

{item.name}

@@ -166,7 +166,7 @@ export default function Item() {