refactor(striker-ui): rename *ForwardRefContent->*ForwardedRefContent

main
Tsu-ba-me 2 years ago
parent d6920acb4f
commit aea864fec5
  1. 6
      striker-ui/components/GeneralInitForm.tsx
  2. 6
      striker-ui/components/NetworkInitForm.tsx
  3. 8
      striker-ui/components/StrikerInitForm.tsx

@ -38,7 +38,7 @@ type GeneralInitFormValues = {
organizationPrefix?: string; organizationPrefix?: string;
}; };
type GeneralInitFormForwardRefContent = { type GeneralInitFormForwardedRefContent = {
get?: () => GeneralInitFormValues; get?: () => GeneralInitFormValues;
}; };
@ -96,7 +96,7 @@ const buildHostName = ({
: ''; : '';
const GeneralInitForm = forwardRef< const GeneralInitForm = forwardRef<
GeneralInitFormForwardRefContent, GeneralInitFormForwardedRefContent,
{ toggleSubmitDisabled?: ToggleSubmitDisabledFunction } { toggleSubmitDisabled?: ToggleSubmitDisabledFunction }
>(({ toggleSubmitDisabled }, ref) => { >(({ toggleSubmitDisabled }, ref) => {
const [helpMessage, setHelpMessage] = useState<ReactNode | undefined>(); const [helpMessage, setHelpMessage] = useState<ReactNode | undefined>();
@ -845,6 +845,6 @@ const GeneralInitForm = forwardRef<
GeneralInitForm.defaultProps = { toggleSubmitDisabled: undefined }; GeneralInitForm.defaultProps = { toggleSubmitDisabled: undefined };
GeneralInitForm.displayName = 'GeneralInitForm'; GeneralInitForm.displayName = 'GeneralInitForm';
export type { GeneralInitFormForwardRefContent, GeneralInitFormValues }; export type { GeneralInitFormForwardedRefContent, GeneralInitFormValues };
export default GeneralInitForm; export default GeneralInitForm;

@ -85,7 +85,7 @@ type NetworkInitFormValues = {
networks: Omit<NetworkInput, 'ipAddressInputRef' | 'subnetMaskInputRef'>[]; networks: Omit<NetworkInput, 'ipAddressInputRef' | 'subnetMaskInputRef'>[];
}; };
type NetworkInitFormForwardRefContent = { type NetworkInitFormForwardedRefContent = {
get?: () => NetworkInitFormValues; get?: () => NetworkInitFormValues;
}; };
@ -583,7 +583,7 @@ NetworkForm.defaultProps = {
}; };
const NetworkInitForm = forwardRef< const NetworkInitForm = forwardRef<
NetworkInitFormForwardRefContent, NetworkInitFormForwardedRefContent,
{ toggleSubmitDisabled?: (testResult: boolean) => void } { toggleSubmitDisabled?: (testResult: boolean) => void }
>(({ toggleSubmitDisabled }, ref) => { >(({ toggleSubmitDisabled }, ref) => {
const [dragMousePosition, setDragMousePosition] = useState<{ const [dragMousePosition, setDragMousePosition] = useState<{
@ -1389,7 +1389,7 @@ NetworkInitForm.defaultProps = { toggleSubmitDisabled: undefined };
NetworkInitForm.displayName = 'NetworkInitForm'; NetworkInitForm.displayName = 'NetworkInitForm';
export type { export type {
NetworkInitFormForwardRefContent, NetworkInitFormForwardedRefContent,
NetworkInitFormValues, NetworkInitFormValues,
NetworkInput, NetworkInput,
NetworkInterfaceInputMap, NetworkInterfaceInputMap,

@ -5,13 +5,13 @@ import ConfirmDialog from './ConfirmDialog';
import ContainedButton from './ContainedButton'; import ContainedButton from './ContainedButton';
import FlexBox from './FlexBox'; import FlexBox from './FlexBox';
import GeneralInitForm, { import GeneralInitForm, {
GeneralInitFormForwardRefContent, GeneralInitFormForwardedRefContent,
GeneralInitFormValues, GeneralInitFormValues,
} from './GeneralInitForm'; } from './GeneralInitForm';
import mainAxiosInstance from '../lib/singletons/mainAxiosInstance'; import mainAxiosInstance from '../lib/singletons/mainAxiosInstance';
import MessageBox, { Message } from './MessageBox'; import MessageBox, { Message } from './MessageBox';
import NetworkInitForm, { import NetworkInitForm, {
NetworkInitFormForwardRefContent, NetworkInitFormForwardedRefContent,
NetworkInitFormValues, NetworkInitFormValues,
} from './NetworkInitForm'; } from './NetworkInitForm';
import { Panel, PanelHeader } from './Panels'; import { Panel, PanelHeader } from './Panels';
@ -31,8 +31,8 @@ const StrikerInitForm: FC = () => {
useState<boolean>(false); useState<boolean>(false);
const [isSubmittingForm, setIsSubmittingForm] = useState<boolean>(false); const [isSubmittingForm, setIsSubmittingForm] = useState<boolean>(false);
const generalInitFormRef = useRef<GeneralInitFormForwardRefContent>({}); const generalInitFormRef = useRef<GeneralInitFormForwardedRefContent>({});
const networkInitFormRef = useRef<NetworkInitFormForwardRefContent>({}); const networkInitFormRef = useRef<NetworkInitFormForwardedRefContent>({});
const buildSubmitSection = useMemo( const buildSubmitSection = useMemo(
() => () =>

Loading…
Cancel
Save