diff --git a/.eslintrc.json b/.eslintrc.json index 55a41545..97926803 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -35,11 +35,17 @@ "brace-style": [ "error", "allman" ], "template-curly-spacing": [ "error", "always" ], "no-multi-spaces": [ "error" ], - "react/prop-types": [ "off" ], "jsx-quotes": [ "error" ], + "react/prop-types": [ "off" ], "react/jsx-curly-spacing": [ "error", { "when": "always", "children": true } ], "react/jsx-equals-spacing": [ "error" ], - "@typescript-eslint/object-curly-spacing": [ "error", "always", { "arraysInObjects": true, "objectsInObjects": false } ], + "react/jsx-newline": [ "error", { "prevent": true } ], + "@typescript-eslint/object-curly-spacing": [ "error", "always", + { + "arraysInObjects": true, + "objectsInObjects": false + } + ], "@typescript-eslint/ban-types": [ "error", { diff --git a/src/components/hc-center/HcCenterView.tsx b/src/components/hc-center/HcCenterView.tsx index 1a9b7d12..c680a01b 100644 --- a/src/components/hc-center/HcCenterView.tsx +++ b/src/components/hc-center/HcCenterView.tsx @@ -124,13 +124,9 @@ export const HcCenterView: FC<{}> = props =>
{ LocalizeText('hccenter.breakdown.paydayfactor.percent', [ 'percent' ], [ (kickbackData.kickbackPercentage * 100).toString() ]) }
{ LocalizeText('hccenter.breakdown.streakbonus', [ 'credits' ], [ kickbackData.creditRewardForStreakBonus.toString() ]) }

-
{ LocalizeText('hccenter.breakdown.total', [ 'credits', 'actual' ], [ getHcPaydayAmount(), - ((((kickbackData.kickbackPercentage * kickbackData.totalCreditsSpent) + kickbackData.creditRewardForStreakBonus) * 100) / 100).toString() ]) }
-
- { - CreateLinkEvent('habbopages/' + GetConfiguration('hc.center')['payday.habbopage']) - } }>{ - LocalizeText('hccenter.special.infolink') } +
{ LocalizeText('hccenter.breakdown.total', [ 'credits', 'actual' ], [ getHcPaydayAmount(), ((((kickbackData.kickbackPercentage * kickbackData.totalCreditsSpent) + kickbackData.creditRewardForStreakBonus) * 100) / 100).toString() ]) }
+
CreateLinkEvent('habbopages/' + GetConfiguration('hc.center')['payday.habbopage']) }> + { LocalizeText('hccenter.special.infolink') }
@@ -162,6 +158,7 @@ export const HcCenterView: FC<{}> = props => { GetConfiguration('hc.center')['payday.info'] && +

{ LocalizeText('hccenter.special.title') }

{ LocalizeText('hccenter.special.info') }
@@ -184,33 +181,27 @@ export const HcCenterView: FC<{}> = props =>
- - } + } - - } + } { GetConfiguration('hc.center')['gift.info'] &&

{ LocalizeText('hccenter.gift.title') }

0 ? LocalizeText('hccenter.unclaimedgifts', [ 'unclaimedgifts' ], [ unclaimedGifts.toString() ]) : LocalizeText('hccenter.gift.info') } }>
- -
- } + + } { GetConfiguration('hc.center')['benefits.info'] &&
{ LocalizeText('hccenter.general.title') }
- -
- } + +
} ); diff --git a/src/components/purse/PurseContext.tsx b/src/components/purse/PurseContext.tsx deleted file mode 100644 index 1999abdd..00000000 --- a/src/components/purse/PurseContext.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { createContext, FC, ProviderProps, useContext } from 'react'; -import { IPurse } from './common/IPurse'; - -interface IPurseContext -{ - purse: IPurse; -} - -const PurseContext = createContext({ - purse: null -}); - -export const PurseContextProvider: FC> = props => -{ - return { props.children } -} - -export const usePurseContext = () => useContext(PurseContext); diff --git a/src/components/purse/PurseView.tsx b/src/components/purse/PurseView.tsx index 667c5841..726cc842 100644 --- a/src/components/purse/PurseView.tsx +++ b/src/components/purse/PurseView.tsx @@ -3,7 +3,6 @@ import { FC, useCallback, useMemo } from 'react'; import { CreateLinkEvent, GetConfiguration, LocalizeText } from '../../api'; import { Column, Flex, Grid, LayoutCurrencyIcon, Text } from '../../common'; import { usePurse } from '../../hooks'; -import { PurseContextProvider } from './PurseContext'; import { CurrencyView } from './views/CurrencyView'; import { SeasonalView } from './views/SeasonalView'; @@ -62,31 +61,29 @@ export const PurseView: FC<{}> = props => if(!purse) return null; return ( - - - - - - - { getCurrencyElements(0, 2) } - - { !hcDisabled && - CreateLinkEvent('habboUI/open/hccenter') }> - - { getClubText } - } - - CreateLinkEvent('help/show') }> - - - CreateLinkEvent('user-settings/toggle') } > - - - - - - { getCurrencyElements(2, -1, true) } - - + + + + + + { getCurrencyElements(0, 2) } + + { !hcDisabled && + CreateLinkEvent('habboUI/open/hccenter') }> + + { getClubText } + } + + CreateLinkEvent('help/show') }> + + + CreateLinkEvent('user-settings/toggle') } > + + + + + + { getCurrencyElements(2, -1, true) } + ); }