From f0fa49c291aaac9896ddf5749d9d8ec04bc636b3 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Fri, 31 Mar 2023 18:59:52 -0500 Subject: [PATCH] Convert to typescript and fix fullTime --- index.html | 2 +- package-lock.json | 22 ++++++++++++++++++++++ package.json | 2 ++ src/app/atoms/time/Time.tsx | 2 +- src/{index.jsx => index.tsx} | 0 5 files changed, 26 insertions(+), 2 deletions(-) rename src/{index.jsx => index.tsx} (100%) diff --git a/index.html b/index.html index 93219dd4..efd24939 100644 --- a/index.html +++ b/index.html @@ -102,6 +102,6 @@ - + diff --git a/package-lock.json b/package-lock.json index 2cca1d0c..1f6e89a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@khanacademy/simple-markdown": "0.8.6", "@matrix-org/olm": "3.2.14", "@tippyjs/react": "4.2.6", + "@types/flux": "3.1.11", "blurhash": "2.0.4", "browser-encrypt-attachment": "0.3.0", "dateformat": "5.0.3", @@ -43,6 +44,7 @@ "@esbuild-plugins/node-globals-polyfill": "0.2.3", "@rollup/plugin-inject": "5.0.3", "@rollup/plugin-wasm": "6.1.1", + "@types/dateformat": "5.0.0", "@types/node": "18.11.18", "@types/react": "18.0.26", "@types/react-dom": "18.0.9", @@ -1115,6 +1117,12 @@ "react-dom": ">=16.8" } }, + "node_modules/@types/dateformat": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/dateformat/-/dateformat-5.0.0.tgz", + "integrity": "sha512-SZg4JdHIWHQGEokbYGZSDvo5wA4TLYPXaqhigs/wH+REDOejcJzgH+qyY+HtEUtWOZxEUkbhbdYPqQDiEgrXeA==", + "dev": true + }, "node_modules/@types/estree": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", @@ -1126,6 +1134,20 @@ "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==" }, + "node_modules/@types/fbemitter": { + "version": "2.0.32", + "resolved": "https://registry.npmjs.org/@types/fbemitter/-/fbemitter-2.0.32.tgz", + "integrity": "sha512-Hwq28bBlbmfCgLnNJvjl5ssTrbZCTSblI4vqPpqZrbbEL8vn5l2UivxhlMYfUY7a4SR8UB6RKoLjOZfljqAa6g==" + }, + "node_modules/@types/flux": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/@types/flux/-/flux-3.1.11.tgz", + "integrity": "sha512-Aq4UB1ZqAKcPbhB0GpgMw2sntvOh71he9tjz53TLKrI7rw3Y3LxCW5pTYY9IV455hQapm4pmxFjpqlWOs308Yg==", + "dependencies": { + "@types/fbemitter": "*", + "@types/react": "*" + } + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", diff --git a/package.json b/package.json index 62c4c0fa..efde5e04 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "@khanacademy/simple-markdown": "0.8.6", "@matrix-org/olm": "3.2.14", "@tippyjs/react": "4.2.6", + "@types/flux": "3.1.11", "blurhash": "2.0.4", "browser-encrypt-attachment": "0.3.0", "dateformat": "5.0.3", @@ -53,6 +54,7 @@ "@esbuild-plugins/node-globals-polyfill": "0.2.3", "@rollup/plugin-inject": "5.0.3", "@rollup/plugin-wasm": "6.1.1", + "@types/dateformat": "5.0.0", "@types/node": "18.11.18", "@types/react": "18.0.26", "@types/react-dom": "18.0.9", diff --git a/src/app/atoms/time/Time.tsx b/src/app/atoms/time/Time.tsx index 1010f89a..7de5effc 100644 --- a/src/app/atoms/time/Time.tsx +++ b/src/app/atoms/time/Time.tsx @@ -5,7 +5,7 @@ import { isInSameDay } from "../../../util/common"; export interface TimeProps { timestamp: number; - fullTime: boolean; + fullTime?: boolean; } function Time({ timestamp, fullTime }: TimeProps) { diff --git a/src/index.jsx b/src/index.tsx similarity index 100% rename from src/index.jsx rename to src/index.tsx