Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Q
Quizes
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hemanshc
Quizes
Commits
c7e13c5b
Commit
c7e13c5b
authored
May 07, 2022
by
Choudhary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reviewed changes
parent
5d47f797
Pipeline
#2280
failed with stages
in 1 minute and 9 seconds
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
package-lock.json
package-lock.json
+0
-0
App.js
src/App.js
+5
-6
Section.jsx
src/Components/Section.jsx
+1
-1
index.js
src/index.js
+1
-1
No files found.
package-lock.json
deleted
100644 → 0
View file @
5d47f797
This diff is collapsed.
Click to expand it.
src/App.js
View file @
c7e13c5b
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
;
src/Components/Section.jsx
View file @
c7e13c5b
import
r
eact
from
'react'
;
import
R
eact
from
'react'
;
import
{
mockdata
}
from
'../MockData/mock'
...
...
src/index.js
View file @
c7e13c5b
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'
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment