diff --git a/apps/common/utils/constants.tsx b/apps/common/utils/constants.tsx index 3d1ead683..75aba9e45 100644 --- a/apps/common/utils/constants.tsx +++ b/apps/common/utils/constants.tsx @@ -46,11 +46,10 @@ export const VAULTS_APPS: TApp[] = [ } ]; -export const APPS: TApp[] = [ +export const COMMUNITY_APPS: TApp[] = [ { name: 'yETH', - description: - 'A basket of LSTs in a single token. Simple, straight forward, risk adjusted liquid staking yield.', + description: 'A basket of LSTs in a single token.', logoURI: 'https://yeth.yearn.fi/favicons/favicon-96x96.png', appURI: 'https://yeth.yearn.fi/' }, @@ -131,14 +130,13 @@ export const INTEGRATIONS_APPS: TApp[] = [ }, { name: 'StakeDAO', - description: 'Stake DAO is a non-custodial liquid staking platform focused on governance tokens.', + description: 'A non-custodial liquid staking platform focused on governance tokens.', logoURI: 'https://www.stakedao.org/logo.png', appURI: 'https://www.stakedao.org' }, { name: 'Sturdy', - description: - 'Isolated lending with shared liquidity. Permissionlessly create a liquid money market for any asset.', + description: 'Isolated lending with shared liquidity.', logoURI: 'https://avatars.githubusercontent.com/u/90377574?s=200&v=4', appURI: 'https://v2.sturdy.finance' }, @@ -214,7 +212,7 @@ export const FEATURED_APPS = [ } ]; -export const ALL_APPS = [...FEATURED_APPS, ...VAULTS_APPS, ...APPS, ...YEARN_X_APPS, ...INTEGRATIONS_APPS]; +export const ALL_APPS = [...FEATURED_APPS, ...VAULTS_APPS, ...COMMUNITY_APPS, ...YEARN_X_APPS, ...INTEGRATIONS_APPS]; export const CATEGORIES_DICT = { 'featured-apps': { @@ -231,12 +229,12 @@ export const CATEGORIES_DICT = { catrgorySlug: 'vaults', apps: VAULTS_APPS }, - apps: { - categoryName: 'Apps', + 'community-apps': { + categoryName: 'Community Apps', categoryDescription: 'Yearn is a decentralized suite of products helping individuals, DAOs, and other protocols earn yield on their digital assets.', - catrgorySlug: 'apps', - apps: APPS + catrgorySlug: 'community-apps', + apps: COMMUNITY_APPS }, 'yearn-x': { categoryName: 'Yearn X Projects', @@ -268,7 +266,7 @@ export const LANDING_SIDEBAR_LINKS = [ export const MENU_TABS = [ {title: 'Home', route: '/'}, {title: 'Vaults', route: 'vaults'}, - {title: 'Apps', route: 'apps'}, + {title: 'Community Apps', route: 'community-apps'}, {title: 'Yearn X Projects', route: 'yearn-x'}, {title: 'Integrations', route: 'integrations'} // {title: 'About', route: 'about'} @@ -285,7 +283,7 @@ export const iconsDict = { '/': , about: , vaults: , - apps: , + 'community-apps': , 'yearn-x': , integrations: }; diff --git a/pages/home/[category].tsx b/pages/home/[category].tsx index c8fbc8542..d405aa7b9 100644 --- a/pages/home/[category].tsx +++ b/pages/home/[category].tsx @@ -19,10 +19,10 @@ export default function Index(props: {router: NextRouter}): ReactElement { ** On component mount we shuffle the array of Apps to avoid any bias. **********************************************************************************************/ useMountEffect(() => { - if (currentCatrgory.apps.length < 1) { + if (currentCatrgory?.apps.length < 1) { return; } - set_shuffledApps(currentCatrgory.apps.toSorted(() => 0.5 - Math.random())); + set_shuffledApps(currentCatrgory?.apps.toSorted(() => 0.5 - Math.random())); }); return ( diff --git a/pages/home/index.tsx b/pages/home/index.tsx index 337be6027..e5d0f1b82 100644 --- a/pages/home/index.tsx +++ b/pages/home/index.tsx @@ -9,7 +9,7 @@ import {PromoPoster} from '@common/components/PromoPoster'; import {useSearch} from '@common/contexts/useSearch'; import {LogoDiscord} from '@common/icons/LogoDiscord'; import {LogoTwitter} from '@common/icons/LogoTwitter'; -import {APPS, FEATURED_APPS, INTEGRATIONS_APPS, VAULTS_APPS, YEARN_X_APPS} from '@common/utils/constants'; +import {COMMUNITY_APPS, FEATURED_APPS, INTEGRATIONS_APPS, VAULTS_APPS, YEARN_X_APPS} from '@common/utils/constants'; export default function Home(): ReactElement { const router = useRouter(); @@ -60,9 +60,9 @@ export default function Home(): ReactElement { apps={VAULTS_APPS} /> router.push('/home/apps')} - apps={APPS} + title={'Community Apps'} + onExpandClick={() => router.push('/home/community-apps')} + apps={COMMUNITY_APPS} />