-
Notifications
You must be signed in to change notification settings - Fork 494
Open
Labels
front-endIssue related to the React Front End DashboardIssue related to the React Front End Dashboardtech-debtTechnical debt issuesTechnical debt issues
Description
Description
The ServerSideSDKKeys.js component is a class component using Flux stores (ProjectStore) that causes a crash when ProjectStore.getEnvironment() returns undefined (Sentry issue FLAGSMITH-FRONTEND-4FX). This blocks users from creating server-side keys.
Current state
- Class component (~250 lines)
- Uses
ProjectStore.getEnvironment()for environment name lookup - Uses imperative
getStore().dispatch()for RTK Query operations - Contains nested
CreateServerSideKeyModalclass component
Objectives
- Migrate to functional components with TypeScript
- Break into smaller, focused components (CreateServerSideKeyModal, ServerSideKeyRow)
- Replace ProjectStore with RTK Query (
useGetEnvironmentsQuery) - Use RTK Query hooks for server-side key CRUD operations
- Feature flag (
rtk_server_side_sdk_keys) to toggle between old and new
Structure
pages/sdk-keys/
├── SDKKeysPage.tsx
├── index.ts
└── components/
├── ServerSideSDKKeys.tsx
├── CreateServerSideKeyModal.tsx
├── ServerSideKeyRow.tsx
└── index.ts
Related
- Sentry: FLAGSMITH-FRONTEND-4FX —
TypeError: Cannot read properties of undefined (reading 'name')inCreateServerSideKeyModal.render
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
front-endIssue related to the React Front End DashboardIssue related to the React Front End Dashboardtech-debtTechnical debt issuesTechnical debt issues