Skip to content

Commit

Permalink
Merged in feature/weekly_active_daos (pull request #158)
Browse files Browse the repository at this point in the history
#1 - Prioritize Weekly Active DAOs and Weekly Active Users
  • Loading branch information
okalenyk committed Jan 19, 2022
2 parents 0fd4e35 + 1d3bf69 commit bdd0129
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
6 changes: 5 additions & 1 deletion src/app/general-info/active-dao/active-dao.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ export const ActiveDao: FC = () => {
period={period}
setPeriod={setPeriod}
lines={[
{ name: 'Active DAOs', color: '#E33F84', dataKey: 'count' },
{
name: 'Weekly Active DAOs',
color: '#E33F84',
dataKey: 'count',
},
]}
/>
) : null}
Expand Down
24 changes: 12 additions & 12 deletions src/app/general-info/general-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,35 +65,35 @@ export const GeneralInfo: FC = () => {
<Widgets>
<WidgetTile
className={styles.widget}
onClick={() => history.push(routes.generalInfo)}
active={Boolean(
matchPath(location.pathname, {
path: ROUTES.generalInfo,
exact: true,
}),
)}
onClick={() => history.push(routes.generalInfo)}
>
<WidgetInfo
title="Number of DAOs"
number={general?.dao?.count}
percentages={general?.dao?.growth}
title="Active DAOs"
number={general?.activity?.count}
percentages={general?.activity?.growth}
/>
</WidgetTile>

<WidgetTile
className={styles.widget}
onClick={() => history.push(routes.generalInfoActiveDao)}
active={Boolean(
matchPath(location.pathname, {
path: ROUTES.generalInfoActiveDao,
path: ROUTES.generalInfoDaoCount,
exact: true,
}),
)}
onClick={() => history.push(routes.generalInfoDaoCount)}
>
<WidgetInfo
title="Active DAOs"
number={general?.activity?.count}
percentages={general?.activity?.growth}
title="Number of DAOs"
number={general?.dao?.count}
percentages={general?.dao?.growth}
/>
</WidgetTile>

Expand Down Expand Up @@ -134,11 +134,11 @@ export const GeneralInfo: FC = () => {

<div className={styles.mainContent}>
<Switch>
<Route exact path={ROUTES.generalInfo} component={NumbersDao} />
<Route exact path={ROUTES.generalInfo} component={ActiveDao} />
<Route
exact
path={ROUTES.generalInfoActiveDao}
component={ActiveDao}
path={ROUTES.generalInfoDaoCount}
component={NumbersDao}
/>
<Route exact path={ROUTES.generalInfoGroups} component={Groups} />
<Route
Expand Down
2 changes: 1 addition & 1 deletion src/app/root/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const App: FC = () => (
/>
<Route
exact
path={ROUTES.generalInfoActiveDao}
path={ROUTES.generalInfoDaoCount}
component={GeneralInfo}
/>
<Route
Expand Down
2 changes: 1 addition & 1 deletion src/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const ROUTES = {
page404: '/404',

generalInfo: '/:contract/general-info',
generalInfoActiveDao: '/:contract/general-info/dao-active',
generalInfoDaoCount: '/:contract/general-info/dao-count',
generalInfoGroups: '/:contract/general-info/groups',
generalInfoAverageGroups: '/:contract/general-info/average-groups',
generalInfoDao: '/:contract/general-info/:dao',
Expand Down

0 comments on commit bdd0129

Please sign in to comment.