import React 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 " >
                <div className='card-header'>
                    -채점표-
            </div>
                <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>
            </div>
        </>

    )
}

export default End;

