From 4d283f953d393cb65b472973b0d96df2ad4e4ea9 Mon Sep 17 00:00:00 2001 From: olav Date: Tue, 30 Aug 2022 09:21:31 +0200 Subject: [PATCH] refactor: rename Strategies to Strategy types on the frontend (#1990) --- .../menu/__tests__/__snapshots__/routes.test.tsx.snap | 2 +- frontend/src/component/menu/routes.ts | 2 +- .../StrategiesList/AddStrategyButton/AddStrategyButton.tsx | 4 ++-- .../component/strategies/StrategiesList/StrategiesList.tsx | 2 +- frontend/src/hooks/api/getters/useStrategies/useStrategies.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap index 66e7a740ae..0505b568d4 100644 --- a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap +++ b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap @@ -205,7 +205,7 @@ exports[`returns all baseRoutes 1`] = ` "mobile": true, }, "path": "/strategies", - "title": "Strategies", + "title": "Strategy types", "type": "protected", }, { diff --git a/frontend/src/component/menu/routes.ts b/frontend/src/component/menu/routes.ts index 8ec7904c59..a3342ff3b8 100644 --- a/frontend/src/component/menu/routes.ts +++ b/frontend/src/component/menu/routes.ts @@ -251,7 +251,7 @@ export const routes: IRoute[] = [ }, { path: '/strategies', - title: 'Strategies', + title: 'Strategy types', component: StrategiesList, type: 'protected', menu: { mobile: true, advanced: true }, diff --git a/frontend/src/component/strategies/StrategiesList/AddStrategyButton/AddStrategyButton.tsx b/frontend/src/component/strategies/StrategiesList/AddStrategyButton/AddStrategyButton.tsx index 91e7cc2d7c..e45285b3a4 100644 --- a/frontend/src/component/strategies/StrategiesList/AddStrategyButton/AddStrategyButton.tsx +++ b/frontend/src/component/strategies/StrategiesList/AddStrategyButton/AddStrategyButton.tsx @@ -20,7 +20,7 @@ export const AddStrategyButton = () => { onClick={() => navigate('/strategies/create')} permission={CREATE_STRATEGY} size="large" - tooltipProps={{ title: 'New strategy' }} + tooltipProps={{ title: 'New strategy type' }} > @@ -32,7 +32,7 @@ export const AddStrategyButton = () => { permission={CREATE_STRATEGY} data-testid={ADD_NEW_STRATEGY_ID} > - New strategy + New strategy type } /> diff --git a/frontend/src/component/strategies/StrategiesList/StrategiesList.tsx b/frontend/src/component/strategies/StrategiesList/StrategiesList.tsx index 659fc2b071..c57b397b80 100644 --- a/frontend/src/component/strategies/StrategiesList/StrategiesList.tsx +++ b/frontend/src/component/strategies/StrategiesList/StrategiesList.tsx @@ -288,7 +288,7 @@ export const StrategiesList = () => { isLoading={loading} header={ { const fetcher = (): Promise<{ strategies: IStrategy[] }> => { return fetch(STRATEGIES_PATH) - .then(handleErrorResponses('Strategies')) + .then(handleErrorResponses('Strategy types')) .then(res => res.json()); };