Skip to content

Commit

Permalink
chore: cleanup the previous usage of 'learn' feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
gre committed Mar 5, 2024
1 parent 5a5cff1 commit 7e26827
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 183 deletions.
4 changes: 0 additions & 4 deletions apps/ledger-live-desktop/src/renderer/Default.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const Swap2 = lazy(() => import("~/renderer/screens/exchange/Swap2"));

const Market = lazy(() => import("~/renderer/screens/market"));
const MarketCoinScreen = lazy(() => import("~/renderer/screens/market/MarketCoinScreen"));
const Learn = lazy(() => import("~/renderer/screens/learn"));
const WelcomeScreenSettings = lazy(
() => import("~/renderer/screens/settings/WelcomeScreenSettings"),
);
Expand Down Expand Up @@ -316,9 +315,6 @@ export default function Default() {
render={withSuspense(MarketCoinScreen)}
/>
<Route path="/market" render={withSuspense(Market)} />
<FeatureToggle featureId="learn">
<Route path="/learn" render={withSuspense(Learn)} />
</FeatureToggle>
</Switch>
</Page>
<Drawer />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,6 @@ const MainSideBar = () => {
push("/card");
trackEntry("card");
}, [push, trackEntry]);
const handleClickLearn = useCallback(() => {
push("/learn");
trackEntry("learn");
}, [push, trackEntry]);
const handleClickDashboard = useCallback(() => {
push("/");
trackEntry("/portfolio");
Expand Down Expand Up @@ -398,18 +394,6 @@ const MainSideBar = () => {
isActive={location.pathname.startsWith("/market")}
collapsed={secondAnim}
/>
<FeatureToggle featureId="learn">
<SideBarListItem
id="learn"
label={t("sidebar.learn")}
icon={IconsLegacy.NewsMedium}
iconSize={20}
iconActiveColor="wallet"
isActive={location.pathname.startsWith("/learn")}
onClick={handleClickLearn}
collapsed={secondAnim}
/>
</FeatureToggle>
<SideBarListItem
id={"accounts"}
label={t("sidebar.accounts")}
Expand Down
42 changes: 0 additions & 42 deletions apps/ledger-live-desktop/src/renderer/screens/learn/index.tsx

This file was deleted.

5 changes: 2 additions & 3 deletions apps/ledger-live-desktop/static/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@
},
"sidebar": {
"card": "Card",
"learn": "Learn",
"menu": "Menu",
"stars": "Starred accounts",
"accounts": "Accounts",
Expand Down Expand Up @@ -5539,11 +5538,11 @@
},
"WrongDeviceForAccountPayout": {
"title": "Something went wrong",
"description": "This receiving account does not belong to your device. Please change and retry."
"description": "This receiving account does not belong to your device. Please change and retry."
},
"WrongDeviceForAccountRefund": {
"title": "Something went wrong",
"description": "This receiving account does not belong to your device for the refund. Please change and retry."
"description": "This receiving account does not belong to your device for the refund. Please change and retry."
},
"DeviceAppVerifyNotSupported": {
"title": "App update required",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ import {
} from "~/screens/BleDevicePairingFlow";

import PostBuyDeviceScreen from "~/screens/PostBuyDeviceScreen";
import LearnWebView from "~/screens/Learn/index";
import { useNoNanoBuyNanoWallScreenOptions } from "~/context/NoNanoBuyNanoWall";
import PostBuyDeviceSetupNanoWallScreen from "~/screens/PostBuyDeviceSetupNanoWallScreen";
import CurrencySettings from "~/screens/Settings/CryptoAssets/Currencies/CurrencySettings";
Expand Down Expand Up @@ -194,11 +193,6 @@ export default function BaseNavigator() {
}}
{...noNanoBuyNanoWallScreenOptions}
/>
<Stack.Screen
name={ScreenName.LearnWebView}
component={LearnWebView}
options={{ headerShown: false }}
/>
<Stack.Screen
name={NavigatorName.ExploreTab}
component={ExploreTabNavigator}
Expand Down
10 changes: 1 addition & 9 deletions apps/ledger-live-mobile/src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2182,15 +2182,7 @@
"discover": "Discover",
"nanoX": "Nano X",
"market": "Market",
"earn": "Earn",
"learn": "Learn"
},
"learn": {
"pageTitle": "learn",
"sectionShows": "Shows",
"sectionVideo": "Video",
"sectionPodcast": "Podcast",
"sectionArticles": "Articles"
"earn": "Earn"
},
"portfolio": {
"totalBalance": "Total balance",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ const linkingOptions = () => ({
* ie: "ledgerlive://learn"
*/
[ScreenName.Newsfeed]: "newsfeed",
[ScreenName.Learn]: "learn",
},
},
[NavigatorName.ImportAccounts]: {
Expand Down
95 changes: 0 additions & 95 deletions apps/ledger-live-mobile/src/screens/Learn/index.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export const DEFAULT_FEATURES: Features = {
newsfeedPage: initFeature(),
swapWalletApiPartnerList: initFeature(),
stakePrograms: initFeature(),
learn: initFeature(),
receiveStakingFlowConfigDesktop: initFeature(),
brazePushNotifications: initFeature(),
walletNftGallery: initFeature(),
Expand Down
6 changes: 0 additions & 6 deletions libs/ledgerjs/packages/types-live/src/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export type CurrencyFeatures = {
* @dev Add features here.
*/
export type Features = CurrencyFeatures & {
learn: Feature_Learn;
brazePushNotifications: Feature_BrazePushNotifications;
brazeLearn: Feature_BrazeLearn;
llmNewDeviceSelection: Feature_LlmNewDeviceSelection;
Expand Down Expand Up @@ -282,11 +281,6 @@ export type Feature_ReceiveStakingFlowConfigDesktop = Feature<{
};
}>;

export type Feature_Learn = Feature<{
mobile: { url: string };
desktop: { url: string };
}>;

export type Feature_Storyly = Feature<{
stories: {
[key in StorylyInstanceID]: StorylyInstanceType;
Expand Down

0 comments on commit 7e26827

Please sign in to comment.