11import React from 'react'
22import Head from '../../../components/head' ;
3- import Backdrop from '@material-ui/core/Backdrop' ;
43import CircularProgress from '@material-ui/core/CircularProgress' ;
54import Layout from "../../../components/layout" ;
65import ProductLinkForm from "../../../forms/ProductLink" ;
@@ -11,7 +10,6 @@ import * as couponController from '../../../controllers/v2/couponsV2'
1110import ProductLinkCard from "../../../components/ProductLinkCard"
1211import ErrorHandler from "../../../helpers/ErrorHandler" ;
1312import Swal from 'sweetalert2' ;
14- import { withStyles } from '@material-ui/core' ;
1513import Table from '@material-ui/core/Table' ;
1614import TableBody from '@material-ui/core/TableBody' ;
1715import TableCell from '@material-ui/core/TableCell' ;
@@ -21,13 +19,6 @@ import TableHead from '@material-ui/core/TableHead';
2119import TableRow from '@material-ui/core/TableRow' ;
2220import Typography from '@material-ui/core/Typography' ;
2321
24- const useStyles = theme => ( {
25- backdrop : {
26- zIndex : theme . zIndex . drawer + 1 ,
27- color : '#fff' ,
28- }
29- } ) ;
30-
3122class GenerateLink extends React . Component {
3223
3324 constructor ( props ) {
@@ -286,24 +277,19 @@ class GenerateLink extends React.Component {
286277 } )
287278 }
288279
289- hideSpinner = ( ) => {
280+ handleLoading = ( ) => {
290281 this . setState ( {
291282 loading : false
292283 } ) ;
293284 } ;
294285
295286 render ( ) {
296- const { classes } = this . props ;
297287 return (
298288 < div >
299289 < Head title = "Coding Blocks | Dukaan | Generate Product Link" />
300290 < Layout />
301291 < CheckLogin >
302292
303- < Backdrop className = { classes . backdrop } open = { this . state . loading } >
304- < CircularProgress color = "inherit" />
305- </ Backdrop >
306-
307293 < div className = { "row" } >
308294 < div className = { "col-md-3 pull-left" } >
309295 < ProductLinkForm { ...this . state }
@@ -331,7 +317,7 @@ class GenerateLink extends React.Component {
331317 < b > User Details </ b >
332318 </ Typography >
333319
334- < Table className = { classes . table } aria-label = "simple table" >
320+ < Table aria-label = "simple table" >
335321 < TableHead >
336322 < TableRow >
337323 < TableCell align = "center" > Name</ TableCell >
@@ -367,7 +353,7 @@ class GenerateLink extends React.Component {
367353 < iframe
368354 src = { this . state . activeCartIframeUrl }
369355 frameBorder = "0"
370- onLoad = { this . hideSpinner }
356+ onLoad = { this . handleLoading }
371357 width = "100%"
372358 height = "220"
373359 allowtransparency = 'true'
@@ -379,7 +365,7 @@ class GenerateLink extends React.Component {
379365 < iframe
380366 src = { this . state . purchasedProductIframeurl }
381367 frameBorder = "0"
382- onLoad = { this . hideSpinner }
368+ onLoad = { this . handleLoading }
383369 width = "100%"
384370 height = "350"
385371 allowtransparency = 'true'
@@ -412,4 +398,4 @@ class GenerateLink extends React.Component {
412398 }
413399}
414400
415- export default withStyles ( useStyles ) ( GenerateLink )
401+ export default GenerateLink
0 commit comments