End.js 1.18 KB
Newer Older
Jiwon Yoon's avatar
Jiwon Yoon committed
1
import React from 'react'
baesangjune's avatar
.    
baesangjune committed
2
import tr from './img_end.jpg';
baesangjune's avatar
.    
baesangjune committed
3

Jiwon Yoon's avatar
Jiwon Yoon committed
4

baesangjune's avatar
.    
baesangjune committed
5
// import { Link } from 'react-router-dom';
Jiwon Yoon's avatar
Jiwon Yoon committed
6
7

function End() {
baesangjune's avatar
.    
baesangjune committed
8
9
10
11
    let k = []
    for (let i = 0; i < 3; i++) {

        if (localStorage.getItem(i + '번문제답') === localStorage.getItem(i + '번문제정답')) {
baesangjune's avatar
.    
baesangjune committed
12
            
baesangjune's avatar
.    
baesangjune committed
13
14
15
16
            k[i] = ['O', 1]

        }
        else {
baesangjune's avatar
.    
baesangjune committed
17
            
baesangjune's avatar
.    
baesangjune committed
18
19
20
21
22
23
24
25
            k[i] = ['X', 0]
        }
    }





Jiwon Yoon's avatar
Jiwon Yoon committed
26
    return (
baesangjune's avatar
.    
baesangjune committed
27
        <>
Jiwon Yoon's avatar
Jiwon Yoon committed
28

baesangjune's avatar
.    
baesangjune committed
29
30
31
32

            <div className="card " >
                <div className='card-header'>
                    -채점표-
baesangjune's avatar
.    
baesangjune committed
33
            </div>
baesangjune's avatar
.    
baesangjune committed
34
35
36
37
38
39
40
41
42
43
44
                <div className='card-body'>
                    <h3 className='card-title'>이름 : {localStorage.getItem('name')}</h3>

                    <p className='card-text'>Quiz 1 : {k[0][0]}</p>
                    <p className='card-text'>Quiz 2 : {k[1][0]}</p>
                    <p className='card-text'>Quiz 3 : {k[2][0]}</p>
                    <p className='card-text'>Total Score : {k[0][1] + k[1][1] + k[2][1]}</p>
                </div>
                <div className="Box text-center">
                    <h1>수고하셨습니다.</h1>
                </div>
baesangjune's avatar
.    
baesangjune committed
45
46
47
            </div>
        </>

Jiwon Yoon's avatar
Jiwon Yoon committed
48
49
50
    )
}

baesangjune's avatar
.    
baesangjune committed
51
52
export default End;