|
1 | 1 | import React, { useState, useEffect } from 'react'; |
2 | 2 | import Layout from '@theme/Layout'; |
3 | 3 | import type { ReactElement } from 'react'; |
4 | | -import { useLocation } from '@docusaurus/router'; |
| 4 | +import { useLocation, useHistory } from '@docusaurus/router'; |
| 5 | +import './video.css'; |
5 | 6 | import './index.css'; |
| 7 | +import './details.css'; |
6 | 8 |
|
7 | 9 | interface VideoData { |
8 | 10 | id: string; |
@@ -30,6 +32,7 @@ const getYoutubeVideoId = (url: string): string => { |
30 | 32 |
|
31 | 33 | export default function VideoDetails(): ReactElement { |
32 | 34 | const location = useLocation(); |
| 35 | + const history = useHistory(); |
33 | 36 | const state = location.state as LocationState; |
34 | 37 | const video = state?.video; |
35 | 38 | const [title, setTitle] = useState<string>('Loading...'); |
@@ -107,6 +110,24 @@ export default function VideoDetails(): ReactElement { |
107 | 110 | <div className="video-meta"> |
108 | 111 | <p>Watch in full screen for the best viewing experience</p> |
109 | 112 | </div> |
| 113 | + <div className="pagination" style={{marginTop: '30px'}}> |
| 114 | + <button |
| 115 | + onClick={() => history.push('/broadcasts')} |
| 116 | + style={{ |
| 117 | + display: 'inline-block', |
| 118 | + padding: '12px 24px', |
| 119 | + backgroundColor: '#007bff', |
| 120 | + color: 'white', |
| 121 | + borderRadius: '8px', |
| 122 | + fontWeight: 'bold', |
| 123 | + textDecoration: 'none', |
| 124 | + boxShadow: '0 4px 6px rgba(0,0,0,0.1)', |
| 125 | + border: 'none' |
| 126 | + }} |
| 127 | + > |
| 128 | + ← Back to Videos |
| 129 | + </button> |
| 130 | + </div> |
110 | 131 | </div> |
111 | 132 | </div> |
112 | 133 | </div> |
|
0 commit comments