This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect, Fragment } from 'react'; | |
import './App.css'; | |
import Topbar from './components/Topbar'; | |
import Sidebar from './components/Sidebar'; | |
import MainWindow from './components/MainWindow'; | |
import BottomBar from './components/Bottombar'; | |
import Messages from './components/Messages'; | |
import Timer from './components/Timer'; | |
import History from './components/History'; | |
import EditExercise from './components/EditExercise'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ReactTransactAdmin = ({ match }) => ( | |
<div> | |
<AdminAppbar /> | |
<AdminMenu /> | |
<Route path={match.url} exact component={AdminPanel} /> | |
<Route path={match.url + "/HeroImages"} component={HeroImages} /> | |
<Route path={match.url + "/features"} component={Features} /> | |
<Route path={match.url + "/salebar"} component={SaleBar} /> | |
<Route path={match.url + "/categories"} component={Categories} /> | |
<Route path={match.url + "/products"} component={Products} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Router> | |
{/* Admin Panel Routes */} | |
<AdminAppbar /> | |
<AdminMenu /> | |
<Switch> | |
<Route path="/admin/HeroImages" component={HeroImages} /> | |
<Route path="/admin/features" component={Features} /> | |
<Route path="/admin/salebar" component={SaleBar} /> | |
<Route path="/admin/categories" component={Categories} /> | |
<Route path="/admin/products" component={Products} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import productsList from "../dummyData/productsDummyData"; | |
const initState = { | |
products: productsList, | |
count: 1, | |
cartContents: [], | |
confirmDelete: { | |
open: false, | |
id: null | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { connect } from "react-redux"; | |
import { | |
makeStyles, | |
Grid, | |
Typography, | |
FormControlLabel, | |
Checkbox | |
} from "@material-ui/core"; | |
import Rating from "@material-ui/lab/Rating"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case "SET_SALEBAR_DATA": | |
action.payload.num === 1 | |
? (state = { | |
...state, | |
saleBar: [...state.saleBar[0], action.payload.data] | |
}) | |
: action.payload.num === 2 | |
? (state = { | |
...state, | |
saleBar: [...state.saleBar[1], action.payload.data] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Typography paragraph>BACKGROUND SETTINGS</Typography> | |
<InputLabel id="background">Background</InputLabel> | |
<Select | |
labelId="background" | |
id="background" | |
onChange={handleBackground} | |
value={bgID} | |
> | |
<MenuItem value={0} id={`url("data:image/svg+xml,%3Csvg width='180' height='180' viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M81.28 88H68.413l19.298 19.298L81.28 88zm2.107 0h13.226L90 107.838 83.387 88zm15.334 0h12.866l-19.298 19.298L98.72 88zm-32.927-2.207L73.586 78h32.827l.5.5 7.294 7.293L115.414 87l-24.707 24.707-.707.707L64.586 87l1.207-1.207zm2.62.207L74 80.414 79.586 86H68.414zm16 0L90 80.414 95.586 86H84.414zm16 0L106 80.414 111.586 86h-11.172zm-8-6h11.173L98 85.586 92.414 80zM82 85.586L87.586 80H76.414L82 85.586zM17.414 0L.707 16.707 0 17.414V0h17.414zM4.28 0L0 12.838V0h4.28zm10.306 0L2.288 12.298 6.388 0h8.198zM180 17.414L162.586 0H180v17.414zM165.414 0l12.298 12.298L173.612 0h-8.198zM180 12.838 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { connect } from "react-redux"; | |
const ImageUpload = ({ url, progress, handleImgUpload }) => { | |
const handleChange = e => { | |
if (e.target.files[0]) { | |
const image = e.target.files[0]; | |
handleImgUpload(image); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cartReducer = (state = { | |
cartItems: 0, | |
items: products, | |
cartContents: [], | |
}, action) => { | |
switch (action.type) { | |
case "ADD_TO_CART": | |
{ | |
const existingItem = state.cartContents.find(item => { | |
return item.id === Number(action.payload); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cartReducer = (state = { | |
cartItems: 0, | |
items: products, | |
cartContents: [], | |
}, action) => { | |
switch (action.type) { | |
case "ADD_TO_CART": { | |
const existingItem = state.cartContents.find(item => { | |
return item.id === Number(action.payload); | |
}) |
NewerOlder