From 021582f90e86514f1cd8ecffab75b6e0a673efa6 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sun, 7 May 2023 02:05:08 -0500 Subject: [PATCH] Add links to navbar --- Dockerfile | 15 +++++++++++++ README.md | 0 items.csv | 0 package-lock.json | 0 package.json | 0 public/favicon.ico | Bin public/index.html | 0 public/logo192.png | Bin public/logo512.png | Bin public/manifest.json | 0 public/progress1.mp3 | Bin public/progress2.mp3 | Bin public/robots.txt | 0 src/App.css | 0 src/App.js | 49 +++++++++++++++++++++++++++++++++++++---- src/App.test.js | 0 src/index.css | 0 src/index.js | 0 src/logo512.png | Bin src/reportWebVitals.js | 0 src/setupTests.js | 0 21 files changed, 60 insertions(+), 4 deletions(-) create mode 100755 Dockerfile mode change 100644 => 100755 README.md mode change 100644 => 100755 items.csv mode change 100644 => 100755 package-lock.json mode change 100644 => 100755 package.json mode change 100644 => 100755 public/favicon.ico mode change 100644 => 100755 public/index.html mode change 100644 => 100755 public/logo192.png mode change 100644 => 100755 public/logo512.png mode change 100644 => 100755 public/manifest.json mode change 100644 => 100755 public/progress1.mp3 mode change 100644 => 100755 public/progress2.mp3 mode change 100644 => 100755 public/robots.txt mode change 100644 => 100755 src/App.css mode change 100644 => 100755 src/App.js mode change 100644 => 100755 src/App.test.js mode change 100644 => 100755 src/index.css mode change 100644 => 100755 src/index.js mode change 100644 => 100755 src/logo512.png mode change 100644 => 100755 src/reportWebVitals.js mode change 100644 => 100755 src/setupTests.js diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..d4fcff9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# pull official base image +FROM node:13.12.0-alpine + +RUN mkdir -p /app +WORKDIR /app +EXPOSE 3001 + +ENV PATH /app/node_modules/.bin:$PATH + +COPY . /app + +RUN npm install -y --silent +RUN npm rebuild node-sass + +CMD ["npm", "start"] \ No newline at end of file diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/items.csv b/items.csv old mode 100644 new mode 100755 diff --git a/package-lock.json b/package-lock.json old mode 100644 new mode 100755 diff --git a/package.json b/package.json old mode 100644 new mode 100755 diff --git a/public/favicon.ico b/public/favicon.ico old mode 100644 new mode 100755 diff --git a/public/index.html b/public/index.html old mode 100644 new mode 100755 diff --git a/public/logo192.png b/public/logo192.png old mode 100644 new mode 100755 diff --git a/public/logo512.png b/public/logo512.png old mode 100644 new mode 100755 diff --git a/public/manifest.json b/public/manifest.json old mode 100644 new mode 100755 diff --git a/public/progress1.mp3 b/public/progress1.mp3 old mode 100644 new mode 100755 diff --git a/public/progress2.mp3 b/public/progress2.mp3 old mode 100644 new mode 100755 diff --git a/public/robots.txt b/public/robots.txt old mode 100644 new mode 100755 diff --git a/src/App.css b/src/App.css old mode 100644 new mode 100755 diff --git a/src/App.js b/src/App.js old mode 100644 new mode 100755 index 2698d07..cd12fc2 --- a/src/App.js +++ b/src/App.js @@ -13,6 +13,7 @@ import ProgressBar from 'react-bootstrap/ProgressBar'; import Accordion from 'react-bootstrap/Accordion'; import ToastContainer from 'react-bootstrap/ToastContainer' import Toast from 'react-bootstrap/Toast' +import Nav from 'react-bootstrap/Nav' import { FaCheckCircle } from 'react-icons/fa'; @@ -20,7 +21,7 @@ import { FaCheckCircle } from 'react-icons/fa'; const parse = require('csv-parse/lib/sync') const axios = require('axios'); -const dataSplitters = [0,135,250,388] +const dataSplitters = [0,128,225,363] const BACKEND_URL = "https://projectdivar.com:4505" @@ -107,6 +108,35 @@ function Notification(p) { } +function DarkInput(p){ + const {props}=p; + return +} + +function SorterApp(){ + const [item1,setItem1] = useState("") + const [item2,setItem2] = useState("") + const [item3,setItem3] = useState("") + const [item4,setItem4] = useState("") + const [item5,setItem5] = useState("") + const [item6,setItem6] = useState("") + + return <> + Item 1:{setItem1(f.currentTarget.value);}}> + + + + + + +} + +function ListApp(){ + return <> +

List App!

+ +} + function App() { const [data,setData] = useState([]) @@ -125,6 +155,8 @@ function App() { const [notifications,setNotifications] = useState([]) const [closedNotifications,setClosedNotifications] = useState([]) + const [nav,setNav] = useState("main") + function LZ(digits,numb) { return "0".repeat(digits-String(numb).length)+numb } @@ -278,7 +310,12 @@ function App() { BUN logo BUN Collab App - {contributor.length>0&&Signed in as {contributor}} + {contributor.length>0&&<> + {setNav("main")}}>Main + {setNav("sort")}}>Sort Check + {setNav("list")}}>Grocery List + Signed in as {contributor} + } @@ -286,7 +323,8 @@ function App() { {if (k.key==='Enter') {setContributor(document.getElementById("username").value)}}} id="username"/> : - data.length>0? + nav==="main"? + data.length>0? <> @@ -315,7 +353,10 @@ function App() { } - + : + nav==="sort"?: + nav==="list"?: + <> }
diff --git a/src/App.test.js b/src/App.test.js old mode 100644 new mode 100755 diff --git a/src/index.css b/src/index.css old mode 100644 new mode 100755 diff --git a/src/index.js b/src/index.js old mode 100644 new mode 100755 diff --git a/src/logo512.png b/src/logo512.png old mode 100644 new mode 100755 diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js old mode 100644 new mode 100755 diff --git a/src/setupTests.js b/src/setupTests.js old mode 100644 new mode 100755