This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using API_IN_COMPARE.Interface; | |
using API_IN_COMPARE.Model; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Logging; | |
namespace API_IN_COMPARE.Controllers | |
{ | |
[ApiController] | |
[Route("[controller]")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using API_IN_COMPARE.Data; | |
using API_IN_COMPARE.Interface; | |
using API_IN_COMPARE.Model; | |
using Microsoft.EntityFrameworkCore; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace API_IN_COMPARE.SqlRepo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const defaultStatus = { | |
"READY": "True" | |
} | |
const communicationStatusReducer = (state = defaultStatus, { type }) => { | |
debugger | |
switch (type) { | |
case 'CRETAE_NEW_MESSAGE': | |
return "WAITING"; | |
case "NEW_MESSAGE_SERVER_ACCEPTED": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const communicationStatusReducer = (state = {}, { type }) => { | |
debugger | |
switch (type) { | |
case 'CRETAE_NEW_MESSAGE': | |
return "WAITING"; | |
case "NEW_MESSAGE_SERVER_ACCEPTED": | |
return "READY" | |
} | |
return state | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const apiCommunicationStatusReducer = (state , { type }) => { | |
debugger | |
switch (type) { | |
case 'CRETAE_NEW_MESSAGE': | |
return "WAITING"; | |
case "NEW_MESSAGE_SERVER_ACCEPTED": | |
return "READY" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const statusUpdateAction = (value) => { | |
return { | |
type: 'UPDATE_STATUS', | |
value | |
} | |
} | |
document.forms.selectStatus.status.addEventListener("change", (e) => { | |
store.dispatch(statusUpdateAction()); // <= () Here was what I've missed. | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const statusUpdateAction = (value) => { | |
return { | |
type: 'UPDATE_STATUS', | |
value | |
} | |
} | |
document.forms.selectStatus.status.addEventListener("change", (e) => { | |
store.dispatch(statusUpdateAction); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const CodeWishper = ({value}) => { | |
return ( | |
<form className="form-inline" name="newMessage"> | |
<fieldset name="fields"> | |
<input type="text" className="form-control" name="newMessage" placeholder="Type a new message" /> | |
<button type="submit" name={value ? 1 : 0} className="btn btn-primary">Say something</button> | |
</fieldset> | |
</form> | |
)} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const CodeWishper = () => { | |
return ( | |
<form className="form-inline" name="newMessage"> | |
<fieldset name="fields"> | |
<input type="text" className="form-control" name="newMessage" placeholder="Type a new message" /> | |
<button type="submit" className="btn btn-primary">Say something</button> | |
</fieldset> | |
</form> | |
)} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const CodeWishper = () => { | |
return ( | |
<form className="form-inline" name="newMessage"> | |
<fieldset name="fields"> | |
<input type="text" className="form-control" name="newMessage" placeholder="Type a new message" /> | |
<button type="submit" name className="btn btn-primary">Say something</button> | |
</fieldset> | |
</form> | |
)} |