added type to useState
Signed-off-by: mufaddal motiwala <mufaddalmm.52@gmail.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
+2
-2
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user