Ps: The current setup was done on 01-04-19
Project Dependency Versions at the time 👇
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-scripts": "2.1.3",
"typescript": "^3.2.2"
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0",| SELECT b.id as build_id, b.name, c.city_name | |
| FROM public."Buildings" b LEFT JOIN | |
| public."Cities" c | |
| ON c.id = b.city_id JOIN | |
| public."OperatingHours" h | |
| ON h."BuildingId" = b.id JOIN | |
| public."Reservations" r | |
| on r."BuildingId"=b.id | |
| WHERE c.id = 3 | |
| GROUP BY b.id, c.city_name |
| SELECT b.id as build_id, b.name, c.city_name | |
| FROM public."Buildings" b LEFT JOIN | |
| public."Cities" c | |
| ON c.id = b.city_id LEFT JOIN | |
| public."OperatingHours" h | |
| ON h."BuildingId" = b.id LEFT JOIN | |
| public."Reservations" r | |
| on r."BuildingId"=b.id | |
| WHERE c.city_name = $city AND a.size = $size | |
| GROUP BY b.id, c.city_name |
| {"lastUpload":"2019-09-29T13:46:35.234Z","extensionVersion":"v3.4.3"} |
| // Test every passed-in auth verification function. | |
| const verifyAuth = (authCriteria, props) => { | |
| if (authCriteria.length === 0) return true; | |
| return authCriteria.every(criterion => criterion(props)); | |
| }; | |
| // Authentication HoC | |
| const withAuth = ({ | |
| authCriteria = [], | |
| redirectPath = '/', |
| const useFetch = (url) => { | |
| const [data, setData] = useState(null); | |
| useEffect(() => { | |
| let mounted = true; | |
| const abortController = new AbortController(); | |
| (async () => { | |
| const res = await fetch(url, { | |
| signal: abortController.signal, | |
| }); | |
| const data = await res.json(); |
Ps: The current setup was done on 01-04-19
Project Dependency Versions at the time 👇
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-scripts": "2.1.3",
"typescript": "^3.2.2"
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0",| export function logClass(target: Function) { | |
| // Save link for original constructor | |
| const original = target; | |
| // function generate instance of class | |
| function construct(constructor, args) { | |
| const c: any = function () { | |
| return constructor.apply(this, args); | |
| } | |
| c.prototype = constructor.prototype; |
| import * as React from 'react'; | |
| import { KeyCodeMap } from 'constants/core/key-code-map'; | |
| import { getComponentDisplayName } from 'helpers/common/get-component-display-name'; | |
| interface State { | |
| selectedRowIndex: number; | |
| mouseIndex: number; | |
| scrollElement: any; | |
| rowsLength: number; |
| function isCryptSolution(crypt, solution) { | |
| const map = {}; | |
| for(let m of solution) { | |
| map[m[0]] = m[1]; | |
| } | |
| for(let i in crypt) { | |
| const line = crypt[i]; |
| type RequireOnlyOne<T, Keys extends keyof T = keyof T> = | |
| Pick<T, Exclude<keyof T, Keys>> | |
| & { [K in Keys]-?: | |
| Required<Pick<T, K>> | |
| & Partial<Record<Exclude<Keys, K>, undefined>> | |
| }[Keys] | |
| type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = | |
| Pick<T, Exclude<keyof T, Keys>> | |
| & { |