From 5f5d34ca4415b8c0bc3cf055948a516ede315a11 Mon Sep 17 00:00:00 2001 From: g j h Date: Thu, 8 Jul 2021 21:48:38 +0100 Subject: [PATCH] prepare for upgrade --- README.md | 4 ++++ client/src/components/Listing/Listing.js | 4 ++-- client/src/services/items.js | 10 ++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6cba7b4..c820e64 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ Roxie is a bibliography and citation formatter for the wretched, misconceived, b Status: Hey, I just started. This is under heavy development and doesn't do anything useful yet. Also, it's a quick hack. I need it in ten days' time 😬 so code quality? Not my main priority here, mmkay. +## To run + + + ## Internal data structures ### Book diff --git a/client/src/components/Listing/Listing.js b/client/src/components/Listing/Listing.js index 5b838c0..4e5980f 100644 --- a/client/src/components/Listing/Listing.js +++ b/client/src/components/Listing/Listing.js @@ -172,7 +172,7 @@ const Citation = styled.button` } ` -const AuthorWrapper = styled.div` +/*const AuthorWrapper = styled.div` margin-bottom: 2rem; .Author { border-bottom: 4px solid white; @@ -192,7 +192,7 @@ const SectionHeader = styled.header` .New { flex: 0 0 2rem; } -` +`*/ const Items = ({data,handleUpdate,...props}) => { return ( diff --git a/client/src/services/items.js b/client/src/services/items.js index 52fef47..baab5e9 100644 --- a/client/src/services/items.js +++ b/client/src/services/items.js @@ -1,20 +1,22 @@ import axios from 'axios'; +const IP = "192.168.1.84" + const API = { getAll: async () => { - let res = await axios.get(`http://192.168.1.66:9000/items`); + let res = await axios.get(`http://${IP}:9000/items`); return res.data || []; }, add: async (itemData) => { - let res = await axios.post(`http://192.168.1.66:9000/items/new`, itemData) + let res = await axios.post(`http://${IP}:9000/items/new`, itemData) return res.data || {}; }, delete: async (id) => { - let res = await axios.delete(`http://192.168.1.66:9000/items/${id}`); + let res = await axios.delete(`http://${IP}:9000/items/${id}`); return res.data || []; }, edit: async (itemData) => { - let res = await axios.put(`http://192.168.1.66:9000/items/update`, itemData) + let res = await axios.put(`http://${IP}:9000/items/update`, itemData) return res.data || {}; } }