File tree Expand file tree Collapse file tree
Selection-Sort-Visualizer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,16 +78,22 @@ function SelectionSortVisualizer() {
7878 </ div >
7979 < div className = "visualizer-input-container" >
8080 < input
81- type = "number"
8281 className = "input-field"
82+ type = "number"
8383 value = { inputValue }
8484 onChange = { ( e ) => setInputValue ( e . target . value ) }
8585 />
86- < button className = "button-green" onClick = { handleAdd } > Add</ button >
87- < button className = "button-blue" onClick = { handleSort } > Sort</ button >
88- < button className = "button-blue" onClick = { handleReset } > Reset</ button >
86+ < button className = "button-green" onClick = { handleAdd } >
87+ Add
88+ </ button >
89+ < button className = "button-blue" onClick = { handleSort } >
90+ Sort
91+ </ button >
92+ < button className = "button-blue" onClick = { handleReset } >
93+ Reset
94+ </ button >
8995 </ div >
90- < div id = "output-visualizer" > </ div >
96+ < div id = "output-visualizer" / >
9197 </ div >
9298 ) ;
9399}
Original file line number Diff line number Diff line change 11import PlayHeader from 'common/playlists/PlayHeader' ;
2- import { useEffect , useState } from 'react' ;
2+ import { useState } from 'react' ;
33import axios from 'axios' ;
44import DictionaryContainer from './DictionaryContainer' ;
55
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const DictionaryContainer = ({ data }) => {
1818 onClick = { ( ) => handlePronunciation ( data ) }
1919 />
2020 </ span >
21- { data [ 0 ] [ 'meanings' ] . map ( ( item , index ) => {
21+ { data [ 0 ] [ 'meanings' ] . map ( ( item ) => {
2222 return (
2323 < div className = "bg-blue-200 p-3 rounded-md mt-2 mb-2" key = { item } >
2424 < h2 className = "text-gray-500 font-bold" > { item [ 'partOfSpeech' ] } </ h2 >
@@ -31,7 +31,7 @@ const DictionaryContainer = ({ data }) => {
3131 } ) }
3232 < h2 > Synonyms: </ h2 >
3333 { item [ 'synonyms' ] &&
34- item [ 'synonyms' ] . map ( ( syn , index ) => {
34+ item [ 'synonyms' ] . map ( ( syn ) => {
3535 return (
3636 < span className = "mx-2" key = { syn } >
3737 { syn }
@@ -40,7 +40,7 @@ const DictionaryContainer = ({ data }) => {
4040 } ) }
4141 < h2 > Antonyms: </ h2 >
4242 { item [ 'antonyms' ] &&
43- item [ 'antonyms' ] . map ( ( ant , index ) => {
43+ item [ 'antonyms' ] . map ( ( ant ) => {
4444 return (
4545 < span className = "mx-2" key = { ant } >
4646 { ant }
You can’t perform that action at this time.
0 commit comments