Commit 09f1a662 authored by baesangjune's avatar baesangjune
Browse files

..

parent c4fea74c
...@@ -9,7 +9,7 @@ function App() { ...@@ -9,7 +9,7 @@ function App() {
<BrowserRouter> <BrowserRouter>
<MainRouter /> <MainRouter />
<Switch> <Switch>
<Route path="/problems" component={Problems}/> <Route path="/problems/:id" component={Problems}/>
</Switch> </Switch>
</BrowserRouter> </BrowserRouter>
</AuthProvider> </AuthProvider>
......
...@@ -67,13 +67,16 @@ function Warning() { ...@@ -67,13 +67,16 @@ function Warning() {
> >
{courses.map((course, i) => ( {courses.map((course, i) => (
<option key={i} value={i}> <option key={i} value={course._id}>
{course.name} {course.name}
</option> </option>
))} ))}
</Form.Control> </Form.Control>
<div className="text-right"> <div className="text-right">
<Link to="/problems"> <Link to={{
pathname: `/problems/${course.value}`,
state: ` _id: ${course.value}`
}}>
<a className="btn btn-danger">Quiz Start</a> <a className="btn btn-danger">Quiz Start</a>
</Link> </Link>
{/* <a href="#" class="card-link">Another link</a> */} {/* <a href="#" class="card-link">Another link</a> */}
......
...@@ -216,3 +216,19 @@ ...@@ -216,3 +216,19 @@
// // } // // }
// // export default Problems; // // export default Problems;
import React, { useState, useEffect } from 'react'
import { Link, Redirect } from 'react-router-dom';
// import Timer from 'react-compound-timer'; // 타이머쓰기위해 import
import Quiz, {quiz} from './Quiz'
function problems(props){
console.log(props)
Quiz()
return <div>테스트
{console.log('qquiz=')}
</div>
}
export default problems
\ No newline at end of file
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