Updated requests and ability to compare list to a crafting recipe set

main
sigonasr2 2 years ago
parent f2d45a11b9
commit 4ca1b8d8af
  1. 568
      src/App.js

@ -116,359 +116,93 @@ function DarkSelect(p){
return <select className="bg-dark text-white" {...p}>{p.children}</select>
}
function SorterApp(p){
const { setTransferItems } = p
const { transferItems } = p
function submitForm(){
if (item1.length>0&&item2.length>0&&item3.length>0&&item4.length>0&&item5.length>0&&
item1_2.length>0&&item2_2.length>0&&item3_2.length>0&&item4_2.length>0&&item5_2.length>0){
setResult1(NONE)
setResult2(NONE)
setResult3(NONE)
setResult4(NONE)
setResult5(NONE)
setChecking(true);
for (let i of [
{"endItem":item1,"beginItem":item1_2,"resultFunc":setResult1},
{"endItem":item2,"beginItem":item2_2,"resultFunc":setResult2},
{"endItem":item3,"beginItem":item3_2,"resultFunc":setResult3},
{"endItem":item4,"beginItem":item4_2,"resultFunc":setResult4},
{"endItem":item5,"beginItem":item5_2,"resultFunc":setResult5},
]) {
let itemData1={}
let itemData2={}
axios.get(encodeURI("https://xivapi.com/search?string="+i.endItem))
.then((data)=>{
var results = data.data.Results
for (var r of results) {
if (r.Name===i.endItem&&r.UrlType==="Item") {
return axios.get(encodeURI("https://xivapi.com"+r.Url))
}
}
i.resultFunc(NOTFOUND)
throw new Error("Item 1 Not Found!");
}
)
.then((data)=>{
var results = data.data
itemData1={...results}
return axios.get(encodeURI("https://xivapi.com/search?string="+i.beginItem))
})
.then((data)=>{
var results = data.data.Results
for (var r of results) {
if (r.Name===i.beginItem&&r.UrlType==="Item") {
return axios.get(encodeURI("https://xivapi.com"+r.Url))
}
}
i.resultFunc(NOTFOUND)
throw new Error("Item 2 Not Found!");
}
)
.then((data)=>{
var results = data.data
itemData2={...results}
if (itemData1.ItemSortCategory.ID<itemData2.ItemSortCategory.ID){
i.resultFunc(SUCCESS)
setChecking(false)
return
} else
if (itemData1.ItemSortCategory.ID===itemData2.ItemSortCategory.ID&&
itemData1.ItemUICategory.ID<itemData2.ItemUICategory.ID){
i.resultFunc(SUCCESS)
setChecking(false)
return
} else
if (itemData1.ItemSortCategory.ID===itemData2.ItemSortCategory.ID&&
itemData1.ItemUICategory.ID===itemData2.ItemUICategory.ID&&
itemData1.ID<itemData2.ID){
i.resultFunc(SUCCESS)
setChecking(false)
return
} else {
i.resultFunc(REJECTED)
setChecking(false)
}
})
.catch((err)=>{console.log(err);setChecking(false)})
}
//axios.get(encodeURI("https://xivapi.com/search?string="+i))
}
}
const retainerNames = ["Ayayayayay","Howdoesanyonenameall","Kkittyy","Butwhy","Nowitsabun","Finalretainer"];
const NONE=0;
const REJECTED=1;
const SUCCESS=2;
const NOTFOUND=3;
const [item1,setItem1] = useState("")
const [item2,setItem2] = useState("")
const [item3,setItem3] = useState("")
const [item4,setItem4] = useState("")
const [item5,setItem5] = useState("")
const [item1_2,setItem1_2] = useState("")
const [item2_2,setItem2_2] = useState("")
const [item3_2,setItem3_2] = useState("")
const [item4_2,setItem4_2] = useState("")
const [item5_2,setItem5_2] = useState("")
const [result1,setResult1] = useState(NONE)
const [result2,setResult2] = useState(NONE)
const [result3,setResult3] = useState(NONE)
const [result4,setResult4] = useState(NONE)
const [result5,setResult5] = useState(NONE)
const [checking,setChecking] = useState(false)
useEffect(()=>{
if (result1===SUCCESS&&result2===SUCCESS&&result3===SUCCESS&&result4===SUCCESS&&result5===SUCCESS){
setTransferItems([item1,item1_2,item2,item2_2,item3,item3_2,item4,item4_2,item5,item5_2])
}
},[result1,result2,result3,result4,result5])
useEffect(()=>{
if (transferItems.length===10){
setItem1(transferItems[0])
setItem1_2(transferItems[1])
setItem2(transferItems[2])
setItem2_2(transferItems[3])
setItem3(transferItems[4])
setItem3_2(transferItems[5])
setItem4(transferItems[6])
setItem4_2(transferItems[7])
setItem5(transferItems[8])
setItem5_2(transferItems[9])
}
},[JSON.stringify(transferItems)])
return <>
<Row className="text-white" style={{background:result1===NONE?"":result1===SUCCESS?"#003300":result1===NOTFOUND?"#333300":"#330000"}}>
<Col>
Ending {retainerNames[0]} Item 1:
</Col>
<Col>
<DarkInput name="item1" onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} value={item1} onChange={(f)=>{setItem1(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
Beginning {retainerNames[1]} Item 1:
</Col>
<Col>
<DarkInput name="item1_2" onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} value={item1_2} onChange={(f)=>{setItem1_2(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
{result1===NONE?<></>
:result1===SUCCESS?<IoCheckmarkCircleOutline style={{color:"lime"}}></IoCheckmarkCircleOutline>
:result1===NOTFOUND?<IoAlertCircleOutline style={{color:"yellow"}}></IoAlertCircleOutline>
:<IoCloseCircleSharp style={{color:"red"}}></IoCloseCircleSharp>}
</Col>
</Row>
<Row className="text-white" style={{background:result2===NONE?"":result2===SUCCESS?"#003300":result2===NOTFOUND?"#333300":"#330000"}}>
<Col>
Ending {retainerNames[1]} Item 2:
</Col>
<Col>
<DarkInput name="item2" onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} value={item2} onChange={(f)=>{setItem2(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
Beginning {retainerNames[2]} Item 2:
</Col>
<Col>
<DarkInput name="item2_2" onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} value={item2_2} onChange={(f)=>{setItem2_2(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
{result2===NONE?<></>
:result2===SUCCESS?<IoCheckmarkCircleOutline style={{color:"lime"}}></IoCheckmarkCircleOutline>
:result2===NOTFOUND?<IoAlertCircleOutline style={{color:"yellow"}}></IoAlertCircleOutline>
:<IoCloseCircleSharp style={{color:"red"}}></IoCloseCircleSharp>}
</Col>
</Row>
<Row className="text-white" style={{background:result3===NONE?"":result3===SUCCESS?"#003300":result3===NOTFOUND?"#333300":"#330000"}}>
<Col>
Ending {retainerNames[2]} Item 3:
</Col>
<Col>
<DarkInput name="item3" onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} value={item3} onChange={(f)=>{setItem3(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
Beginning {retainerNames[3]} Item 3:
</Col>
<Col>
<DarkInput name="item3_2" onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} value={item3_2} onChange={(f)=>{setItem3_2(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
{result3===NONE?<></>
:result3===SUCCESS?<IoCheckmarkCircleOutline style={{color:"lime"}}></IoCheckmarkCircleOutline>
:result3===NOTFOUND?<IoAlertCircleOutline style={{color:"yellow"}}></IoAlertCircleOutline>
:<IoCloseCircleSharp style={{color:"red"}}></IoCloseCircleSharp>}
</Col>
</Row>
<Row className="text-white" style={{background:result4===NONE?"":result4===SUCCESS?"#003300":result4===NOTFOUND?"#333300":"#330000"}}>
<Col>
Ending {retainerNames[3]} Item 4:
</Col>
<Col>
<DarkInput name="item4" onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} value={item4} onChange={(f)=>{setItem4(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
Beginning {retainerNames[4]} Item 4:
</Col>
<Col>
<DarkInput name="item4_2" onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} value={item4_2} onChange={(f)=>{setItem4_2(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
{result4===NONE?<></>
:result4===SUCCESS?<IoCheckmarkCircleOutline style={{color:"lime"}}></IoCheckmarkCircleOutline>
:result4===NOTFOUND?<IoAlertCircleOutline style={{color:"yellow"}}></IoAlertCircleOutline>
:<IoCloseCircleSharp style={{color:"red"}}></IoCloseCircleSharp>}
</Col>
</Row>
<Row className="text-white" style={{background:result5===NONE?"":result5===SUCCESS?"#003300":result5===NOTFOUND?"#333300":"#330000"}}>
<Col>
Ending {retainerNames[4]} Item 5:
</Col>
<Col>
<DarkInput name="item5" onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} value={item5} onChange={(f)=>{setItem5(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
Beginning {retainerNames[5]} Item 5:
</Col>
<Col>
<DarkInput name="item5_2" onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} value={item5_2} onChange={(f)=>{setItem5_2(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
{result5===NONE?<></>
:result5===SUCCESS?<IoCheckmarkCircleOutline style={{color:"lime"}}></IoCheckmarkCircleOutline>
:result5===NOTFOUND?<IoAlertCircleOutline style={{color:"yellow"}}></IoAlertCircleOutline>
:<IoCloseCircleSharp style={{color:"red"}}></IoCloseCircleSharp>}
</Col>
</Row>
<Row>
<span>A</span>
</Row>
<Row>
<Button onKeyDown={(k)=>{if (k.key==='Enter') {submitForm()}}} disabled={checking} onClick={()=>{submitForm()}}>{checking?<Spinner animation="border"></Spinner>:"Check"}</Button>
</Row>
</>
}
function ListApp(p){
//https://xivapi.com/search?filters=ClassJob.ID=11,RecipeLevelTable.ClassJobLevel%3E=36,RecipeLevelTable.ClassJobLevel%3C=45&page=1
const {transferItems} = p
const [item1,setItem1] = useState("")
const [item2,setItem2] = useState("")
const [item3,setItem3] = useState("")
const [item4,setItem4] = useState("")
const [item5,setItem5] = useState("")
const [item1_2,setItem1_2] = useState("")
const [item2_2,setItem2_2] = useState("")
const [item3_2,setItem3_2] = useState("")
const [item4_2,setItem4_2] = useState("")
const [item5_2,setItem5_2] = useState("")
const [groceryList,setGroceryList] = useState([])
const crafters=["CRP Carpenter","BSM Blacksmith","ARM Armorer","GSM Goldsmith","LTW Leatherworker","WVR Weaver","ALC Alchemist","CUL Culinarian"]
const [selectedCrafter,setSelectedCrafter] = useState(0)
const [minLevel,setMinLevel] = useState(1)
const [maxLevel,setMaxLevel] = useState(10)
const [playerInventory,setPlayerInventory] = useState([])
const [saddlebagInventory,setSaddlebagInventory] = useState([])
const [r1Inventory,setR1Inventory] = useState([])
const [r2Inventory,setR2Inventory] = useState([])
const [r3Inventory,setR3Inventory] = useState([])
const [r4Inventory,setR4Inventory] = useState([])
const [r5Inventory,setR5Inventory] = useState([])
const [r6Inventory,setR6Inventory] = useState([])
const [r7Inventory,setR7Inventory] = useState([])
const [r8Inventory,setR8Inventory] = useState([])
const [r9Inventory,setR9Inventory] = useState([])
const [checking,setChecking] = useState(false)
const [lastUpdate,setLastUpdate] = useState(0)
const retainerNames = ["Ayayayayay","Howdoesanyonenameall","Kkittyy","Butwhy","Nowitsabun","Finalretainer"];
useEffect(()=>{
if (transferItems.length===10){
setItem1(transferItems[0])
setItem1_2(transferItems[1])
setItem2(transferItems[2])
setItem2_2(transferItems[3])
setItem3(transferItems[4])
setItem3_2(transferItems[5])
setItem4(transferItems[6])
setItem4_2(transferItems[7])
setItem5(transferItems[8])
setItem5_2(transferItems[9])
}
},[JSON.stringify(transferItems)])
const retainerNames = ["Ayayayaya","Kittystorage","Morecatz","Finalretainer","Nowitsabun","Butwhy","Kkittyy","Howdoesanyonenameall","Ayayayayay"];
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function itemComesBefore(retainer,item){
let targetItem=""
let result=false;
switch(retainer){
case 0:{
targetItem=item1
}break;
case 1:{
targetItem=item2
}break;
case 2:{
targetItem=item3
}break;
case 3:{
targetItem=item4
}break;
case 4:{
targetItem=item5
}break;
}
let itemData1={}
let itemData2={}
await axios.get(encodeURI("https://xivapi.com/search?string="+item))
.then(async(data)=>{
var results = data.data.Results
for (var r of results) {
if (r.Name===item&&r.UrlType==="Item") {
return await axios.get(encodeURI("https://xivapi.com"+r.Url))
}
}
throw new Error("Item 1 Not Found!");
}
)
.then(async(data)=>{
var results = data.data
itemData1={...results}
return await axios.get(encodeURI("https://xivapi.com/search?string="+targetItem))
})
.then(async(data)=>{
var results = data.data.Results
for (var r of results) {
if (r.Name===targetItem&&r.UrlType==="Item") {
return await axios.get(encodeURI("https://xivapi.com"+r.Url))
useEffect(()=>{
const interval = setInterval(()=>{
axios.get("http://projectdivar.com/inventoryData?lastUpdate="+lastUpdate)
.then((data)=>{
if (data.data.length>0){
setLastUpdate(new Date().getTime())
for (var i=0;i<data.data.length;i++){
var inventory=data.data[i]
if (i==0){
var plInven=[]
var sbInven=[]
for (var j=0;j<140;j++){
plInven=[...plInven,inventory[j]]
}
for (var j=140;j<inventory.length;j++){
sbInven=[...sbInven,inventory[j]]
}
setPlayerInventory(plInven)
setSaddlebagInventory(sbInven)
} else {
switch(i){
case 1:{
setR1Inventory(inventory)
}break;
case 2:{
setR2Inventory(inventory)
}break;
case 3:{
setR3Inventory(inventory)
}break;
case 4:{
setR4Inventory(inventory)
}break;
case 5:{
setR5Inventory(inventory)
}break;
case 6:{
setR6Inventory(inventory)
}break;
case 7:{
setR7Inventory(inventory)
}break;
case 8:{
setR8Inventory(inventory)
}break;
case 9:{
setR9Inventory(inventory)
}break;
}
}
}
}
throw new Error("Item 2 Not Found!");
}
)
.then(async(data)=>{
var results = data.data
itemData2={...results}
console.log(itemData1.Name+" vs "+itemData2.Name)
if (itemData1.ItemSortCategory.ID<itemData2.ItemSortCategory.ID){
result=true
} else
if (itemData1.ItemSortCategory.ID===itemData2.ItemSortCategory.ID&&
itemData1.ItemUICategory.ID<itemData2.ItemUICategory.ID){
result=true
} else
if (itemData1.ItemSortCategory.ID===itemData2.ItemSortCategory.ID&&
itemData1.ItemUICategory.ID===itemData2.ItemUICategory.ID&&
itemData1.ID<itemData2.ID){
result=true
} else {
result=false
}
})
.catch((err)=>{console.log(err);setChecking(false)})
return [result,itemData1]
}
})
.catch((err)=>{})
},1000)
return ()=>clearInterval(interval)
})
function submitForm(){
let classID=Number(selectedCrafter)+8
@ -507,112 +241,74 @@ function ListApp(p){
//setChecking(false)
let craftedItems={}
for(var recipe of recipeData){
for (let i=0;i<5;i++){
for (let i=0;i<=5;i++){
var ingredient=recipe["ItemIngredient"+i]
var amount=recipe["AmountIngredient"+i]
if (ingredient!==null){
craftedItems[ingredient.Name]=1
if (ingredient.Name.includes("Component Materials")||ingredient.Name.includes("Skybuilders'")){continue}
if (ingredient.Name in craftedItems){
let oldItem=craftedItems[ingredient.Name];
oldItem.amt+=Number(amount)
craftedItems[ingredient.Name]=oldItem
} else {
craftedItems[ingredient.Name]={...ingredient,"amt":Number(amount)}
}
}
}
}
let retainerItems=[[],[],[],[],[],[]]
let retainerItems=[[],[],[],[],[],[],[],[],[],[]]
for (var item of Object.keys(craftedItems)){
let found=false
for (var i=0;i<5;i++){
let response = await itemComesBefore(i,item);
if (response[0]===true){
retainerItems[i]=[response[1],...retainerItems[i]]
found=true
break;
let retainerArray=[r1Inventory,r2Inventory,r3Inventory,r4Inventory,r5Inventory,r6Inventory,r7Inventory,r8Inventory,r9Inventory]
for (var i=0;i<retainerArray.length;i++){
for (var j=0;j<retainerArray[i].length;j++){
let it = retainerArray[i][j]
if (it.name===item){
var targetItem={...it}
targetItem.amt=craftedItems[item].amt
targetItem.hq=false
targetItem.slot=j
retainerItems[i]=[targetItem,...retainerItems[i]]
found=true
break;
}
}
if (found){
break;
}
}
if (found===false){
retainerItems[5]=[item,...retainerItems[5]]
console.log(JSON.stringify(craftedItems[item])+" not found. Adding as "+JSON.stringify({"icon":craftedItems[item].Icon,"id":craftedItems[item].ID,"name":craftedItems[item].Name,"amt":craftedItems[item].amt,"hq":false}))
retainerItems[9]=[{"icon":craftedItems[item].Icon,"id":craftedItems[item].ID,"name":craftedItems[item].Name,"amt":craftedItems[item].amt,"hq":false},...retainerItems[9]]
}
await sleep(250)
}
for (var i=0;i<retainerItems.length-1;i++){
retainerItems[i].sort((a,b)=>a.slot-b.slot)
}
setGroceryList(retainerItems)
setChecking(false)
})
}
return <>
<Row className="text-white">
<Col>
Ending {retainerNames[0]} Item 1:
</Col>
<Col>
<DarkInput name="item1" value={item1} onChange={(f)=>{setItem1(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
Beginning {retainerNames[1]} Item 1:
</Col>
<Col>
<DarkInput name="item1_2" value={item1_2} onChange={(f)=>{setItem1_2(f.currentTarget.value);}}></DarkInput>
</Col>
</Row>
<Row className="text-white">
<Col>
Ending {retainerNames[1]} Item 2:
</Col>
<Col>
<DarkInput name="item2" value={item2} onChange={(f)=>{setItem2(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
Beginning {retainerNames[2]} Item 2:
</Col>
<Col>
<DarkInput name="item2_2" value={item2_2} onChange={(f)=>{setItem2_2(f.currentTarget.value);}}></DarkInput>
</Col>
</Row>
<Row className="text-white">
<Col>
Ending {retainerNames[2]} Item 3:
</Col>
<Col>
<DarkInput name="item3" value={item3} onChange={(f)=>{setItem3(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
Beginning {retainerNames[3]} Item 3:
</Col>
<Col>
<DarkInput name="item3_2" value={item3_2} onChange={(f)=>{setItem3_2(f.currentTarget.value);}}></DarkInput>
</Col>
</Row>
<Row className="text-white">
<Col>
Ending {retainerNames[3]} Item 4:
</Col>
<Col>
<DarkInput name="item4" value={item4} onChange={(f)=>{setItem4(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
Beginning {retainerNames[4]} Item 4:
</Col>
<Col>
<DarkInput name="item4_2" value={item4_2} onChange={(f)=>{setItem4_2(f.currentTarget.value);}}></DarkInput>
</Col>
</Row>
<Row className="text-white">
<Col>
Ending {retainerNames[4]} Item 5:
</Col>
<Col>
<DarkInput name="item5" value={item5} onChange={(f)=>{setItem5(f.currentTarget.value);}}></DarkInput>
</Col>
<Col>
Beginning {retainerNames[5]} Item 5:
</Col>
<Col>
<DarkInput name="item5_2" value={item5_2} onChange={(f)=>{setItem5_2(f.currentTarget.value);}}></DarkInput>
</Col>
</Row>
<Row>
<span>A</span>
function Item(p){
const {it} = p
return it.amt>0&&<Row className="text-white">
<Col><img src={"https://xivapi.com"+it.icon}></img>{it.slot?"["+Math.floor(it.slot/35+1)+"]":""} {it.name} x{it.amt} {it.hq?"(HQ)":""}</Col>
</Row>
}
function RetainerDisplay(p){
const {id,inventory} = p
return <>
<Row className="text-white"><Col><h2>{retainerNames[id]}'s Inventory</h2></Col></Row>
{inventory.map((item,i)=><Item it={item} key={i}></Item>)}
</>
}
return <>
<Row className="text-white">
<Col xs={4}>
<DarkSelect value={selectedCrafter} onChange={(f)=>{setSelectedCrafter(f.currentTarget.value)}}>
{crafters.map((crafter,i)=><option value={i}>{crafter}</option>)}
{crafters.map((crafter,i)=><option value={i} key={i}>{crafter}</option>)}
</DarkSelect>
</Col>
@ -632,12 +328,32 @@ function ListApp(p){
</Col>
</Row>
<Row><span>A</span></Row>
{groceryList.map((list,i)=><><Row className="text-white">
<h2>{retainerNames[i]}</h2>
</Row>
<Row className="text-white"><ul>
{list.map((item)=><li>{item.Name}</li>)}
</ul></Row></>)}
{groceryList.map((list,i)=>{
if (list.length>0){
return <>
<Row className="text-white"><Col>{(i===9)?<h4 style={{"color":"#AA0000"}}>Not Found:</h4>:<h4>From {retainerNames[i]}:</h4>}</Col></Row>
<Row className="text-white"><Col>
<ul>
{list.map((item,j)=><li><Item it={item} key={j}></Item></li>)}
</ul>
</Col></Row>
</>
}
})}
<Row><span>Inventories</span></Row>
<Row className="text-white"><Col><h2>Player Inventory</h2></Col></Row>
{playerInventory.map((item,i)=><Item it={item} key={i}></Item>)}
<Row className="text-white"><Col><h2>Chocobo Saddlebag Inventory</h2></Col></Row>
{saddlebagInventory.map((item,i)=><Item it={item} key={i}></Item>)}
<RetainerDisplay id={0} inventory={r1Inventory}></RetainerDisplay>
<RetainerDisplay id={1} inventory={r2Inventory}></RetainerDisplay>
<RetainerDisplay id={2} inventory={r3Inventory}></RetainerDisplay>
<RetainerDisplay id={3} inventory={r4Inventory}></RetainerDisplay>
<RetainerDisplay id={4} inventory={r5Inventory}></RetainerDisplay>
<RetainerDisplay id={5} inventory={r6Inventory}></RetainerDisplay>
<RetainerDisplay id={6} inventory={r7Inventory}></RetainerDisplay>
<RetainerDisplay id={7} inventory={r8Inventory}></RetainerDisplay>
<RetainerDisplay id={8} inventory={r9Inventory}></RetainerDisplay>
</>
}
@ -816,7 +532,6 @@ function App() {
</Navbar.Brand>
{contributor.length>0&&<>
<Nav.Link style={(nav==="main")?{"color":"lime","textDecoration":"underline"}:{}} onClick={()=>{setNav("main")}}>Main</Nav.Link>
<Nav.Link style={(nav==="sort")?{"color":"lime","textDecoration":"underline"}:{}} onClick={()=>{setNav("sort")}}>Sort Check</Nav.Link>
<Nav.Link style={(nav==="list")?{"color":"lime","textDecoration":"underline"}:{}} onClick={()=>{setNav("list")}}>Grocery List</Nav.Link>
<span className="text-light font-weight-light font-italic">Signed in as {contributor}</span>
</>}
@ -858,7 +573,6 @@ function App() {
</Col>
</Row>
:
nav==="sort"?<SorterApp transferItems={transferItems} setTransferItems={setTransferItems}></SorterApp>:
nav==="list"?<ListApp transferItems={transferItems}></ListApp>:
<></>
}

Loading…
Cancel
Save