| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 15 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Coverage | 40% |
| Changes | 0 | ||
| 1 | import { Button, ButtonProps } from 'flowbite-react'; |
||
| 2 | import { GITHUB_URL } from '../helpers/config'; |
||
| 3 | |||
| 4 | export default function Login(props: ButtonProps) { |
||
| 5 | |||
| 6 | 5 | const loginUser = (e: React.MouseEvent<HTMLButtonElement>) => { |
|
| 7 | e.preventDefault(); |
||
| 8 | window.location.href = GITHUB_URL; |
||
| 9 | }; |
||
| 10 | |||
| 11 | 5 | return ( |
|
| 12 | <Button {...props} data-testid="loginbutton" color="success" onClick={(e) => loginUser(e)}>Logga in</Button> |
||
| 13 | ) |
||
| 14 | } |
||
| 15 |