forked from codeforcauseorg/edu-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
123 lines (116 loc) · 3.3 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import {
Box,
IconButton,
List,
ListItem,
ListItemSecondaryAction,
ListItemText,
makeStyles,
Typography,
} from "@material-ui/core";
import Tab from "@material-ui/core/Tab";
import Tabs from "@material-ui/core/Tabs";
import React from "react";
// import { IonIcon } from '@ionic/react';
// import { heartOutline, playCircleOutline } from 'ionicons/icons'
import { Player, ControlBar } from "video-react";
const useStyles = makeStyles((theme) => ({
tabroot: {
textTransform: "capitalize",
"& .MuiTab-root": {
textTransform: "capitalize",
flex: "auto",
},
"& .MuiTab-textColorSecondary": {
color: "#a60000",
},
},
centred: {
display: "flex",
justifyContent: "center",
alignItems: "center",
marginLeft: "100px",
},
}));
export default function CoursePageViewWithVideo() {
const classes = useStyles();
const [value, setValue] = React.useState(0);
const handleChange = (event, newValue) => {
setValue(newValue);
};
return (
<div>
<Player
className={classes.centered}
src="https://firebasestorage.googleapis.com/v0/b/codeforcauseorg.appspot.com/o/course%2Fzoom_0.mp4?alt=media&token=01f3ed1e-8d39-4fde-b945-f3bfe677b6df"
>
<ControlBar autoHide={true} className="my-class" />
</Player>
<Box mt={2} ml={2}>
<Typography variant="h3">Full Stack Development Course by Code For Cause</Typography>
<Typography variant="caption">
<i>
Duration <span style={{ color: "#4C0098" }}>1hr 45min</span>
</i>
</Typography>
</Box>
<Tabs
value={value}
onChange={handleChange}
indicatorColor="secondary"
centered
classes={{
root: classes.tabroot,
}}
>
<Tab label="35 Classes, 75 Resources" />
<Tab label="More Options" />
</Tabs>
<TabPanel value={value} index={0}>
<List style={{ margin: 0, padding: 0 }}>
{[0, 1, 2].map((item, index) => {
return (
<ListItem key={index}>
<ListItemText
primary={
<Typography variant="h3" style={{ marginBottom: "4px" }}>{`Chapter ${
index + 1
}: How to start With WD`}</Typography>
}
secondary={
<Typography>
<i>
50 Minutes by Anuj Garg{" "}
<span style={{ color: "#4C0098" }}>Available in 2 days</span>{" "}
</i>
</Typography>
}
/>
<ListItemSecondaryAction>
<IconButton>{/* <IonIcon src={playCircleOutline} /> */}</IconButton>
</ListItemSecondaryAction>
</ListItem>
);
})}
</List>
</TabPanel>
<TabPanel value={value} index={1}>
Item Two
</TabPanel>
</div>
);
}
function TabPanel(props) {
const { children, value, index, ...other } = props;
return (
<div
role="tabpanel"
hidden={value !== index}
id={`full-width-tabpanel-${index}`}
aria-labelledby={`full-width-tab-${index}`}
{...other}
>
{value === index && <Box>{children}</Box>}
</div>
);
}