Skip to content

Commit b97d387

Browse files
committed
feat: Formulas page
1 parent c5cfb60 commit b97d387

File tree

14 files changed

+2028
-193
lines changed

14 files changed

+2028
-193
lines changed

components/account/Worlds/World5/Gaming/General.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import Mutations from './Mutations';
88
import LogBook from '@components/account/Worlds/World5/Gaming/LogBook';
99
import Superbits from '@components/account/Worlds/World5/Gaming/Superbits';
1010
import { PAGES } from '@components/constants';
11+
import { getBitsMulti } from '@parsers/gaming';
12+
import { CardWithBreakdown } from '@components/account/Worlds/World5/Hole/commons';
1113

12-
const General = ({ account, lastUpdated }) => {
14+
const General = ({ account, characters, lastUpdated }) => {
1315
const {
1416
bits,
1517
availableSprouts,
@@ -22,10 +24,12 @@ const General = ({ account, lastUpdated }) => {
2224
logBook
2325
} = account?.gaming;
2426
const ownedLogBooks = logBook?.reduce((sum, { unlocked }) => sum + (unlocked ? 1 : 0), 0);
27+
const bitMulti = getBitsMulti(account, characters);
2528

2629
return <>
2730
<Stack direction={'row'} gap={2} flexWrap={'wrap'}>
2831
<CardTitleAndValue title={'Bits'} value={notateNumber(bits, 'bits')} icon={`etc/Bits_${getBitIndex(bits)}.png`}/>
32+
<CardWithBreakdown title={'Bit Multi'} value={`${notateNumber(bitMulti?.value)}x`} breakdown={bitMulti?.breakdown} notation={'MultiplierInfo'}/>
2933
<CardTitleAndValue title={'Sprouts'} value={`${availableSprouts} / ${sproutsCapacity ?? 0}`}
3034
icon={'etc/Sprouts.png'}/>
3135
<CardTitleAndValue title={'Best Nugget'} icon={'etc/GamingNugget.png'}

components/common/Highlighter.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
2+
import atomDark from 'react-syntax-highlighter/dist/esm/styles/prism/atom-dark';
3+
import React from 'react';
4+
5+
const Highlighter = ({ children }) => {
6+
return <SyntaxHighlighter language="javascript" style={atomDark} wrapLines>
7+
{children}
8+
</SyntaxHighlighter>
9+
};
10+
11+
export default Highlighter;

components/constants.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ export const PAGES = {
213213
'samplingCompanion': {
214214
icon: 'data/EquipmentHats69'
215215
},
216+
'formulas': {
217+
icon: 'data/EquipmentStatues29'
218+
},
216219
'activeExpCalculator': {
217220
icon: 'data/StatusExp'
218221
},

0 commit comments

Comments
 (0)