Skip to content

Commit

Permalink
feat: change some descriptin and catrgory name
Browse files Browse the repository at this point in the history
  • Loading branch information
Karlen9 committed Sep 30, 2024
1 parent 1613cac commit 91225e9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
24 changes: 11 additions & 13 deletions apps/common/utils/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
},
Expand Down Expand Up @@ -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'
},
Expand Down Expand Up @@ -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': {
Expand All @@ -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',
Expand Down Expand Up @@ -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'}
Expand All @@ -285,7 +283,7 @@ export const iconsDict = {
'/': <IconYearn />,
about: <IconAbout />,
vaults: <IconVaults />,
apps: <IconFrontends />,
'community-apps': <IconFrontends />,
'yearn-x': <IconYearnXApps />,
integrations: <IconIntegrations />
};
4 changes: 2 additions & 2 deletions pages/home/[category].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
8 changes: 4 additions & 4 deletions pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -60,9 +60,9 @@ export default function Home(): ReactElement {
apps={VAULTS_APPS}
/>
<CategorySection
title={'Apps'}
onExpandClick={() => router.push('/home/apps')}
apps={APPS}
title={'Community Apps'}
onExpandClick={() => router.push('/home/community-apps')}
apps={COMMUNITY_APPS}
/>
<CategorySection
title={'Yearn X Projects'}
Expand Down

0 comments on commit 91225e9

Please sign in to comment.