chore(ui): migrate more code to typescript

This commit is contained in:
Łukasz Mierzwa
2020-06-29 16:14:53 +01:00
committed by Łukasz Mierzwa
parent 55170f8812
commit 4d4dd111c1
36 changed files with 392 additions and 205 deletions

View File

@@ -1,5 +1,4 @@
import React, { useState, useEffect } from "react";
import PropTypes from "prop-types";
import React, { useState, useEffect, FC } from "react";
import { autorun } from "mobx";
import { useObserver } from "mobx-react-lite";
@@ -8,7 +7,9 @@ import Favico from "favico.js";
import { AlertStore } from "Stores/AlertStore";
const FaviconBadge = ({ alertStore }) => {
const FaviconBadge: FC<{
alertStore: AlertStore;
}> = ({ alertStore }) => {
const [favico] = useState(
new Favico({
animation: "none",
@@ -38,8 +39,5 @@ const FaviconBadge = ({ alertStore }) => {
/>
));
};
FaviconBadge.propTypes = {
alertStore: PropTypes.instanceOf(AlertStore).isRequired,
};
export { FaviconBadge };