Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions src/pages/private/user/messages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ class PeopleCards extends Component {
filterPeople = (e) => {
const people = this.state.persons.filter(
(person) =>
person.name
.toLowerCase()
.search(e.target.value.trim().toLowerCase()) !== -1,
person.name.toLowerCase().search(e.target.value.trim().toLowerCase()) !== -1,
);
this.setState({ people, NoSearchResults: !people.length });
};
Expand All @@ -74,10 +72,7 @@ class PeopleCards extends Component {
return this.setState({
people: persons.filter((e) => {
if (sectionSelect !== 'ALL') {
return (
e.department === input.value &&
e.section === sectionSelect
);
return e.department === input.value && e.section === sectionSelect;
}
return e.department === input.value;
}),
Expand All @@ -101,10 +96,7 @@ class PeopleCards extends Component {
return this.setState({
people: persons.filter((e) => {
if (departmentSelect !== 'ALL') {
return (
e.section === input.value &&
e.department === departmentSelect
);
return e.section === input.value && e.department === departmentSelect;
}
return e.section === input.value;
}),
Expand All @@ -113,13 +105,8 @@ class PeopleCards extends Component {
};

render() {
const {
ProgressBar,
departments,
sections,
people,
NoSearchResults,
} = this.state;
const { ProgressBar, departments, sections, people, NoSearchResults } =
this.state;

return (
<>
Expand Down
16 changes: 3 additions & 13 deletions src/pages/private/user/profile/profileCard/socialCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ const PersonalCard = () => {
snapchat: '',
});

const {
email,
phone,
instagram,
linkedin,
facebook,
snapchat,
} = socialHandles;
const { email, phone, instagram, linkedin, facebook, snapchat } = socialHandles;

useEffect(() => {
const fetchUserData = async () => {
Expand All @@ -44,7 +37,7 @@ const PersonalCard = () => {
linkedin: data.socialHandles.linkedin,
snapchat: data.socialHandles.snapchat,
});
console.log('socialss', data)
console.log('socialss', data);
} catch (ex) {
if (ex.response && ex.response.status === 400) {
TimerAlert('Error', ex.response.data, 'error');
Expand Down Expand Up @@ -90,10 +83,7 @@ const PersonalCard = () => {
<Tooltip title="You can add more details from update details section">
<div className="row">
{email && (
<SocialHandle
platform={email}
iconClass="fas fa-lg fa-envelope"
/>
<SocialHandle platform={email} iconClass="fas fa-lg fa-envelope" />
)}
{phone && (
<SocialHandle
Expand Down
3 changes: 1 addition & 2 deletions src/utils/schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import Joi from 'joi-browser';

const LoginSchema = () => {
return {
userId: Joi
.number()
userId: Joi.number()
.error(() => {
return {
message: 'Please enter a valid enrollment number',
Expand Down