Commit 7212357100b772e8b0aa4e30ecc5076593d8e1d8

Authored by Vu Bui
1 parent 23998cb88b
Exists in master

update

Showing 2 changed files with 15 additions and 3 deletions Side-by-side Diff

_scss/_variables.scss
... ... @@ -5,4 +5,5 @@ $text-color: #000000;
5 5 $text-light-color: #9797A3;
6 6 $red-color: #E12827;
7 7 $green-color:#438800;
8   -$border-color: #E2E7FF;
9 8 \ No newline at end of file
  9 +$border-color: #E2E7FF;
  10 +$red-bg:#FCE8E8;
10 11 \ No newline at end of file
... ... @@ -2,12 +2,14 @@ import React, { useState, useEffect } from 'react'
2 2 import root from 'react-shadow';
3 3 import Portal from '../../components/Portal'
4 4 import BookingWizardStep from '../../components/BookingWizardStep'
  5 +import LoginStep from '../../components/Steps/Login';
5 6 import './styles.scss'
6 7  
7 8  
8 9 import { useCommonState, useCommonDispatch } from '../../store/common'
9 10 function BookingWizard(props) {
10 11 const [show, setShow] = useState(false)
  12 + const [step, setStep] = useState('step-login')
11 13 const commonStore = useCommonState()
12 14 const dispatch = useCommonDispatch()
13 15  
... ... @@ -20,6 +22,15 @@ function BookingWizard(props) {
20 22 dispatch({ type: 'BW_SHOW_BOOKING_MODAL', payload: false })
21 23 }
22 24  
  25 + const renderStep = (step)=> {
  26 + switch (step) {
  27 + case 'step-login':
  28 + return <LoginStep />
  29 + default:
  30 + break;
  31 + }
  32 + }
  33 +
23 34 return (<>
24 35 {process.env.NODE_ENV === 'development' ?
25 36 <Portal id="bwBookingWizardID">
... ... @@ -28,7 +39,7 @@ function BookingWizard(props) {
28 39 <div className="bw-booking-modal">
29 40 <button className="bw-btn-close" onClick={() => handleCloseModal()}><i className="bw-icon-close"></i></button>
30 41 <div className="bw-booking-modal-body">
31   -
  42 + {renderStep(step)}
32 43 </div>
33 44 </div>
34 45 <div className="bw-booking-step-wrapper">
... ... @@ -39,7 +50,7 @@ function BookingWizard(props) {
39 50 <Portal id="bwBookingWizardID">
40 51 <root.div>
41 52 <style type="text/css">
42   - {'@import "http://localhost:8888/static/css/main-app.chunk.css";'}
  53 + {`@import "${process.env.REACT_APP_FIREBASE_URL}/static/css/main-app.chunk.css";`}
43 54 </style>
44 55 {show && <div className="bw-backdrop" onClick={() => handleCloseModal()}></div>}
45 56 {show && <div className="bw-booking-popup-wraper">