From 619d50c29fa063d89c2363fa0c8ba23b806a68c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=CE=9E=E2=97=8EN?= <90662438+i-am-neon@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:32:10 -0500 Subject: [PATCH] visual and non-visual changes --- app/invoice/components/InvoiceDisplay.tsx | 2 +- app/invoice/components/InvoiceSummary.tsx | 2 +- app/lib/toTitleCase.ts | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 app/lib/toTitleCase.ts diff --git a/app/invoice/components/InvoiceDisplay.tsx b/app/invoice/components/InvoiceDisplay.tsx index 7d39e1e..b6ca3ce 100644 --- a/app/invoice/components/InvoiceDisplay.tsx +++ b/app/invoice/components/InvoiceDisplay.tsx @@ -6,7 +6,7 @@ interface InvoiceDisplayProps { const InvoiceDisplay = ({ invoice }: InvoiceDisplayProps) => { return ( -
+

Invoice

diff --git a/app/invoice/components/InvoiceSummary.tsx b/app/invoice/components/InvoiceSummary.tsx index 0b9ae10..ad5e596 100644 --- a/app/invoice/components/InvoiceSummary.tsx +++ b/app/invoice/components/InvoiceSummary.tsx @@ -13,7 +13,7 @@ const InvoiceSummary = ({ invoice }: InvoiceSummaryProps) => { return (

Summary

-
+
Amount
diff --git a/app/lib/toTitleCase.ts b/app/lib/toTitleCase.ts new file mode 100644 index 0000000..1411411 --- /dev/null +++ b/app/lib/toTitleCase.ts @@ -0,0 +1,8 @@ +export default function toTitleCase(input: string): string { + if (!input) return ''; + return input + .toLowerCase() + .split(' ') + .map(word => word.charAt(0).toUpperCase() + word.slice(1)) + .join(' '); +} \ No newline at end of file