Commit c7e13c5b authored by Choudhary's avatar Choudhary

reviewed changes

parent 5d47f797
Pipeline #2280 failed with stages
in 1 minute and 9 seconds
This diff is collapsed.
import React, { Component, useState } from 'react';
import { Section } from './Components/Section'
import './App.css';
export const Section = ({type}) => {
export const App = ({type}) => {
const [startJS, setStartJS] =useState(false);
const [startReact, setStartReact] =useState(false);
const [startTest, setStartTest] =useState(false);
......@@ -14,15 +15,15 @@ export const Section = ({type}) => {
</header>
<body>
<div>
<div onClick={()=> {setStartJS(true),setStartReact(false),setStartTest(false)}}>
<div onClick={()=> (setStartJS(true),setStartReact(false),setStartTest(false))}>
<h3>JS Quiz</h3>
{startJS && <Section type="javascript"/>}
</div>
<div onClick={()=> {setStartJS(false),setStartReact(true),setStartTest(false)}}>
<div onClick={()=> (setStartJS(false),setStartReact(true),setStartTest(false))}>
<h3>React Quiz</h3>
{startReact && <Section type="react"/>}
</div>
<div onClick={()=> {setStartJS(false),setStartReact(false),setStartTest(true)}}>
<div onClick={()=> (setStartJS(false),setStartReact(false),setStartTest(true))}>
<h3>Test Quiz</h3>
{startTest && <Section type="test"/>}
</div>
......@@ -31,5 +32,3 @@ export const Section = ({type}) => {
</div>
);
}
export default App;
import react from 'react';
import React from 'react';
import {mockdata} from '../MockData/mock'
......
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import {App} from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment