mirror of
https://github.com/prymitive/karma
synced 2026-05-15 04:06:41 +00:00
chore(ui): migrate more code to typescript
This commit is contained in:
committed by
Łukasz Mierzwa
parent
55170f8812
commit
4d4dd111c1
@@ -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 };
|
||||
Reference in New Issue
Block a user