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

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

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

Loading…
Cancel
Save