mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-15 18:08:46 +00:00
Display disabled DMs as red and fix errors in login and signup
This commit is contained in:
parent
988c807af2
commit
a0a522f1d2
@ -83,6 +83,10 @@ const styles = {
|
||||
wordBreak: "break-all",
|
||||
color: 'black'
|
||||
},
|
||||
dmRecentMessageDisabled: {
|
||||
wordBreak: "break-all",
|
||||
color: 'red'
|
||||
},
|
||||
dmListItemContainer: {
|
||||
height: 100
|
||||
},
|
||||
@ -105,7 +109,7 @@ const styles = {
|
||||
fontSize: 20,
|
||||
backgroundColor: '#1da1f2',
|
||||
width: 300
|
||||
},
|
||||
},
|
||||
messagesGrid: {
|
||||
// // margin: "auto"
|
||||
// height: "auto",
|
||||
@ -426,9 +430,15 @@ export class directMessages extends Component {
|
||||
<Typography
|
||||
className={
|
||||
this.state.selectedChannel && this.state.selectedChannel.dmId === channel.dmId ? (
|
||||
classes.dmRecentMessageSelected
|
||||
channel.hasDirectMessagesEnabled ?
|
||||
classes.dmRecentMessageSelected
|
||||
:
|
||||
classes.dmRecentMessageDisabled
|
||||
) : (
|
||||
classes.dmRecentMessageUnselected
|
||||
channel.hasDirectMessagesEnabled ?
|
||||
classes.dmRecentMessageUnselected
|
||||
:
|
||||
classes.dmRecentMessageDisabled
|
||||
)
|
||||
}
|
||||
>
|
||||
|
||||
@ -36,6 +36,7 @@ export const getUserData = () => (dispatch) => {
|
||||
|
||||
// Sends login data to firebase and sets the user data in Redux
|
||||
export const loginUser = (loginData, history) => (dispatch) => {
|
||||
dispatch({type: CLEAR_ERRORS});
|
||||
dispatch({ type: LOADING_UI });
|
||||
axios
|
||||
.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
|
||||
export const signupUser = (newUserData, history) => (dispatch) => {
|
||||
dispatch({type: CLEAR_ERRORS});
|
||||
dispatch({ type: LOADING_UI });
|
||||
axios
|
||||
.post("/signup", newUserData)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user