{"size": 560, "ext": "js", "max_stars_repo_path": "src/components/Qone.js", "max_stars_repo_name": "SohelSamim/Baerekraftsmotor", "max_stars_repo_stars_event_min_datetime": "2021-10-30T23:38:37.000Z", "max_stars_repo_stars_event_max_datetime": "2021-10-30T23:38:37.000Z", "max_issues_repo_path": "src/components/Qone.js", "max_issues_repo_name": "SohelSamim/Baerekraftsmotor", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/Qone.js", "max_forks_repo_name": "SohelSamim/Baerekraftsmotor", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.347826087, "max_line_length": 81, "alphanum_fraction": 0.5553571429}
import React, { useState, useEffect } from "react";
import 'bootstrap/dist/css/bootstrap.min.css';

export default function Qone({ OrgNr, setOrgNr }) {

    

    const handleInput = event => {
        setOrgNr(event.target.value.replace(/[ ]+/g, ''));  };

    const logValue = () => {
        console.log(OrgNr);
        };

    return (
        <div>
            <input onChange={handleInput} placeholder="skriv org nummeret ditt"/>
            <p>{OrgNr}</p>
            <button onClick={logValue}>Log value in console</button>
        </div>
        );
}
