diff --git a/frontend/src/component/onboarding/dialog/SdkConnected.tsx b/frontend/src/component/onboarding/dialog/SdkConnected.tsx index 498ab26a4d..fd73d636b8 100644 --- a/frontend/src/component/onboarding/dialog/SdkConnected.tsx +++ b/frontend/src/component/onboarding/dialog/SdkConnected.tsx @@ -45,9 +45,10 @@ export const SdkConnected: FC = ({ sdk }) => { Production settings - In order to validate the connection, we changed some - settings that you might want to revert. We recommend the - following default settings. + You have successfully connected your SDK. In the + previous code example, the settings were optimized for + development. We recommend the following setup for + production. {productionSnippet} diff --git a/frontend/src/component/onboarding/dialog/snippets/nodejs.md b/frontend/src/component/onboarding/dialog/snippets/nodejs.md index c884b082ea..2580de4e53 100644 --- a/frontend/src/component/onboarding/dialog/snippets/nodejs.md +++ b/frontend/src/component/onboarding/dialog/snippets/nodejs.md @@ -20,10 +20,6 @@ setInterval(() => { ``` --- -### Production settings - -In order to validate the connection, we changed some settings that you might want to revert. We recommend the following default settings. - ```js const { initialize } = require('unleash-client'); @@ -35,10 +31,6 @@ const unleash = initialize({ ``` --- -### Additional resources - -Now that we’ve validated the connection, you might want to look into more advanced use cases and examples: - - [SDK repository with documentation](https://github.com/Unleash/unleash-client-node) - [Node.js SDK example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/NodeJS) - [Node.js SDK tutorial](https://dev.to/reeshee/how-to-implement-feature-flags-in-nodejs-using-unleash-3907) diff --git a/frontend/src/component/onboarding/flow/ProjectOnboarding.test.tsx b/frontend/src/component/onboarding/flow/ProjectOnboarding.test.tsx index 7cb2a63179..1508eeb117 100644 --- a/frontend/src/component/onboarding/flow/ProjectOnboarding.test.tsx +++ b/frontend/src/component/onboarding/flow/ProjectOnboarding.test.tsx @@ -22,6 +22,7 @@ test('Project can start onboarding', async () => { projectId={projectId} setConnectSdkOpen={() => {}} setOnboardingFlow={() => {}} + refetchFeatures={() => {}} /> } /> @@ -50,6 +51,7 @@ test('Project can connect SDK', async () => { projectId={projectId} setConnectSdkOpen={() => {}} setOnboardingFlow={() => {}} + refetchFeatures={() => {}} /> } /> diff --git a/frontend/src/component/onboarding/flow/ProjectOnboarding.tsx b/frontend/src/component/onboarding/flow/ProjectOnboarding.tsx index 0396373c1c..473fb65747 100644 --- a/frontend/src/component/onboarding/flow/ProjectOnboarding.tsx +++ b/frontend/src/component/onboarding/flow/ProjectOnboarding.tsx @@ -14,10 +14,12 @@ interface IProjectOnboardingProps { projectId: string; setConnectSdkOpen: (open: boolean) => void; setOnboardingFlow: (status: 'visible' | 'closed') => void; + refetchFeatures: () => void; } interface ICreateFlagProps { projectId: string; + refetchFeatures: () => void; } const Container = styled('div')(({ theme }) => ({ @@ -101,6 +103,7 @@ export const ProjectOnboarding = ({ projectId, setConnectSdkOpen, setOnboardingFlow, + refetchFeatures, }: IProjectOnboardingProps) => { const { project } = useProjectOverview(projectId); const isFirstFlagCreated = @@ -133,7 +136,10 @@ export const ProjectOnboarding = ({ 'first-flag-created' ? ( ) : ( - + )} @@ -166,7 +172,7 @@ export const ProjectOnboarding = ({ ); }; -const CreateFlag = ({ projectId }: ICreateFlagProps) => { +const CreateFlag = ({ projectId, refetchFeatures }: ICreateFlagProps) => { const { refetch } = useProjectOverview(projectId); return ( <> @@ -181,7 +187,10 @@ const CreateFlag = ({ projectId }: ICreateFlagProps) => { { + refetch(); + refetchFeatures(); + }} /> ); diff --git a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.tsx b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.tsx index c8f427ab17..a81e782efc 100644 --- a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.tsx +++ b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureToggles.tsx @@ -426,6 +426,7 @@ export const ProjectFeatureToggles = ({ projectId={projectId} setConnectSdkOpen={setConnectSdkOpen} setOnboardingFlow={setOnboardingFlow} + refetchFeatures={refetch} /> } />