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 { ReactNode, useRef, useEffect } from 'react'; | |
import { createPortal } from 'react-dom'; | |
interface PortalProps { | |
children: ReactNode; | |
id: string; | |
} | |
export default function Portal({ children, id }: PortalProps) { | |
const elRef = useRef<HTMLElement>(null); |
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
// CSGO Config | |
// Rates | |
rate "307200"; | |
cl_cmdrate "128"; | |
cl_updaterate "128"; | |
cl_interp "0.0"; | |
cl_interp_ratio "1"; | |
cl_lagcompensation "1"; |
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
/** | |
* Reduce an array of objects into an object indexed on the specified property. | |
* | |
* @param {array} arr | |
* @param {string} prop | |
* @return {object} | |
*/ | |
function toObject(arr, prop) { | |
return arr.reduce((acc, obj) => ( | |
{...acc, [obj[prop]]: obj} |
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
'use strict'; | |
var inv = require('invariant'), | |
assign = require('lodash/object/assign'), | |
isObj = require('lodash/lang/isPlainObject'), | |
isFunc = require('lodash/lang/isFunction'), | |
toArray = require('lodash/lang/toArray'); | |
/** | |
* Returns a function that creates a new object linked to the specified |