mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 02:08:47 +00:00
Merge pull request #114 from ClaytonWWilson/temp-branch
Display disabled DMs as red and fix errors in login and signup
This commit is contained in:
commit
978af53a74
@ -83,6 +83,10 @@ const styles = {
|
|||||||
wordBreak: "break-all",
|
wordBreak: "break-all",
|
||||||
color: 'black'
|
color: 'black'
|
||||||
},
|
},
|
||||||
|
dmRecentMessageDisabled: {
|
||||||
|
wordBreak: "break-all",
|
||||||
|
color: 'red'
|
||||||
|
},
|
||||||
dmListItemContainer: {
|
dmListItemContainer: {
|
||||||
height: 100
|
height: 100
|
||||||
},
|
},
|
||||||
@ -426,9 +430,15 @@ export class directMessages extends Component {
|
|||||||
<Typography
|
<Typography
|
||||||
className={
|
className={
|
||||||
this.state.selectedChannel && this.state.selectedChannel.dmId === channel.dmId ? (
|
this.state.selectedChannel && this.state.selectedChannel.dmId === channel.dmId ? (
|
||||||
|
channel.hasDirectMessagesEnabled ?
|
||||||
classes.dmRecentMessageSelected
|
classes.dmRecentMessageSelected
|
||||||
|
:
|
||||||
|
classes.dmRecentMessageDisabled
|
||||||
) : (
|
) : (
|
||||||
|
channel.hasDirectMessagesEnabled ?
|
||||||
classes.dmRecentMessageUnselected
|
classes.dmRecentMessageUnselected
|
||||||
|
:
|
||||||
|
classes.dmRecentMessageDisabled
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -36,6 +36,7 @@ export const getUserData = () => (dispatch) => {
|
|||||||
|
|
||||||
// Sends login data to firebase and sets the user data in Redux
|
// Sends login data to firebase and sets the user data in Redux
|
||||||
export const loginUser = (loginData, history) => (dispatch) => {
|
export const loginUser = (loginData, history) => (dispatch) => {
|
||||||
|
dispatch({type: CLEAR_ERRORS});
|
||||||
dispatch({ type: LOADING_UI });
|
dispatch({ type: LOADING_UI });
|
||||||
axios
|
axios
|
||||||
.post("/login", loginData)
|
.post("/login", loginData)
|
||||||
@ -57,6 +58,7 @@ export const loginUser = (loginData, history) => (dispatch) => {
|
|||||||
|
|
||||||
// Sends signup data to firebase and sets the user data in Redux
|
// Sends signup data to firebase and sets the user data in Redux
|
||||||
export const signupUser = (newUserData, history) => (dispatch) => {
|
export const signupUser = (newUserData, history) => (dispatch) => {
|
||||||
|
dispatch({type: CLEAR_ERRORS});
|
||||||
dispatch({ type: LOADING_UI });
|
dispatch({ type: LOADING_UI });
|
||||||
axios
|
axios
|
||||||
.post("/signup", newUserData)
|
.post("/signup", newUserData)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user