diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1054683..b1f1231 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -32,4 +32,4 @@ jobs:
run: npm audit --audit-level=moderate || echo "Security audit completed with issues"
# - name: 🧪 Run Jest Tests
-# run: npm test
\ No newline at end of file
+# run: npm test
diff --git a/api/ocr.ts b/api/ocr.ts
index b373987..b143109 100644
--- a/api/ocr.ts
+++ b/api/ocr.ts
@@ -5,8 +5,8 @@ import fs from "node:fs/promises";
export const config = {
api: {
bodyParser: false,
- maxDuration: 10
- }
+ maxDuration: 10,
+ },
};
type VisionAnnotateResponse = {
@@ -28,15 +28,21 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
multiples: false,
maxFileSize: 8 * 1024 * 1024,
filter: (part) =>
- part.mimetype ? /^image\/(png|jpe?g|webp)$/i.test(part.mimetype) : false
+ part.mimetype
+ ? /^image\/(png|jpe?g|webp)$/i.test(part.mimetype)
+ : false,
});
- const { files } = await new Promise<{ files: FormidableFiles }>((resolve, reject) =>
- form.parse(req, (err, _fields, files) => (err ? reject(err) : resolve({ files })))
+ const { files } = await new Promise<{ files: FormidableFiles }>(
+ (resolve, reject) =>
+ form.parse(req, (err, _fields, files) =>
+ err ? reject(err) : resolve({ files }),
+ ),
);
const file = Array.isArray(files.file) ? files.file[0] : files.file;
- if (!file?.filepath) return res.status(400).json({ error: "No file uploaded" });
+ if (!file?.filepath)
+ return res.status(400).json({ error: "No file uploaded" });
const buf = await fs.readFile(file.filepath);
const content = buf.toString("base64");
@@ -51,11 +57,11 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
requests: [
{
image: { content },
- features: [{ type: "TEXT_DETECTION" }]
- }
- ]
- })
- }
+ features: [{ type: "TEXT_DETECTION" }],
+ },
+ ],
+ }),
+ },
);
if (!r.ok) {
@@ -70,11 +76,12 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
resp?.textAnnotations?.[0]?.description ??
"";
- if (!text) return res.status(200).json({ text: "", warning: "No text found" });
+ if (!text)
+ return res.status(200).json({ text: "", warning: "No text found" });
return res.status(200).json({ text });
} catch (err: unknown) {
const msg = err instanceof Error ? err.message : "OCR failed";
console.error(err);
return res.status(500).json({ error: msg });
}
-}
\ No newline at end of file
+}
diff --git a/index.html b/index.html
index cbae255..151fac2 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,10 @@
Bill Buddy
-
+
diff --git a/src/App.tsx b/src/App.tsx
index fce7c43..ea3246b 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,11 +1,11 @@
-import { Routes, Route } from 'react-router-dom';
+import { Routes, Route } from "react-router-dom";
-import Calculator from './pages/Calculator';
-import Footer from './components/Footer';
-import Home from './pages/Home';
-import Navbar from './components/Navbar';
-import Review from './pages/Review';
-import Split from './pages/Split';
+import Calculator from "./pages/Calculator";
+import Footer from "./components/Footer";
+import Home from "./pages/Home";
+import Navbar from "./components/Navbar";
+import Review from "./pages/Review";
+import Split from "./pages/Split";
const App = () => {
return (
@@ -19,7 +19,7 @@ const App = () => {
>
- )
+ );
};
export default App;
diff --git a/src/components/AssignItemModal.module.css b/src/components/AssignItemModal.module.css
index 0d481be..f8f0f5a 100644
--- a/src/components/AssignItemModal.module.css
+++ b/src/components/AssignItemModal.module.css
@@ -1,6 +1,6 @@
/* Modal Title*/
.modalTitle {
- font-weight: bold;
+ font-weight: bold;
}
/* People Selection */
@@ -96,4 +96,4 @@
.warning::before {
content: "⚠️ ";
margin-right: 0.5rem;
-}
\ No newline at end of file
+}
diff --git a/src/components/Footer.module.css b/src/components/Footer.module.css
index ce8810b..7aa340b 100644
--- a/src/components/Footer.module.css
+++ b/src/components/Footer.module.css
@@ -1,20 +1,20 @@
footer {
- margin-top: 4rem;
- padding: 2rem 1rem;
- text-align: center;
- font-size: 0.9rem;
- color: #666;
- border-top: 1px solid #eee;
+ margin-top: 4rem;
+ padding: 2rem 1rem;
+ text-align: center;
+ font-size: 0.9rem;
+ color: #666;
+ border-top: 1px solid #eee;
}
-
+
footer a {
- color: var(--primary-pink);
- font-weight: 600;
- text-decoration: none;
+ color: var(--primary-pink);
+ font-weight: 600;
+ text-decoration: none;
}
-
+
footer a:hover {
- text-decoration: underline;
- color: var(--primary-pink);
- cursor: url('/cursors/Yellow.png'), auto;
-}
\ No newline at end of file
+ text-decoration: underline;
+ color: var(--primary-pink);
+ cursor: url("/cursors/Yellow.png"), auto;
+}
diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx
index 9a0e4a7..f957fa8 100644
--- a/src/components/Footer.tsx
+++ b/src/components/Footer.tsx
@@ -1,24 +1,31 @@
-import confetti from 'canvas-confetti';
+import confetti from "canvas-confetti";
-import styles from "./Footer.module.css"
+import styles from "./Footer.module.css";
const Footer = () => {
- const handleHover = () => {
- confetti({
- particleCount: 150,
- spread: 60,
- origin: { y: 0.6 },
- scalar: 0.6,
- });
- };
-
- return (
-
- )
+ const handleHover = () => {
+ confetti({
+ particleCount: 150,
+ spread: 60,
+ origin: { y: 0.6 },
+ scalar: 0.6,
+ });
+ };
+
+ return (
+
+ );
};
-export default Footer;
\ No newline at end of file
+export default Footer;
diff --git a/src/components/Navbar.module.css b/src/components/Navbar.module.css
index d0308bd..48a7727 100644
--- a/src/components/Navbar.module.css
+++ b/src/components/Navbar.module.css
@@ -1,25 +1,25 @@
.navbar {
- width: 100%;
- padding: 1rem 2rem;
- background-color: white;
- border-bottom: 1px solid #eee;
- display: flex;
- align-items: center;
- justify-content: space-between;
- position: sticky;
- top: 0;
- z-index: 10;
+ width: 100%;
+ padding: 1rem 2rem;
+ background-color: white;
+ border-bottom: 1px solid #eee;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ position: sticky;
+ top: 0;
+ z-index: 10;
}
-
+
.logo {
- font-size: 1.5rem;
- font-weight: bold;
- color: var(--primary-pink);
- text-decoration: none;
- transition: color 0.3s ease;
+ font-size: 1.5rem;
+ font-weight: bold;
+ color: var(--primary-pink);
+ text-decoration: none;
+ transition: color 0.3s ease;
}
-
+
.logo:hover {
- color: #db195a;
- cursor: url('/cursors/Yellow.png'), auto;
+ color: #db195a;
+ cursor: url("/cursors/Yellow.png"), auto;
}
diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx
index ee0031b..9040971 100644
--- a/src/components/Navbar.tsx
+++ b/src/components/Navbar.tsx
@@ -1,14 +1,14 @@
import { Link } from "react-router-dom";
-import styles from './Navbar.module.css';
+import styles from "./Navbar.module.css";
const Navbar = () => {
- return (
-
- )
+ return (
+
+ );
};
-export default Navbar;
\ No newline at end of file
+export default Navbar;
diff --git a/src/components/PeopleManager/AddPersonModal.module.css b/src/components/PeopleManager/AddPersonModal.module.css
index 40a0887..a962723 100644
--- a/src/components/PeopleManager/AddPersonModal.module.css
+++ b/src/components/PeopleManager/AddPersonModal.module.css
@@ -1,4 +1,4 @@
/* Modal Title*/
.modalTitle {
- font-weight: bold;
-}
\ No newline at end of file
+ font-weight: bold;
+}
diff --git a/src/components/PeopleManager/AddPersonModal.tsx b/src/components/PeopleManager/AddPersonModal.tsx
index 49c0410..925c009 100644
--- a/src/components/PeopleManager/AddPersonModal.tsx
+++ b/src/components/PeopleManager/AddPersonModal.tsx
@@ -1,7 +1,7 @@
import Modal from "react-bootstrap/Modal";
import { useState } from "react";
import { DEFAULT_COLORS } from "./usePeople";
-import styles from './AddPersonModal.module.css';
+import styles from "./AddPersonModal.module.css";
interface Props {
show: boolean;
@@ -47,7 +47,7 @@ export default function AddPersonModal({ show, onClose, onSubmit }: Props) {
height: 28,
borderRadius: "50%",
border: color === c ? "3px solid #111" : "1px solid #aaa",
- backgroundColor: c
+ backgroundColor: c,
}}
/>
))}
@@ -58,10 +58,14 @@ export default function AddPersonModal({ show, onClose, onSubmit }: Props) {
-