From b2133d0564fa17aae4ee09187b0923c446e07bb7 Mon Sep 17 00:00:00 2001 From: Shuveksha Tuladhar Date: Tue, 8 Oct 2024 14:45:30 -0700 Subject: [PATCH 1/4] style(#21): Implement TailwindCSS for the ManageList page --- src/views/ManageList.jsx | 128 ++++++++++++++++++++++++--------------- 1 file changed, 80 insertions(+), 48 deletions(-) diff --git a/src/views/ManageList.jsx b/src/views/ManageList.jsx index 2113ae7..26fc8f0 100644 --- a/src/views/ManageList.jsx +++ b/src/views/ManageList.jsx @@ -58,57 +58,89 @@ export function ManageList({ listPath, data }) { }; return ( -
+
-

Manage Your Shopping List for {extractedListName}

-
- - setItemName(e.target.value)} - /> - -
- How soon will you need to buy this item again? - {' '} -
- {' '} -
-
From 60df053c418c3b90d59001f96060b61300041907 Mon Sep 17 00:00:00 2001 From: Shuveksha Tuladhar Date: Wed, 9 Oct 2024 11:23:16 -0700 Subject: [PATCH 2/4] refactor(#21): Change component ManageList to AddItem, update route to /add-item, and implement gradient colors and fixed width for radio buttons --- src/App.jsx | 6 +++--- src/views/{ManageList.jsx => AddItem.jsx} | 26 +++++++++++------------ src/views/Layout.jsx | 2 +- src/views/index.js | 2 +- tailwind.config.js | 4 ++++ 5 files changed, 22 insertions(+), 18 deletions(-) rename src/views/{ManageList.jsx => AddItem.jsx} (81%) diff --git a/src/App.jsx b/src/App.jsx index 62f2095..cdd5299 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,6 +1,6 @@ import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; import { Suspense } from 'react'; -import { Home, Layout, ManageList, Team } from './views'; +import { Home, Layout, AddItem, Team } from './views'; import { Loading } from './components/Loading'; import { ProtectedRoute } from './components/ProtectedRoute'; import { useAuth, useShoppingListData, useShoppingLists } from './api'; @@ -59,10 +59,10 @@ export function App() { } /> - + } /> diff --git a/src/views/ManageList.jsx b/src/views/AddItem.jsx similarity index 81% rename from src/views/ManageList.jsx rename to src/views/AddItem.jsx index 26fc8f0..2a0b23f 100644 --- a/src/views/ManageList.jsx +++ b/src/views/AddItem.jsx @@ -5,7 +5,7 @@ import { FaPlusSquare } from 'react-icons/fa'; import { IconButton } from '../components/IconButton'; import { notify } from '../utils/notifications'; -export function ManageList({ listPath, data }) { +export function AddItem({ listPath, data }) { const [itemName, setItemName] = useState(''); const [daysUntilNextPurchase, setDaysUntilNextPurchase] = useState(7); @@ -58,9 +58,9 @@ export function ManageList({ listPath, data }) { }; return ( -
+
-

+

Manage Your Shopping List for{' '} {extractedListName}

@@ -68,7 +68,7 @@ export function ManageList({ listPath, data }) {
@@ -85,15 +85,15 @@ export function ManageList({ listPath, data }) { How soon will you need to buy this item again? -
-
-