added type to useState

Signed-off-by: mufaddal motiwala <mufaddalmm.52@gmail.com>
This commit is contained in:
mufaddal motiwala
2021-12-20 12:49:38 +05:30
parent 7ca8725460
commit 66483c97d2
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -35,8 +35,7 @@
"@backstage/dev-utils": "^0.2.14",
"@testing-library/jest-dom": "^5.10.1",
"@types/react": "^16.13.1 || ^17.0.0",
"cross-fetch": "^3.0.6",
"react": "^16.13.1 || ^17.0.0"
"cross-fetch": "^3.0.6"
},
"files": [
"dist"
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import React, { useState } from 'react';
import { Grid, Tab, Tabs, makeStyles } from '@material-ui/core';
import { newRelicDashboardApiRef } from '../../../api';
import { useApi } from '@backstage/core-plugin-api';
@@ -85,7 +85,7 @@ export const DashboardSnapshotList = ({ guid }: Props) => {
const dashboardObject: any = newRelicDashboardAPI.getDashboardEntity(guid);
return dashboardObject;
}, []);
const [value1, setValue1] = React.useState(0);
const [value1, setValue1] = useState<number>(0);
const handleChange = ({}: React.ChangeEvent<{}>, newValue: number) => {
setValue1(newValue);
};