Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

perf(workspace): ts referenced workspace deps #353

Draft
wants to merge 22 commits into
base: daily
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
fcf88f2
chore(guardoni): dist-all shell script (#324)
ascariandrea Feb 2, 2022
2c88003
chore(ycai): remove 'moment' dep (#356)
ascariandrea Feb 3, 2022
777f2c0
chore(guardoni): removed moment dep (#355)
ascariandrea Feb 3, 2022
6457302
fix(ycai): return total contributions in get creator stats api (#358)
ascariandrea Feb 3, 2022
217e2e8
chore(workspace): tsc diagnostics report (#357)
ascariandrea Feb 3, 2022
70df1fd
chore(yttrex): removed outdated create-react-class dep (#360)
ascariandrea Feb 4, 2022
a1c1f22
chore(workspace): deps upgrade and "chai", "mocha", "immutability-hel…
ascariandrea Feb 7, 2022
39b5162
chore(shared): fix DOTENV_CONFIG_PATH resolution in webpack config (#…
ascariandrea Feb 8, 2022
8bd6339
fix: guardoni cli and electron build (#371)
ascariandrea Feb 9, 2022
e2319b1
fix(guardoni): removed unused imports from cli file
ascariandrea Feb 9, 2022
0f6451c
release: 2.2.1-0 CHANGELOG [skip ci]
Feb 9, 2022
5ab4a72
chore(workspace): ts references synced with project deps
ascariandrea Feb 10, 2022
25d3bd7
perf(workspace): ts reference and paths optimization
ascariandrea Feb 1, 2022
36c3d16
ci(yttrex): test check-ts-references
ascariandrea Feb 1, 2022
7d32a12
chore(workspace): project references
ascariandrea Feb 1, 2022
70b710f
chore(workspace): fix jest configuration for new project reference st…
ascariandrea Feb 2, 2022
d0faa1c
chore(workspace): removed @monorepo-utils dep
ascariandrea Feb 2, 2022
a4ae712
chore(workspace): one single folder for custom typings
ascariandrea Feb 2, 2022
049ae20
chore(workspace): fix webpack config imports
ascariandrea Feb 2, 2022
e02c544
chore(ycai): include typings
ascariandrea Feb 2, 2022
c0ed034
chore(yttrex): added typescript as dep
ascariandrea Feb 2, 2022
a5f5ad4
chore(workspace): update diagnostics for 'andrea'
ascariandrea Feb 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build/*
coverage/*
docker/*
qa/*
scripts/*
typings/*
webpack.*.ts
webpack.*.js
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
node_modules
build
dist
tsconfig.tsbuildinfo

# experiments related folders, the first keep .jpeg(s), the second .csv(s)
backend/thumbnails/*
Expand All @@ -30,3 +31,6 @@ coverage
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# ts build
*.tsbuildinfo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/flat-npm-4.1.1-b787c178f2-398be12185.zip
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/glob-npm-7.1.3-c65cc4bde2-d72a834a39.zip
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/he-npm-1.2.0-3b73a2ff07-3d4d6babcc.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ms-npm-2.1.1-5b4fd72c86-0078a23cd9.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
### [2.2.1-0](https://github.com/tracking-exposed/yttrex/compare/v2.2.0...v2.2.1-0) (2022-02-09)

- guardoni cli and electron build ([#371](https://github.com/tracking-exposed/yttrex/issues/371)) ([8bd6339](https://github.com/tracking-exposed/yttrex/commit/8bd6339b4be2a665018e7029a87f5434c116a6ca))
- **guardoni:** dist-all shell script ([#324](https://github.com/tracking-exposed/yttrex/issues/324)) ([fcf88f2](https://github.com/tracking-exposed/yttrex/commit/fcf88f217b805a4a3f1ee88adb1eb4b34b40554a))
- **guardoni:** removed moment dep ([#355](https://github.com/tracking-exposed/yttrex/issues/355)) ([777f2c0](https://github.com/tracking-exposed/yttrex/commit/777f2c047c94c7309dd0feaa89bff99ef7854880))
- **guardoni:** removed unused imports from cli file ([e2319b1](https://github.com/tracking-exposed/yttrex/commit/e2319b148e61888f23b90e7157ef6d2ae929dd73))
- **shared:** fix DOTENV_CONFIG_PATH resolution in webpack config ([#359](https://github.com/tracking-exposed/yttrex/issues/359)) ([39b5162](https://github.com/tracking-exposed/yttrex/commit/39b5162f1f0ee7392b507773da8f485bb30419d3))
- **workspace:** deps upgrade and "chai", "mocha", "immutability-helper", "cherio" and "marked" removal ([#365](https://github.com/tracking-exposed/yttrex/issues/365)) ([a1c1f22](https://github.com/tracking-exposed/yttrex/commit/a1c1f221ea4effd7864f683719cec7f66678d8db))
- **workspace:** tsc diagnostics report ([#357](https://github.com/tracking-exposed/yttrex/issues/357)) ([217e2e8](https://github.com/tracking-exposed/yttrex/commit/217e2e84c9e073f86b8062df64b887b9b92eb90b))
- **ycai:** remove 'moment' dep ([#356](https://github.com/tracking-exposed/yttrex/issues/356)) ([2c88003](https://github.com/tracking-exposed/yttrex/commit/2c88003817292bda5c4fa569fa48b0d5b21b5109))
- **ycai:** return total contributions in get creator stats api ([#358](https://github.com/tracking-exposed/yttrex/issues/358)) ([6457302](https://github.com/tracking-exposed/yttrex/commit/64573028c28ba536adf8aa404940c54a690f738a))
- **yttrex:** removed outdated create-react-class dep ([#360](https://github.com/tracking-exposed/yttrex/issues/360)) ([70df1fd](https://github.com/tracking-exposed/yttrex/commit/70df1fd67e0530be533af8e1bff68fe19a425c36))

## [2.2.0](https://github.com/tracking-exposed/yttrex/compare/v2.1.0...v2.2.0) (2022-02-01)

- **yttrex:** added --type filtering option for parserv2 ([9dd3772](https://github.com/tracking-exposed/yttrex/commit/9dd3772a554cd467cd96174f7de00c8f937ba589))
Expand Down
1 change: 0 additions & 1 deletion YCAI/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"env": {
"es6": true,
"node": true,
"mocha": true,
"browser": true
},
"globals": {
Expand Down
8 changes: 1 addition & 7 deletions YCAI/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
const { pathsToModuleNameMapper } = require('ts-jest');
const jestConfigBase = require('../jest.config.base');
const tsConfig = require('./tsconfig.json');

const tsPaths = pathsToModuleNameMapper(tsConfig.compilerOptions.paths, {
prefix: '<rootDir>/src/',
});

const moduleNameMapper = {
...tsPaths,
...jestConfigBase.moduleNameMapper,
'\\.(svg|ttf)$': '<rootDir>/__mocks__/fileMock.js',
'\\.(css)$': '<rootDir>/__mocks__/styleMock.js',
};
Expand Down
46 changes: 22 additions & 24 deletions YCAI/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@trex/ycai",
"version": "2.2.0",
"version": "2.2.1-0",
"description": "YouChoose AI",
"homepage": "https://youchoose.ai",
"bugs": "https://github.com/tracking-exposed/yttrex/issues",
Expand Down Expand Up @@ -28,25 +28,25 @@
"prepack": "yarn build"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
"@types/bs58": "^4.0.1",
"@types/chrome": "0.0.174",
"@types/chrome": "0.0.177",
"@types/debug": "^4.1.7",
"@types/jest": "^27.4.0",
"@types/node": "^16.11.21",
"@types/react": "^17.0.37",
"@types/node": "^16.11.22",
"@types/react": "17.0.38",
"@types/react-dom": "^17.0.11",
"@types/react-test-renderer": "^17.0.1",
"@types/swagger-ui": "^3.52.0",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"buffer": "^6.0.3",
"conventional-changelog-conventionalcommits": "^4.6.3",
"css-loader": "^6.5.1",
"dotenv": "^14.3.0",
"eslint": "^8.7.0",
"css-loader": "^6.6.0",
"dotenv": "^14.3.2",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-plugin-import": "^2.25.4",
Expand All @@ -64,11 +64,11 @@
"ts-jest": "^27.1.3",
"ts-loader": "^9.2.6",
"ts-node": "^10.4.0",
"typescript": "^4.5.4",
"webpack": "^5.67.0",
"typescript": "^4.5.5",
"webpack": "^5.68.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.3",
"webpack-dev-server": "^4.7.4",
"zenroom": "^2.2.3"
},
"dependencies": {
Expand All @@ -92,28 +92,26 @@
"date-fns": "^2.28.0",
"debug": "^4.3.3",
"fp-ts": "^2.11.8",
"i18next": "^21.6.5",
"i18next": "^21.6.10",
"io-ts": "^2.2.16",
"io-ts-types": "^0.5.16",
"lodash": "^4.17.21",
"marked": "^2.1.3",
"moment": "^2.29.1",
"monocle-ts": "^2.3.11",
"monocle-ts": "^2.3.12",
"nacl": "^0.1.3",
"newtype-ts": "^0.3.4",
"postcss": "^8.4.5",
"newtype-ts": "^0.3.5",
"postcss": "^8.4.6",
"react": "^17.0.2",
"react-dnd": "^14.0.4",
"react-dnd-html5-backend": "^14.0.2",
"react-dnd": "^14.0.5",
"react-dnd-html5-backend": "^14.1.0",
"react-dom": "^17.0.2",
"react-i18next": "^11.15.1",
"react-i18next": "^11.15.3",
"react-use-clipboard": "^1.0.7",
"swagger-ui": "^4.1.3",
"swagger-ui": "^4.4.1",
"ts-endpoint": "^2.0.0",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.13.5",
"uuid": "^2.0.3",
"web-vitals": "^2.1.2"
"web-vitals": "^2.1.4"
},
"browserslist": {
"production": [
Expand Down
2 changes: 1 addition & 1 deletion YCAI/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GetAPI } from '@shared/providers/api.provider';
import { GetAPI } from '@trex/shared/providers/api.provider';
import { config } from './config';

const { API, HTTPClient } = GetAPI({
Expand Down
4 changes: 2 additions & 2 deletions YCAI/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ThemeProvider } from '@material-ui/styles';
import { pipe } from 'fp-ts/lib/function';
import * as TE from 'fp-ts/lib/TaskEither';

import { GetLogger } from '@shared/logger';
import { GetLogger } from '@trex/shared/logger';
import debug from 'debug';

import { config } from './config';
Expand All @@ -14,7 +14,7 @@ import { settingsRefetch } from './state/popup.queries';
import { Settings } from './models/Settings';
import { YTContributionInfoBox } from './components/injected/YTContributionInfoBox';
import { YTVideoPage } from './components/injected/YTVideoPage';
import { ErrorBoundary } from '@shared/components/Error/ErrorBoundary';
import { ErrorBoundary } from '@trex/shared/components/Error/ErrorBoundary';
import { YCAITheme } from './theme';
import './i18n';

Expand Down
6 changes: 3 additions & 3 deletions YCAI/src/background/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as sharedConst from '@shared/constants';
import { APIError } from '@shared/errors/APIError';
import { ContentCreator } from '@shared/models/ContentCreator';
import * as sharedConst from '@trex/shared/constants';
import { APIError } from '@trex/shared/errors/APIError';
import { ContentCreator } from '@trex/shared/models/ContentCreator';
import { sequenceS } from 'fp-ts/lib/Apply';
import * as E from 'fp-ts/lib/Either';
import { pipe } from 'fp-ts/lib/function';
Expand Down
2 changes: 1 addition & 1 deletion YCAI/src/background/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as TE from 'fp-ts/lib/TaskEither';
import { Messages } from '../models/Messages';
import security from '../providers/bs58.provider';
import db from './db';
import * as constants from '@shared/constants';
import * as constants from '@trex/shared/constants';

export function generatePublicKeypair(
passphrase: string
Expand Down
2 changes: 1 addition & 1 deletion YCAI/src/components/common/StatsCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Card, CardContent, Typography } from '@material-ui/core';
import * as NumberUtils from '@shared/utils/number.utils';
import * as NumberUtils from '@trex/shared/utils/number.utils';
import * as React from 'react';
import { makeStyles, useTheme } from '../../theme';

Expand Down
2 changes: 1 addition & 1 deletion YCAI/src/components/common/YTVideo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { WithQueries } from 'avenger/lib/react';
import React from 'react';
import { oneCreatorVideo } from '../../state/dashboard/creator.queries';
import { getYTVideoURLById, getYTEmbeddingURLById } from '../../utils/yt.utils';
import { ErrorBox } from '@shared/components/Error/ErrorBox';
import { ErrorBox } from '@trex/shared/components/Error/ErrorBox';
import { LazyFullSizeLoader } from './FullSizeLoader';

interface YTVideoProps {
Expand Down
2 changes: 1 addition & 1 deletion YCAI/src/components/dashboard/AuthBox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { auth, localProfile } from '../../state/dashboard/creator.queries';
import * as QR from 'avenger/lib/QueryResult';
import { WithQueries } from 'avenger/lib/react';
import { ErrorBox } from '@shared/components/Error/ErrorBox';
import { ErrorBox } from '@trex/shared/components/Error/ErrorBox';
import { LazyFullSizeLoader } from '../../components/common/FullSizeLoader';
import React from 'react';
import { LinkAccount } from './LinkAccount';
Expand Down
6 changes: 3 additions & 3 deletions YCAI/src/components/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ import {
currentView,
doUpdateCurrentView,
} from '../../utils/location.utils';
import { ErrorBox } from '@shared/components/Error/ErrorBox';
import { ErrorBox } from '@trex/shared/components/Error/ErrorBox';
import { LazyFullSizeLoader } from '../common/FullSizeLoader';
import Settings from './Settings';
import { AnalyticsPage } from './community/AnalyticsPage';
import { LinkAccount } from './LinkAccount';
import { Sidebar } from './Sidebar';
import { Lab } from './lab/Lab';
import { LabVideoEdit } from './lab/LabVideoEdit';
import { ContentCreator } from '@shared/models/ContentCreator';
import { AuthResponse } from '@shared/models/Auth';
import { ContentCreator } from '@trex/shared/models/ContentCreator';
import { AuthResponse } from '@trex/shared/models/Auth';

const useStyles = makeStyles((theme) => ({
root: {
Expand Down
2 changes: 1 addition & 1 deletion YCAI/src/components/dashboard/LinkAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import useCopyClipboard from 'react-use-clipboard';
import { isLeft } from 'fp-ts/lib/Either';
import { Trans, useTranslation } from 'react-i18next';

import { AuthResponse } from '@shared/models/Auth';
import { AuthResponse } from '@trex/shared/models/Auth';
import {
registerCreatorChannel,
updateAuth,
Expand Down
2 changes: 1 addition & 1 deletion YCAI/src/components/dashboard/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { pipe } from 'fp-ts/lib/function';
import React from 'react';
import { localProfile } from '../../state/dashboard/creator.queries';
import { keypair, settings } from '../../state/dashboard/public.queries';
import { ErrorBox } from '@shared/components/Error/ErrorBox';
import { ErrorBox } from '@trex/shared/components/Error/ErrorBox';
import { LazyFullSizeLoader } from '../common/FullSizeLoader';
import { AccessTokenBox } from './settings/AccessTokenBox';
import { KeypairBox } from './settings/KeypairBox';
Expand Down
17 changes: 10 additions & 7 deletions YCAI/src/components/dashboard/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@material-ui/core';
import { useTranslation } from 'react-i18next';

import { ContentCreator } from '@shared/models/ContentCreator';
import { ContentCreator } from '@trex/shared/models/ContentCreator';
import { CurrentView, doUpdateCurrentView } from '../../utils/location.utils';
import { UserProfileBox } from './UserProfileBox';
import LabIcon from '../common/icons/LabIcon';
Expand Down Expand Up @@ -69,9 +69,11 @@ const toMenuItem = (
return (
<ListItem
key={d.views[0]}
className={
`${d.views.includes(currentView.view) ? d.selectedClassName : d.notSelectedClassName} ${d.className}`
}
className={`${
d.views.includes(currentView.view)
? d.selectedClassName
: d.notSelectedClassName
} ${d.className}`}
button={true}
onClick={doUpdateCurrentView({ view: d.views[0] as any })}
>
Expand All @@ -86,8 +88,9 @@ const toMenuItem = (
style={{
lineHeight: 1,
margin: 0,
textTransform: 'uppercase'
}}>
textTransform: 'uppercase',
}}
>
{d.title}
</Typography>
</ListItem>
Expand Down Expand Up @@ -126,7 +129,7 @@ export const Sidebar: React.FC<SidebarProps> = ({ currentView, profile }) => {
<>
<UserProfileBox />

<Divider light className={classes.divider}/>
<Divider light className={classes.divider} />

<List className={classes.routesList} disablePadding={true}>
{[
Expand Down
6 changes: 3 additions & 3 deletions YCAI/src/components/dashboard/UserProfileBox.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Box, makeStyles, Typography } from '@material-ui/core';
import { ContentCreator } from '@shared/models/ContentCreator';
import { ContentCreator } from '@trex/shared/models/ContentCreator';
import * as QR from 'avenger/lib/QueryResult';
import { declareQueries } from 'avenger/lib/react';
import { sequenceS } from 'fp-ts/lib/Apply';
import { pipe } from 'fp-ts/lib/function';
import * as TE from 'fp-ts/lib/TaskEither';
import { toAppError } from '@shared/errors/AppError';
import { toAppError } from '@trex/shared/errors/AppError';
import React from 'react';
import {
updateAuth,
updateProfile,
} from '../../state/dashboard/creator.commands';
import { localProfile } from '../../state/dashboard/creator.queries';
import { doUpdateCurrentView } from '../../utils/location.utils';
import { ErrorBox } from '@shared/components/Error/ErrorBox';
import { ErrorBox } from '@trex/shared/components/Error/ErrorBox';
import { LazyFullSizeLoader } from '../common/FullSizeLoader';
import UnlinkProfileButton from '../common/UnlinkProfileButton';
import Avatar from '../external/Avatar';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { creatorADVStats } from '../../../state/dashboard/creator.queries';
import { makeStyles } from '../../../theme';
import { ErrorBox } from '@shared/components/Error/ErrorBox';
import { ErrorBox } from '@trex/shared/components/Error/ErrorBox';
import { LazyFullSizeLoader } from '../../common/FullSizeLoader';
import TreeMapGraph from '../../common/graphs/TreeMapGraph';

Expand Down
19 changes: 7 additions & 12 deletions YCAI/src/components/dashboard/community/AnalyticsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Card, CardContent, CardHeader, useTheme } from '@material-ui/core';
import Grid from '@material-ui/core/Grid';
import { ErrorBox } from '@shared/components/Error/ErrorBox';
import { ContentCreator } from '@shared/models/ContentCreator';
import { Taboule } from '@taboule/components/Taboule';
import { ErrorBox } from '@trex/shared/components/Error/ErrorBox';
import { ContentCreator } from '@trex/shared/models/ContentCreator';
import { Taboule } from '@trex/taboule/components/Taboule';
import * as QR from 'avenger/lib/QueryResult';
import { declareQueries, WithQueries } from 'avenger/lib/react';
import { pipe } from 'fp-ts/lib/function';
Expand Down Expand Up @@ -70,7 +70,7 @@ const CreatorAnalyticsPage: React.FC<CreatorAnalyticsPageProps> = ({
const theme = useTheme();
const { t } = useTranslation();

const amount = 20;
const amount = 25;
return (
<Grid item md={12}>
{profile === undefined ? (
Expand All @@ -80,11 +80,6 @@ const CreatorAnalyticsPage: React.FC<CreatorAnalyticsPageProps> = ({
queries={{ stats: ccRelatedUsers }}
params={{ stats: { params: { amount, skip: 0 } } }}
render={QR.fold(LazyFullSizeLoader, ErrorBox, ({ stats }) => {
const recommendationsAnalyzed = stats.content.reduce(
(acc, c) => acc + c.recommendedChannelCount,
0
);

return (
<Grid container spacing={2}>
<Grid item md={3} sm={6}>
Expand All @@ -100,13 +95,13 @@ const CreatorAnalyticsPage: React.FC<CreatorAnalyticsPageProps> = ({
<Grid item sm={12}>
<StatsCard
header={t('analytics:total_recommendations')}
count={recommendationsAnalyzed}
count={stats.totalRecommendations}
/>
</Grid>
<Grid item sm={12}>
<StatsCard
header={t('analytics:total_metadata')}
count={stats.totalRecommendations}
header={t('analytics:total_contributions')}
count={stats.totalContributions}
color={theme.palette.primary.main}
/>
</Grid>
Expand Down
Loading