I hereby claim:
- I am julianwachholz on github.
- I am juio (https://keybase.io/juio) on keybase.
- I have a public key ASAKlzM8becIo_ddeoySGXGSqjylxrL8hzSeC4emuFU_Vgo
To claim this, I am signing this object:
// service worker | |
self.addEventListener("install", (event) => { | |
event.waitUntil( | |
caches.open("{{ cache_key }}").then((cache) => | |
cache.addAll([ | |
// {% for asset in assets %} | |
"{{ asset }}", | |
// {% endfor %} | |
]) | |
) |
const LatencyIcon = ({ latency }) => { | |
return ( | |
<svg | |
xmlns="http://www.w3.org/2000/svg" | |
className="inline-block h-5 w-5 text-gray-800" | |
viewBox="0 0 20 20" | |
fill="currentColor" | |
> | |
<path | |
className={ |
import React, { useCallback, useRef, useState } from "react"; | |
function clampHeight(height) { | |
const minHeight = 200; | |
const maxHeight = document.body.clientHeight - 300; | |
return Math.min(Math.max(height, minHeight), maxHeight); | |
} | |
export default function Element() { | |
const [height, setHeight] = useState(null); |
FROM node:12-alpine AS build | |
WORKDIR /app | |
RUN apk --no-cache add git | |
ARG REACT_APP_SENTRY_DSN | |
COPY web/package.json web/package-lock.json /app/web/ | |
RUN cd /app/web && npm install |
FROM node:13 AS build | |
WORKDIR /app | |
COPY package.json package-lock.json /app/ | |
RUN npm install | |
FROM build as dev | |
COPY . /app | |
CMD BROWSER=none npm start | |
FROM build as prod |
import generatePicker from "antd/lib/date-picker/generatePicker"; | |
import { | |
addDays, | |
addMonths, | |
addYears, | |
format, | |
getWeek, | |
isAfter, | |
isValid, | |
parse, |
const MyForm: React.FC<any> = observer(({match, store}) => { | |
const obj = store.get(match.params.id); | |
if (obj === null) { | |
return <MyLoadingForm />; | |
} | |
// Invariant violation: Rendered more hooks than during the previous render. | |
const [data, setData] = useState(obj.data); | |
return <MyLoadedForm data={data} onSubmit={setData} /> | |
}); |
export abstract class BaseStore<T> { | |
@observable | |
objects: T[] = []; | |
constructor(private dao: BaseDAO<T>) {} | |
} |
<%= form_for @changeset, @action, [multipart: true], fn f -> %> | |
<!-- ... other fields ... --> | |
<!-- `selected` accepts only a list of IDs --> | |
<div class="form-group"> | |
<%= label f, :categories, class: "control-label" %> | |
<%= multiple_select f, :categories, @categories, selected: Enum.map(@changeset.data.categories, &(&1.id)), class: "form-control" %> | |
</div> |
I hereby claim:
To claim this, I am signing this object: