Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix various prop type validation errors #5550

Merged
merged 1 commit into from Sep 13, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions imports/client/ui/components/Button/Button.js
Expand Up @@ -6,7 +6,7 @@ import MuiButton from "@material-ui/core/Button";

const styles = (theme) => ({
buttonProgress: {
marginLeft: theme.spacing.unit
marginLeft: theme.spacing(1)
},
containedPrimary: {
"color": theme.palette.primary.contrastText,
Expand Down Expand Up @@ -85,7 +85,6 @@ Button.defaultProps = {
disableRipple: false,
fullWidth: false,
href: null,
mini: false,
size: "medium",
variant: "text"
};
Expand Down
Expand Up @@ -26,7 +26,7 @@ function DetailDrawerButton(props) {

DetailDrawerButton.propTypes = {
children: PropTypes.node,
component: PropTypes.func
component: PropTypes.object
};

DetailDrawerButton.defaultProps = {
Expand Down
Expand Up @@ -173,7 +173,7 @@ class OrderCardFulfillmentGroups extends Component {
<Grid item xs={6} md={6}>
<Grid container alignItems="center" spacing={2}>
<Grid item>
<Typography variant="h4" inline={true}>
<Typography variant="h4" display="inline">
{i18next.t("order.fulfillmentGroupHeader", `Fulfillment group ${currentGroupCount} of ${totalGroupsCount}`)}
</Typography>
</Grid>
Expand Down Expand Up @@ -232,7 +232,7 @@ class OrderCardFulfillmentGroups extends Component {
<Typography paragraph variant="h4">
{i18next.t("order.trackingNumber", "Tracking number")}
</Typography>
<OrderCardFulfillmentGroupTrackingNumber orderId={order._id} fulfillmentGroup={fulfillmentGroup} {...this.props}/>
<OrderCardFulfillmentGroupTrackingNumber orderId={order._id} fulfillmentGroup={fulfillmentGroup} {...this.props} />
</Grid>
</Grid>
</Grid>
Expand Down
4 changes: 2 additions & 2 deletions imports/plugins/core/orders/client/components/OrderHeader.js
Expand Up @@ -56,7 +56,7 @@ function OrderHeader(props) {
<Grid item xs={12}>
<Grid container alignItems="center" spacing={2}>
<Grid item>
<Typography variant="h3" className={classes.extraEmphasisText} inline={true}>
<Typography variant="h3" className={classes.extraEmphasisText} display="inline">
{i18next.t("order.order", "Order")} - {referenceId}
</Typography>
</Grid>
Expand All @@ -80,7 +80,7 @@ function OrderHeader(props) {
</Grid>
</Grid>
<Grid item xs={12}>
<Typography variant="body1" inline={true}>{i18next.t("order.placed", "Placed")} {orderDate}</Typography>
<Typography variant="body1" display="inline">{i18next.t("order.placed", "Placed")} {orderDate}</Typography>
</Grid>
</Grid>
);
Expand Down
Expand Up @@ -125,7 +125,7 @@ function OrderPayments(props) {
<Grid item xs={6} md={6}>
<Grid container alignItems="center" spacing={2}>
<Grid item>
<Typography variant="h4" inline={true}>
<Typography variant="h4" display="inline">
Payments
</Typography>
</Grid>
Expand Down
8 changes: 4 additions & 4 deletions imports/plugins/core/orders/client/components/OrderRefunds.js
Expand Up @@ -189,7 +189,7 @@ function OrderRefunds(props) {
const paymentAmountAvailableForRefundDisplay = formatMoney(paymentAmountAvailableForRefund, order.currencyCode);

return (
<Grid item xs={12}>
<Grid item xs={12} key={payment._id}>
<Grid container>
<Grid item xs={6}>
<Typography variant="body1">
Expand All @@ -204,9 +204,9 @@ function OrderRefunds(props) {
{i18next.t("order.availableToRefund")}: {paymentAmountAvailableForRefundDisplay}
</Typography>
{paymentPreviousRefundTotal && paymentPreviousRefundTotal > 0 &&
<Typography variant="body2">
{i18next.t("order.previouslyRefunded")}: {paymentPreviousRefundTotalDisplay}
</Typography>
<Typography variant="body2">
{i18next.t("order.previouslyRefunded")}: {paymentPreviousRefundTotalDisplay}
</Typography>
}
</Fragment>
:
Expand Down
7 changes: 3 additions & 4 deletions imports/plugins/core/tags/client/components/TagForm.js
Expand Up @@ -86,9 +86,9 @@ class TagForm extends Component {
}

static defaultProps = {
onCancel() {},
onCreate() {},
onUpdate() {},
onCancel() { },
onCreate() { },
onUpdate() { },
tag: {}
}

Expand Down Expand Up @@ -311,7 +311,6 @@ class TagForm extends Component {
<HeroUploadButton>
<Button
variant="outlined"
actionType="secondary"
color="secondary"
size="small"
onClick={this.handleDropzoneClick}
Expand Down
3 changes: 1 addition & 2 deletions imports/plugins/core/tags/client/components/TagToolbar.js
Expand Up @@ -16,14 +16,13 @@ function TagToolbar(props) {
<PrimaryAppBar title={title}>
{(canBeDeleted) &&
<Button
actionType="secondary"
isTextOnly={true}
onClick={onDelete}
>
{i18next.t("admin.tags.form.delete")}
</Button>
}
<Button variant="outlined" actionType="secondary" onClick={onCancel}>
<Button variant="outlined" onClick={onCancel}>
{i18next.t("admin.tags.form.cancel")}
</Button>
<Button variant="contained" color="primary" onClick={onSave}>
Expand Down