File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -213,10 +213,13 @@ const Chapters = ({
213213 < HeadingThree className = "text-center" > Frontend</ HeadingThree >
214214
215215 < div className = "flex justify-around" >
216- < FrameworkButton onClick = { ( ) => toggleFramework ( ) } img = { ReactIcon } >
216+ < FrameworkButton
217+ onClick = { ( ) => toggleFramework ( "react" ) }
218+ img = { ReactIcon }
219+ >
217220 React posts
218221 </ FrameworkButton >
219- < FrameworkButton onClick = { ( ) => toggleFramework ( ) } img = { VueIcon } >
222+ < FrameworkButton onClick = { ( ) => toggleFramework ( "vue" ) } img = { VueIcon } >
220223 Vue posts
221224 </ FrameworkButton >
222225 </ div >
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import constants from "../constants"
1010const IndexPage = ( ) => {
1111 const [ framework , setFramework ] = useState ( "vue" )
1212
13- const toggleFramework = ( ) => {
14- setFramework ( framework => ( framework === "vue" ? "react" : "vue" ) )
13+ const toggleFramework = selectedFramework => {
14+ setFramework ( selectedFramework )
1515 }
1616
1717 constants . track ( "App.LandingPage.View" )
You can’t perform that action at this time.
0 commit comments