Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-3682

Console core package: Convert components in cluster-settings folder from class component to functional component

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • HAC Infra OCP - Sprint 239

      One of the steps of the migration strategy is start using the v6 API for components that are passed to the `CompatRoute` component, based on the [migration strategy guide|https://github.com/remix-run/react-router/discussions/8753.]. This route now has both v5 and v6 routing contexts, so we can start migrating component code to v6.

      If the component is a class component, you'll need to convert it to a function component first so that you can use hooks.

      The following files in frontend/public/components/cluster-settings contain components that need to use the v6 useNavigate hook, requiring them to be converted from a class component to a functional component: 

      • basicauth-idp-form.tsx
      • github-idp-form.tsx
      • gitlab-idp-form.tsx
      • google-idp-form.tsx
      • htpasswd-idp-form.tsx
      • keystone-idp-form.tsx
      • idap-idp-form.tsx
      • openid-idp-form.tsx
      • request-header-idp-form.tsx

      AC: Listed components in frontend/public/components/cluster-settings rewritten from class component to functional component. 

              rh-ee-gvudinh Giao Vu Dinh (Inactive)
              rh-ee-gvudinh Giao Vu Dinh (Inactive)
              Yanping Zhang Yanping Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: