11import AlgorithmForm from "./AlgorithmForm" ;
2+ import PlayController from "./PlayController" ;
23import { Github , Linkedin } from 'lucide-react' ;
34import { useVisualizationContext } from "../hooks/useVisualizationContext" ;
45import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' ;
5- import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism' ;
6+ import { atomDark } from 'react-syntax-highlighter/dist/esm/styles/prism' ;
67
78export default function SidePanel ( ) {
8- const { selectedAlgorithm } = useVisualizationContext ( ) ;
9+ const { selectedAlgorithm, ongoingVisualization } = useVisualizationContext ( ) ;
910
1011 const getAlgorithmCode = ( algorithm : string ) => {
1112 switch ( algorithm ) {
@@ -38,7 +39,8 @@ export default function SidePanel() {
3839 md:h-screen
3940 flex flex-col
4041 justify-between
41- overflow-y-auto
42+ overflow-y-auto
43+ md:overflow-hidden
4244 "
4345 >
4446 { /* Main content */ }
@@ -56,18 +58,19 @@ export default function SidePanel() {
5658 < div className = "bg-black rounded-md p-4 overflow-x-auto" >
5759 < SyntaxHighlighter
5860 language = "javascript"
59- style = { oneDark }
60- customStyle = { { background : 'transparent' , margin : 0 } }
61+ style = { atomDark }
62+ customStyle = { { background : 'transparent' , padding : 0 , margin : 0 } }
6163 >
6264 { getAlgorithmCode ( selectedAlgorithm ) }
6365 </ SyntaxHighlighter >
6466 </ div >
67+ { ongoingVisualization && < PlayController /> }
6568 </ div >
6669 ) }
6770 </ div >
6871
6972 { /* Footer */ }
70- < div className = "mt-6 text-center text-gray-400 text-sm" >
73+ < div className = "mt-3 text-center text-gray-400 text-sm" >
7174 < p > Built by: Ahmad Albarasy</ p >
7275 < div className = "flex justify-center space-x-4 mt-2" >
7376 < a
0 commit comments