This file contains hidden or 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 generatePicker from "antd/lib/date-picker/generatePicker"; | |
| import { | |
| addDays, | |
| addMonths, | |
| addYears, | |
| format, | |
| getWeek, | |
| isAfter, | |
| isValid, | |
| parse, |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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 |
This file contains hidden or 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, { 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); |
This file contains hidden or 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
| 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={ |
This file contains hidden or 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
| // service worker | |
| self.addEventListener("install", (event) => { | |
| event.waitUntil( | |
| caches.open("{{ cache_key }}").then((cache) => | |
| cache.addAll([ | |
| // {% for asset in assets %} | |
| "{{ asset }}", | |
| // {% endfor %} | |
| ]) | |
| ) |
OlderNewer