Skip to content
Snippets Groups Projects
Commit 66c6bf6e authored by Sky Brewer's avatar Sky Brewer
Browse files

Fix React and other imports

parent 7010de03
Branches mamad
No related tags found
2 merge requests!612Release 5.0.0,!562CE-3339: Add vite
import { useCallback, useEffect, useState, useMemo } from "react";
import {
useCallback,
useEffect,
useState,
useMemo,
FormEvent,
SyntheticEvent
} from "react";
import {
Button,
TextField,
......@@ -115,7 +122,7 @@ export function IOCDeployDialog({
getTagOrCommitIds(gitProjectId, "", "CONTAINS");
}, [gitProjectId, getTagOrCommitIds]);
const onSubmit = (event: React.FormEvent<HTMLFormElement>) => {
const onSubmit = (event: FormEvent<HTMLFormElement>) => {
event.preventDefault();
setButtonDisabled(true);
const { git: gitText } = event.currentTarget
......@@ -183,7 +190,7 @@ export function IOCDeployDialog({
)
}}
onGitQueryValueSelect={(
_: React.SyntheticEvent<Element, Event>,
_: SyntheticEvent<Element, Event>,
value: GitReference
) => {
setRevision(value?.reference);
......
import {
DeployIcon,
UndeployIcon,
BatchDeployIcon,
BatchUndeployIcon,
StartIcon,
StopIcon
} from "./JobIcons";
export const ACTION_TYPES = {
DEPLOY: "DEPLOY",
UNDEPLOY: "UNDEPLOY",
......@@ -15,30 +6,3 @@ export const ACTION_TYPES = {
START: "START",
STOP: "STOP"
};
export const ActionTypesComponent = {
DEPLOY: {
label: "Deployment",
icon: DeployIcon
},
UNDEPLOY: {
label: "Undeployment",
icon: UndeployIcon
},
BATCH_DEPLOY: {
label: "Batch deployment",
icon: BatchDeployIcon
},
BATCH_UNDEPLOY: {
label: "Batch undeployment",
icon: BatchUndeployIcon
},
START: {
label: "Set active",
icon: StartIcon
},
STOP: {
label: "Set inactive",
icon: StopIcon
}
};
......@@ -7,7 +7,6 @@ import {
} from "@mui/icons-material";
import { BatchDeploySymbol } from "../../icons/BatchDeploySymbol";
import { BatchUndeploySymbol } from "../../icons/BatchUndeploySymbol";
import { ActionTypesComponent } from "./JobData";
const batchIconDefaultProps = { width: "25px", height: "25px" };
......@@ -43,6 +42,33 @@ export interface ActionType {
STOP: string;
}
const ActionTypesComponent = {
DEPLOY: {
label: "Deployment",
icon: DeployIcon
},
UNDEPLOY: {
label: "Undeployment",
icon: UndeployIcon
},
BATCH_DEPLOY: {
label: "Batch deployment",
icon: BatchDeployIcon
},
BATCH_UNDEPLOY: {
label: "Batch undeployment",
icon: BatchUndeployIcon
},
START: {
label: "Set active",
icon: StartIcon
},
STOP: {
label: "Set inactive",
icon: StopIcon
}
};
export const ActionTypeIconText = ({ action }: ActionTypeIconTextProps) => {
const Icon = ActionTypesComponent[action as keyof ActionType].icon;
......
import { HostTable, rowDescription, createRow } from "./HostTable";
import { HostTable } from "./HostTable";
export { HostTable, rowDescription, createRow };
export { HostTable };
import React from "react";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App";
import { LicenseInfo } from "@mui/x-license-pro";
......@@ -10,7 +10,7 @@ const container = document.getElementById("root");
const root = createRoot(container);
root.render(
<React.StrictMode>
<StrictMode>
<App />
</React.StrictMode>
</StrictMode>
);
import { ReactNode } from "react";
import { Provider } from "react-redux";
import { store } from "./store";
interface ReduxProviderProps {
children: React.ReactNode;
children: ReactNode;
}
export const ReduxProvider = ({ children }: ReduxProviderProps) => {
......
declare module "@ess-ics/ce-ui-common";
declare module "*.svg" {
import * as React from "react";
import { FunctionComponent, SVGProps, SVGSVGElement } from "react";
export const ReactComponent: React.FunctionComponent<
React.SVGProps<SVGSVGElement> & { title?: string }
export const ReactComponent: FunctionComponent<
SVGProps<SVGSVGElement> & { title?: string }
>;
const content: string;
export default content;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment