import React, { createContext } from 'react'
import tr from './img_end.jpg';


// import { Link } from 'react-router-dom';

function End() {
    let k = []
    for (let i = 0; i < 3; i++) {

        if (localStorage.getItem(i + '번문제답') === localStorage.getItem(i + '번문제정답')) {

            k[i] = ['O', 1]

        }
        else {
            
            k[i] = ['X', 0]
        }
    }





    return (
        <>
            <div className="card" style={{fontSize:'30px', textAlign:"center"}} >
                <div className='card-header'>
                    -채점표-            
                <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 style={{marginTop:'100px'}}className="Box text-center">
                    <img src={tr} alt="수고" />
       
                </div>
                </div>
            </div>
        </>

    )
}

export default End;

