diff --git a/src/main.tsx b/src/main.tsx
index a6962a9..9790277 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -12,9 +12,9 @@ const queryClient = new QueryClient();
createRoot(document.getElementById("root")!).render(
-
+
-
+
);
diff --git a/src/routes/categories.tsx b/src/routes/categories.tsx
index 1a43516..c1ae4c2 100644
--- a/src/routes/categories.tsx
+++ b/src/routes/categories.tsx
@@ -6,9 +6,13 @@ type Category = {
};
export async function loader(): Promise {
- return fetch(`http://localhost:9000/categories`).then((response) => {
- return response.json();
- });
+ return [
+ { name: "Books", group: { name: "Media" } },
+ { name: "Movies", group: { name: "Media" } },
+ { name: "Groceries", group: { name: "Shopping" } },
+ { name: "Electronics", group: { name: "Shopping" } },
+ { name: "Misc", group: undefined }
+ ];
}
export default function Categories() {
diff --git a/src/routes/transactions.tsx b/src/routes/transactions.tsx
index 76c436a..32b8f5d 100644
--- a/src/routes/transactions.tsx
+++ b/src/routes/transactions.tsx
@@ -59,9 +59,14 @@ export default function Transactions() {
columnHelper.accessor("category", {
header: "Category",
cell: (props) => {
- console.log(props.getValue());
+ const [selectedCategory, setSelectedCategory] = useState(
+ props.getValue() as string
+ );
return (
-