From 3f8a37b15c3fd1168b01390241cda7fa2ba980c7 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Sun, 26 Mar 2023 15:15:08 +0700
Subject: fix

---
 src/lib/transaction/components/Transaction.jsx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'src/lib/transaction/components/Transaction.jsx')

diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx
index dbfdbae9..cba7646f 100644
--- a/src/lib/transaction/components/Transaction.jsx
+++ b/src/lib/transaction/components/Transaction.jsx
@@ -20,6 +20,7 @@ import DesktopView from '@/core/components/views/DesktopView'
 import Menu from '@/lib/auth/components/Menu'
 import Image from '@/core/components/elements/Image/Image'
 import { createSlug } from '@/core/utils/slug'
+import toTitleCase from '@/core/utils/toTitleCase'
 
 const Transaction = ({ id }) => {
   const { transaction } = useTransaction({ id })
@@ -528,9 +529,9 @@ const SectionButton = ({ label, active, toggle }) => (
 const SectionContent = ({ address }) => {
   let fullAddress = []
   if (address?.street) fullAddress.push(address.street)
-  if (address?.subDistrict?.name) fullAddress.push(address.subDistrict.name)
-  if (address?.district?.name) fullAddress.push(address.district.name)
-  if (address?.city?.name) fullAddress.push(address.city.name)
+  if (address?.subDistrict?.name) fullAddress.push(toTitleCase(address.subDistrict.name))
+  if (address?.district?.name) fullAddress.push(toTitleCase(address.district.name))
+  if (address?.city?.name) fullAddress.push(toTitleCase(address.city.name))
   fullAddress = fullAddress.join(', ')
 
   return (
-- 
cgit v1.2.3

