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

CS-88_Angel_Checkout_-_Unticked_items_keeps_on_getting_ticked_back #1347

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
19 changes: 17 additions & 2 deletions client-html/src/js/common/components/progress/LoadingIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import clsx from 'clsx';
import * as React from 'react';
import { connect } from 'react-redux';
import { withStyles } from 'tss-react/mui';
import { Fetch } from '../../../model/common/Fetch';
import { State } from '../../../reducers/state';

const styles: any = (theme, _params, classes) => ({
Expand Down Expand Up @@ -49,7 +50,21 @@ const styles: any = (theme, _params, classes) => ({
// approximate time in ms after which loading indicator is shown if request is still pending
const PENDING_TIME = 100;

class LoadingIndicator extends React.PureComponent<any, any> {
interface Props {
classes?: any;
appBarOffset?: boolean;
transparentBackdrop?: boolean;
position?: "absolute" | "fixed" ;
allowInteractions?: boolean;
customLoading?: boolean;
fetch?: Fetch;
}

interface CompState {
showLoading: boolean
}

class LoadingIndicator extends React.PureComponent<Props, CompState> {
private timeout;

private _isMounted: boolean;
Expand Down Expand Up @@ -132,7 +147,7 @@ const mapStateToProps = (state: State) => ({
fetch: state.fetch
});

export default connect<any, any, any>(
export default connect(
mapStateToProps,
null
)(withStyles(LoadingIndicator, styles));
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { BooleanArgFunction, NumberArgFunction, usePrevious } from 'ish-ui';
import debounce from 'lodash.debounce';
import React from 'react';
import { connect } from 'react-redux';
import LoadingIndicator from '../../../../common/components/progress/LoadingIndicator';
import { CheckoutSummaryListItem as SummaryList } from '../../../../model/checkout';
import {
checkoutGetPreviousCredit,
Expand Down Expand Up @@ -70,6 +71,7 @@ const CheckoutSummary = React.memo<Props>(props => {

return (
<div className="w-100">
<LoadingIndicator />
{!openDiscountView
&& !selectedDiscount
&& activeField === CheckoutPage.summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { getCheckoutModel, getCheckoutModelMembershipsValidTo } from '../../util

const request: EpicUtils.Request = {
type: CHECKOUT_UPDATE_SUMMARY_PRICES,
hideLoadIndicator: true,
getData: async (p, s) => {
const model = getCheckoutModel(s);
await getCheckoutModelMembershipsValidTo(model);
Expand Down
Loading