mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 02:08:47 +00:00
Users can be verified and have a check mark displayed on their profiles
This commit is contained in:
parent
16567e2373
commit
ca1d86acf1
@ -76,7 +76,8 @@ exports.signup = (req, res) => {
|
|||||||
handle: newUser.handle,
|
handle: newUser.handle,
|
||||||
createdAt: newUser.createdAt,
|
createdAt: newUser.createdAt,
|
||||||
userId,
|
userId,
|
||||||
followedTopics: []
|
followedTopics: [],
|
||||||
|
verified: false
|
||||||
};
|
};
|
||||||
return db.doc(`/users/${newUser.handle}`).set(userCred);
|
return db.doc(`/users/${newUser.handle}`).set(userCred);
|
||||||
})
|
})
|
||||||
|
|||||||
@ -10,6 +10,8 @@ import Chip from '@material-ui/core/Chip';
|
|||||||
import Typography from "@material-ui/core/Typography";
|
import Typography from "@material-ui/core/Typography";
|
||||||
import AddCircle from '@material-ui/icons/AddCircle';
|
import AddCircle from '@material-ui/icons/AddCircle';
|
||||||
import TextField from '@material-ui/core/TextField';
|
import TextField from '@material-ui/core/TextField';
|
||||||
|
import VerifiedIcon from '@material-ui/icons/CheckSharp';
|
||||||
|
|
||||||
|
|
||||||
// component
|
// component
|
||||||
import Userline from '../Userline';
|
import Userline from '../Userline';
|
||||||
@ -56,7 +58,8 @@ class user extends Component {
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
this.setState({
|
this.setState({
|
||||||
profile: res.data.credentials.handle,
|
profile: res.data.credentials.handle,
|
||||||
imageUrl: res.data.credentials.imageUrl
|
imageUrl: res.data.credentials.imageUrl,
|
||||||
|
verified: res.data.credentials.verified ? res.data.credentials.verified : false
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(err => console.log(err));
|
.catch(err => console.log(err));
|
||||||
@ -72,9 +75,9 @@ class user extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const classes = this.props;
|
const classes = this.props;
|
||||||
let profileMarkup = this.state.profile ? (
|
let profileMarkup = this.state.profile ? (
|
||||||
<p>
|
<div>
|
||||||
<Typography variant='h5'>{this.state.profile}</Typography>
|
<Typography variant='h5'>{this.state.profile} {this.state.verified ? (<VerifiedIcon style={{fill: "#1397D5"}}/>): (null)}</Typography>
|
||||||
</p>) : (<p>loading username...</p>);
|
</div>) : (<p>loading username...</p>);
|
||||||
|
|
||||||
|
|
||||||
let topicsMarkup = this.state.topics ? (
|
let topicsMarkup = this.state.topics ? (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user