Commit 0078dbd5 authored by Florent Chehab's avatar Florent Chehab

refacto(frontend): finish compliance with new eslint config

parent 8de6e632
......@@ -26,10 +26,7 @@ module.exports = {
location: "anywhere"
}
],
// The warn should be turned to error at some point
"react/require-default-props": "warn",
"react/no-did-update-set-state": "warn",
"import/prefer-default-export": "warn",
"no-console": "error",
// Styling choices bellow...
"react/destructuring-assignment": "off", // might be less readable (and is a pain in the ass to refactor)
"react/no-unescaped-entities": "off", // that one doesn't improve code readability
......
......@@ -20,7 +20,7 @@ import PageSettings from "../pages/PageThemeSettings";
import PageUser from "../pages/PageUser";
import PageLists from "../pages/PageLists";
import MainAppFrame from "./MainAppFrame";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
import PageAboutProject from "../pages/PageAboutProject";
import { PageCgu, PageRgpd } from "../pages/PagesRgpdCgu";
import PageNotFound from "../pages/PageNotFound";
......
......@@ -3,7 +3,7 @@ import AppBar from "@material-ui/core/AppBar";
import Toolbar from "@material-ui/core/Toolbar";
import PropTypes from "prop-types";
import { makeStyles } from "@material-ui/styles";
import { classNames } from "../../utils/classNames";
import classNames from "../../utils/classNames";
import { appBarHeight, siteMaxWidth } from "../../config/sharedStyles";
const useStyle = makeStyles(theme => ({
......
......@@ -7,7 +7,7 @@ import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import ListItemText from "@material-ui/core/ListItemText";
import Typography from "@material-ui/core/Typography";
import { toDateFr } from "../../utils/dateToFr";
import toDateFr from "../../utils/dateToFr";
import getActions from "../../redux/api/getActions";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
......
......@@ -4,7 +4,7 @@ import { makeStyles } from "@material-ui/styles";
import PropTypes from "prop-types";
import { withRouter } from "react-router-dom";
import InformationList from "./InformationList";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
const useStyles = makeStyles(theme => ({
divider: {
......
......@@ -13,11 +13,11 @@ import ListItem from "@material-ui/core/ListItem";
import ListItemIcon from "@material-ui/core/ListItemIcon";
import ListItemText from "@material-ui/core/ListItemText";
import PropTypes from "prop-types";
import { RequestParams } from "../../redux/api/RequestParams";
import RequestParams from "../../redux/api/RequestParams";
import getActions from "../../redux/api/getActions";
import { withErrorBoundary } from "../common/ErrorBoundary";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
import { toDateFr } from "../../utils/dateToFr";
import toDateFr from "../../utils/dateToFr";
const INFORMATION_ICONS = {
success: <StartIcon />,
......
......@@ -6,7 +6,7 @@ import React from "react";
import { makeStyles } from "@material-ui/styles";
import PropTypes from "prop-types";
import CustomNavLink from "../common/CustomNavLink";
import { classNames } from "../../utils/classNames";
import classNames from "../../utils/classNames";
const useStyle = makeStyles(theme => ({
siteName: {
......
......@@ -15,9 +15,9 @@ import {
} from "./menuItems";
import IconWithMenu from "../common/IconWithMenu";
import DrawerMenu from "./DrawerMenu";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
import CustomNavLink from "../common/CustomNavLink";
import { classNames } from "../../utils/classNames";
import classNames from "../../utils/classNames";
import Logo from "./Logo";
import BaseTemplate from "./BaseTemplate";
......
......@@ -8,7 +8,7 @@ import { withErrorBoundary } from "../common/ErrorBoundary";
import getActions from "../../redux/api/getActions";
import Notifier from "../common/Notifier";
import { RequestParams } from "../../redux/api/RequestParams";
import RequestParams from "../../redux/api/RequestParams";
/**
* Class to create notifications for important stuff on start up
......
......@@ -8,7 +8,7 @@ import Typography from "@material-ui/core/Typography";
import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import ListItemText from "@material-ui/core/ListItemText";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
import CustomLink from "../common/CustomLink";
import getActions from "../../redux/api/getActions";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
......
......@@ -3,7 +3,7 @@ import LocationCityIcon from "@material-ui/icons/LocationCity";
import HomeIcon from "@material-ui/icons/Home";
import SearchIcon from "@material-ui/icons/Search";
import AssignmentIcon from "@material-ui/icons/Assignment";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
function item(label, route, Icon, hardRedirect = false) {
return {
......
......@@ -118,12 +118,12 @@ Alert.defaultProps = {
disagreeText: "Annuler",
infoText: "J'ai compris",
multilineButtons: false,
// eslint-disable-next-line no-console
handleClose: () => {
// eslint-disable-next-line no-console
console.error("Missing function for closing alert.");
},
// eslint-disable-next-line no-console
handleResponse: () => {
// eslint-disable-next-line no-console
console.error("Missing function for handling post performClose.");
}
};
......
......@@ -56,8 +56,8 @@ CoverGallery.propTypes = {
CoverGallery.defaultProps = {
picturesSrc: [],
// eslint-disable-next-line no-console
onEditButtonClick: () =>
// eslint-disable-next-line no-console
console.log("No function provided to edit cover gallery")
};
......
......@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
import Loading from "./Loading";
import { getLatestRead, successActionsWithReads } from "../../redux/api/utils";
import Notifier from "./Notifier";
import { RequestParams } from "../../redux/api/RequestParams";
import RequestParams from "../../redux/api/RequestParams";
/**
* Custom react component to be used when called to the api are required to display data of the component.
......
......@@ -24,7 +24,7 @@ function CustomNavLink(props) {
CustomNavLink.propTypes = {
to: PropTypes.string.isRequired,
children: PropTypes.node
children: PropTypes.node.isRequired
};
export default CustomNavLink;
......@@ -4,7 +4,7 @@ import { compose } from "recompose";
import { connect } from "react-redux";
import Alert from "./Alert";
import getActions from "../../redux/api/getActions";
import { RequestParams } from "../../redux/api/RequestParams";
import RequestParams from "../../redux/api/RequestParams";
class DeleteHandler extends React.Component {
handleDelete() {
......
......@@ -53,10 +53,10 @@ function renderSuggestion({
}
renderSuggestion.propTypes = {
highlightedIndex: PropTypes.number,
index: PropTypes.number,
itemProps: PropTypes.object,
selectedItem: PropTypes.string,
highlightedIndex: PropTypes.number.isRequired,
index: PropTypes.number.isRequired,
itemProps: PropTypes.object.isRequired,
selectedItem: PropTypes.string.isRequired,
suggestion: PropTypes.shape({
label: PropTypes.string,
value: PropTypes.number
......
......@@ -4,10 +4,10 @@ import { setDisplayName } from "recompose";
import compose from "recompose/compose";
import { connect } from "react-redux";
import { withRouter } from "react-router-dom";
import { RequestParams } from "../../redux/api/RequestParams";
import RequestParams from "../../redux/api/RequestParams";
import getActions from "../../redux/api/getActions";
import Alert from "./Alert";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
function clear() {
return {
......@@ -93,6 +93,7 @@ const ConnectedErrorBoundary = compose(
*
* @returns {function(*): function(*): *}
*/
// eslint-disable-next-line import/prefer-default-export
export function withErrorBoundary() {
return Component =>
setDisplayName("error-boundary")(
......
......@@ -2,7 +2,7 @@ import React from "react";
import PropTypes from "prop-types";
import Typography from "@material-ui/core/Typography";
import TextLink from "./TextLink";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
import getWindowBase from "../../utils/getWindowBase";
/**
......
import React from "react";
import PropTypes from "prop-types";
import CustomLink from "./CustomLink";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
export default function LinkToUser(props) {
if (props.userId) {
......
......@@ -8,7 +8,7 @@ import Done from "@material-ui/icons/Done";
import DoneAll from "@material-ui/icons/DoneAll";
import Favorite from "@material-ui/icons/Favorite";
import { makeStyles } from "@material-ui/styles";
import { classNames } from "../../utils/classNames";
import classNames from "../../utils/classNames";
import { getGradient, Spectral, viridis } from "../../utils/colormaps";
const possibleIcons = [Close, Warning, Done, DoneAll, Favorite];
......
......@@ -8,7 +8,7 @@ import CheckIcon from "@material-ui/icons/Check";
import SaveIcon from "@material-ui/icons/Save";
import { makeStyles } from "@material-ui/styles";
import useInterval from "../../utils/useInterval";
import { classNames } from "../../utils/classNames";
import classNames from "../../utils/classNames";
const useStyles = makeStyles(theme => ({
root: {
......
......@@ -6,7 +6,7 @@ import { connect } from "react-redux";
import CustomComponentForAPI from "../CustomComponentForAPI";
import { getTheme, updatePhoneStatusBarColor } from "./utils";
import getActions from "../../../redux/api/getActions";
import { RequestParams } from "../../../redux/api/RequestParams";
import RequestParams from "../../../redux/api/RequestParams";
import { CURRENT_USER_ID } from "../../../config/user";
/**
......
......@@ -58,9 +58,7 @@ class Editor extends Component {
constructor(props) {
super(props);
// editors can be used outside of a module wrapper.
if ("subscribeToModuleWrapper" in props) {
props.subscribeToModuleWrapper(this);
}
props.subscribeToModuleWrapper(this);
}
/**
......@@ -391,6 +389,9 @@ Editor.propTypes = {
Editor.defaultProps = {
open: false,
subscribeToModuleWrapper: () => {},
hasPendingModeration: undefined,
lastUpdateTimeInModel: undefined,
// eslint-disable-next-line no-console
closeEditorPanel: () => console.error("Dev forgot something...")
};
......
......@@ -3,7 +3,7 @@ import {
closeFullScreenDialog,
openFullScreenDialog
} from "../../redux/actions/fullScreenDialog";
import { RequestParams } from "../../redux/api/RequestParams";
import RequestParams from "../../redux/api/RequestParams";
/**
* Function to create the mapDispatchToProps function for editor in a "generic way"
......
......@@ -119,7 +119,8 @@ class Field extends PureComponent {
Field.defaultProps = {
required: false,
label: "mon label",
comment: ""
comment: "",
value: undefined
};
Field.propTypes = {
......
......@@ -139,6 +139,11 @@ BaseMap.propTypes = {
campuses: PropTypes.array
};
BaseMap.defaultProps = {
id: undefined,
campuses: undefined
};
// eslint-disable-next-line no-unused-vars
const styles = theme => ({
mapContainer: {
......
......@@ -13,7 +13,7 @@ import IconClose from "@material-ui/icons/Close";
import { Link } from "react-router-dom";
import MyCardMedia from "./MyCardMedia";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
/**
* Custom component to create the overlayed popup on the map with university info
......
......@@ -9,11 +9,11 @@ import { withPaddedPaper } from "./shared";
import EditModuleGeneralPreviousExchangeFeedback from "../university/modules/previousExchangeFeedback/edit/EditModuleGeneralFeedback";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
import getActions from "../../redux/api/getActions";
import { RequestParams } from "../../redux/api/RequestParams";
import RequestParams from "../../redux/api/RequestParams";
import { getUnivName } from "./PageMyExchanges";
import EditModuleCoursesFeedback from "../university/modules/previousExchangeFeedback/edit/EditModuleCoursesFeedback";
import CustomLink from "../common/CustomLink";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
function getExchangeId(props) {
return parseInt(props.match.params.exchangeId, 10);
......
......@@ -7,7 +7,7 @@ import { connect } from "react-redux";
import { Typography } from "@material-ui/core";
import { withErrorBoundary } from "../common/ErrorBoundary";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
import { RequestParams } from "../../redux/api/RequestParams";
import RequestParams from "../../redux/api/RequestParams";
import getActions from "../../redux/api/getActions";
import Pictures from "../user/Pictures";
......
......@@ -6,7 +6,7 @@ import Markdown from "../common/markdown/Markdown";
import { withPaddedPaper } from "./shared";
import InformationList from "../app/InformationList";
import CustomLink from "../common/CustomLink";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
import ExternalDataUpdateInfo from "../app/ExternalDataUpdateInfo";
import UnlinkedPartners from "../app/UnlinkedPartners";
......
import React from "react";
import PropTypes from "prop-types";
import { Typography } from "@material-ui/core";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
let _triggered = false;
......
......@@ -12,12 +12,12 @@ import { withRouter } from "react-router-dom";
import PropTypes from "prop-types";
import Button from "@material-ui/core/Button";
import { getLatestReadDataFromStore } from "../../redux/api/utils";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
import Loading from "../common/Loading";
import { withErrorBoundary } from "../common/ErrorBoundary";
import { withPaddedPaper } from "./shared";
import { CURRENT_USER_ID } from "../../config/user";
import { RequestParams } from "../../redux/api/RequestParams";
import RequestParams from "../../redux/api/RequestParams";
import getActions from "../../redux/api/getActions";
import compareSemesters from "../../utils/compareSemesters";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
......
......@@ -16,7 +16,7 @@ import getActions from "../../redux/api/getActions";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
import { withErrorBoundary } from "../common/ErrorBoundary";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
import CustomNavLink from "../common/CustomNavLink";
import CustomLink from "../common/CustomLink";
import { PaddedPaper } from "./shared";
......
......@@ -11,7 +11,7 @@ import { makeStyles } from "@material-ui/styles";
import UserInfo from "../user/UserInfo";
import { withErrorBoundary } from "../common/ErrorBoundary";
import { withPaddedPaper } from "./shared";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
import { CURRENT_USER_ID } from "../../config/user";
const useStyle = makeStyles(theme => ({
......
......@@ -3,7 +3,7 @@ import PropTypes from "prop-types";
import { setDisplayName } from "recompose";
import { makeStyles } from "@material-ui/styles";
import { Paper } from "@material-ui/core";
import { classNames } from "../../utils/classNames";
import classNames from "../../utils/classNames";
const useStyle = makeStyles(theme => ({
generalPadding: {
......
......@@ -15,8 +15,8 @@ import DeleteIcon from "@material-ui/icons/DeleteForever";
import PublicIcon from "@material-ui/icons/LockOpen";
import PrivateIcon from "@material-ui/icons/Lock";
import IconButton from "@material-ui/core/IconButton";
import { RequestParams } from "../../redux/api/RequestParams";
import { APP_ROUTES } from "../../config/appRoutes";
import RequestParams from "../../redux/api/RequestParams";
import APP_ROUTES from "../../config/appRoutes";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
import getActions from "../../redux/api/getActions";
import SimplePopupMenu from "../common/SimplePopupMenu";
......
......@@ -6,10 +6,10 @@ import Button from "@material-ui/core/Button";
import ArrowBackIcon from "@material-ui/icons/ArrowBack";
import { withRouter } from "react-router-dom";
import getActions from "../../redux/api/getActions";
import { RequestParams } from "../../redux/api/RequestParams";
import RequestParams from "../../redux/api/RequestParams";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
import List from "./view/View";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
/**
* Component to display one recommendation list
......
......@@ -9,7 +9,7 @@ import { makeStyles } from "@material-ui/styles";
import useBlock from "../../../hooks/useBlock";
import DownshiftMultiple from "../../common/DownshiftMultiple";
import CustomNavLink from "../../common/CustomNavLink";
import { APP_ROUTES } from "../../../config/appRoutes";
import APP_ROUTES from "../../../config/appRoutes";
import MetricFeedback from "../../common/MetricFeedback";
import OnBlurContainer from "../../common/OnBlurContainer";
import { UniversityHelper } from "../../../redux/api/helpers";
......@@ -157,6 +157,11 @@ UnivBlock.propTypes = {
readOnly: PropTypes.bool.isRequired
};
UnivBlock.defaultProps = {
university: null,
appreciation: null
};
UnivBlock.defaultProps = {};
export default React.memo(UnivBlock);
......@@ -33,7 +33,7 @@ import CopyToClipboard from "../../common/CopyToClipboard";
import SimplePopupMenu from "../../common/SimplePopupMenu";
import { appBarHeight } from "../../../config/sharedStyles";
import SaveButton from "../../common/SaveButton";
import { RequestParams } from "../../../redux/api/RequestParams";
import RequestParams from "../../../redux/api/RequestParams";
import getActions from "../../../redux/api/getActions";
import UnivBlock from "./UnivBlock";
import TextBlock from "./TextBlock";
......
......@@ -84,7 +84,7 @@ Search.propTypes = {
selectedUniversities: PropTypes.oneOfType([
PropTypes.array.isRequired,
PropTypes.oneOf([null]).isRequired
])
]).isRequired
};
const mapStateToProps = state => ({
......
......@@ -11,7 +11,7 @@ import KeyboardArrowLeft from "@material-ui/icons/KeyboardArrowLeft";
import KeyboardArrowRight from "@material-ui/icons/KeyboardArrowRight";
import isEqual from "lodash/isEqual";
import range from "../../utils/range";
import { APP_ROUTES } from "../../config/appRoutes";
import APP_ROUTES from "../../config/appRoutes";
import CustomNavLink from "../common/CustomNavLink";
/**
......
......@@ -28,8 +28,8 @@ import getActions from "../../../redux/api/getActions";
import CustomComponentForAPI from "../../common/CustomComponentForAPI";
import ColorDemo from "./ColorDemo";
import TextLink from "../../common/TextLink";
import { deepCopy } from "../../../utils/deepCopy";
import { RequestParams } from "../../../redux/api/RequestParams";
import deepCopy from "../../../utils/deepCopy";
import RequestParams from "../../../redux/api/RequestParams";
import { getTheme } from "../../common/theme/utils";
import { CURRENT_USER_ID } from "../../../config/user";
import LicenseNotice from "../../common/LicenseNotice";
......
......@@ -111,7 +111,7 @@ UniversityTemplate.propTypes = {
match: PropTypes.shape({
// given by withRouter
params: PropTypes.shape({
univId: PropTypes.number.isRequired,
univId: PropTypes.string.isRequired,
tabName: PropTypes.string
}).isRequired
}).isRequired,
......
......@@ -14,7 +14,7 @@ import ModuleGroupWrapper from "./common/ModuleGroupWrapper";
import CountryDriEditor from "../editors/CountryDriEditor";
import getActions from "../../../redux/api/getActions";
import withUnivInfo from "../common/withUnivInfo";
import { RequestParams } from "../../../redux/api/RequestParams";
import RequestParams from "../../../redux/api/RequestParams";
// eslint-disable-next-line no-unused-vars
const styles = theme => ({});
......
......@@ -15,7 +15,7 @@ import CountryScholarshipEditor from "../editors/CountryScholarshipEditor";
import getActions from "../../../redux/api/getActions";
import withUnivInfo from "../common/withUnivInfo";
import { RequestParams } from "../../../redux/api/RequestParams";
import RequestParams from "../../../redux/api/RequestParams";
const styles = theme => ({
item: {
......
......@@ -12,7 +12,7 @@ import SharedUnivFeedbackEditor from "../editors/SharedUnivFeedbackEditor";
import getActions from "../../../redux/api/getActions";
import withUnivInfo from "../common/withUnivInfo";
import { RequestParams } from "../../../redux/api/RequestParams";
import RequestParams from "../../../redux/api/RequestParams";
import TruncatedMarkdown from "../../common/markdown/TruncatedMarkdown";
const styles = theme => ({
......
......@@ -15,7 +15,7 @@ import UniversityDriEditor from "../editors/UniversityDriEditor";
import getActions from "../../../redux/api/getActions";
import withUnivInfo from "../common/withUnivInfo";
import { RequestParams } from "../../../redux/api/RequestParams";
import RequestParams from "../../../redux/api/RequestParams";
// eslint-disable-next-line no-unused-vars
const styles = theme => ({});
......
......@@ -18,7 +18,7 @@ import UniversityGeneralEditor from "../editors/UniversityGeneralEditor";
import getActions from "../../../redux/api/getActions";
import withUnivInfo from "../common/withUnivInfo";
import { RequestParams } from "../../../redux/api/RequestParams";
import RequestParams from "../../../redux/api/RequestParams";
// eslint-disable-next-line no-unused-vars
const styles = theme => ({});
......
......@@ -12,7 +12,7 @@ import Typography from "@material-ui/core/Typography";
import Chip from "@material-ui/core/Chip";
import getActions from "../../../redux/api/getActions";
import withUnivInfo from "../common/withUnivInfo";
import { RequestParams } from "../../../redux/api/RequestParams";
import RequestParams from "../../../redux/api/RequestParams";
import CustomComponentForAPI from "../../common/CustomComponentForAPI";
import PaginatedData from "../../common/PaginatedData";
......@@ -117,6 +117,11 @@ Item.propTypes = {
seats: PropTypes.number
};
Item.defaultProps = {
comment: "",
seats: null
};
class UniversityOffers extends CustomComponentForAPI {
state = { page: 1 };
......
......@@ -13,7 +13,7 @@ import Scholarship from "./common/Scholarship";
import UniversityScholarshipEditor from "../editors/UniversityScholarshipEditor";
import getActions from "../../../redux/api/getActions";
import withUnivInfo from "../common/withUnivInfo";
import { RequestParams } from "../../../redux/api/RequestParams";
import RequestParams from "../../../redux/api/RequestParams";
const styles = theme => ({
item: {
......
......@@ -23,7 +23,7 @@ import UniversitySemestersDatesEditor from "../editors/UniversitySemestersDatesE
import getActions from "../../../redux/api/getActions";
import withUnivInfo from "../common/withUnivInfo";
import { RequestParams } from "../../../redux/api/RequestParams";
import RequestParams from "../../../redux/api/RequestParams";
const styles = theme => ({
root: {
......
......@@ -28,7 +28,7 @@ import dateTimeStrToStr from "../../../../utils/dateTimeStrToStr";
import editorStyle from "../../../editor/editorStyle";
import getActions from "../../../../redux/api/getActions";
import { RequestParams } from "../../../../redux/api/RequestParams";
import RequestParams from "../../../../redux/api/RequestParams";
/**
* Component to display the previous versions of module
......
......@@ -120,6 +120,10 @@ ModuleGroupWrapper.propTypes = {
defaultModelData: PropTypes.object.isRequired // to populate the fields of the form with default values
};
ModuleGroupWrapper.defaultProps = {
propsForEditor: {}
};
const styles = theme => ({
root: {
paddingTop: theme.spacing(2),
......
......@@ -21,7 +21,7 @@ import getActions from "../../../../redux/api/getActions";
import editorStyle from "../../../editor/editorStyle";
import Loading from "../../../common/Loading";
import { RequestParams } from "../../../../redux/api/RequestParams";
import RequestParams from "../../../../redux/api/RequestParams";
/**
* Class to handle models that are pending moderation.
......
......@@ -179,4 +179,12 @@ Scholarship.propTypes = {
amountMax: PropTypes.string
};
Scholarship.defaultProps = {
currency: "",
frequency: "",
otherAdvantages: "",
amountMin: "",
amountMax: ""
};
export default withStyles(styles, { withTheme: true })(Scholarship);
......@@ -218,4 +218,8 @@ ModuleFirstRow.propTypes = {
buildTitle: PropTypes.func.isRequired
};
ModuleFirstRow.defaultProps = {
Icon: undefined
};
export default ModuleFirstRow;
......@@ -6,7 +6,7 @@ import green from "@material-ui/core/colors/green";
import orange from "@material-ui/core/colors/orange"