Skip to content

Commit 278cbe3

Browse files
committed
feedback
1 parent 69c6883 commit 278cbe3

File tree

9 files changed

+26
-11
lines changed

9 files changed

+26
-11
lines changed

src/pages/spot/Spot.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ const DUMMY_TOKENS: SpotMarketToken[] = [
129129
},
130130
];
131131

132+
// TODO: spot localization
133+
132134
const SpotPage = () => {
133135
const { symbol } = useParams<{ symbol: string }>();
134136

src/pages/spot/SpotFormInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export type SpotFormInputProps = {
7777
};
7878
} & InputProps;
7979

80+
// TODO: spot localization
81+
8082
export const SpotFormInput = forwardRef<HTMLInputElement, SpotFormInputProps>(
8183
(
8284
{

src/pages/spot/SpotHoldingsTable.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export enum SpotHoldingsTableColumnKey {
3838
Actions = 'Actions',
3939
}
4040

41+
// TODO: spot localization
42+
4143
const getColumnDef = ({
4244
key,
4345
width,

src/pages/spot/SpotHorizontalPanel.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ type SpotHorizontalPanelProps = {
1818
onSellAction?: SpotHoldingsTableProps['onSellAction'];
1919
};
2020

21+
// TODO: spot localization
22+
2123
export const SpotHorizontalPanel = ({
2224
data,
2325
isOpen = true,

src/pages/spot/SpotMarketStatsRow.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ type SpotMarketStatsRowProps = {
1111
stats: SpotMarketToken;
1212
};
1313

14+
// TODO: spot localization
15+
1416
export const SpotMarketStatsRow = ({ stats }: SpotMarketStatsRowProps) => {
1517
const items: DetailsItem[] = [
1618
{

src/pages/spot/SpotMarketsDropdown.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ type SpotMarketsDropdownProps = {
3131
className?: string;
3232
};
3333

34+
// TODO: spot localization
35+
3436
export const SpotMarketsDropdown = ({
3537
current,
3638
searchResults,

src/pages/spot/SpotTabs.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ const $Root = styled(Root)`
7979
const $List = styled(List)`
8080
display: flex;
8181
flex-direction: row;
82-
padding: 2px;
82+
padding: 0.125rem;
8383
background-color: var(--color-layer-1);
8484
border-radius: var(--tab-border-radius);
85-
gap: 2px;
85+
gap: 0.125rem;
8686
`;
8787

8888
const spotTabVariants: Record<SpotTabVariant, ReturnType<typeof css>> = {
@@ -125,8 +125,8 @@ const $Trigger = styled(Trigger)<{
125125
font-size: var(--fontSize-base);
126126
font-weight: 500;
127127
flex: 1;
128-
height: 37px;
129-
border-radius: calc(var(--tab-border-radius) - 2px);
128+
height: 2.25rem;
129+
border-radius: calc(var(--tab-border-radius) - 0.125rem);
130130
padding: 0 1rem;
131131
text-align: center;
132132
`;

src/pages/spot/SpotTokenInfo.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ type SpotTokenInfoProps = {
3131
className?: string;
3232
};
3333

34+
// TODO: spot localization
35+
3436
export const SpotTokenInfo = ({
3537
links,
3638
items,

src/pages/spot/SpotTradeForm.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import { useMemo, useRef, useState } from 'react';
33
import { SpotBuyInputType, SpotSellInputType, SpotSide } from '@/bonsai/forms/spot';
44

55
import { ButtonAction, ButtonState } from '@/constants/buttons';
6+
import { STRING_KEYS } from '@/constants/localization';
67

78
import { useSpotForm } from '@/hooks/useSpotForm';
9+
import { useStringGetter } from '@/hooks/useStringGetter';
810

911
import { Button } from '@/components/Button';
1012

@@ -13,13 +15,10 @@ import { SpotFormInput } from './SpotFormInput';
1315
import { SpotTabs, SpotTabVariant } from './SpotTabs';
1416

1517
export const SpotTradeForm = () => {
16-
// Use the spot form hook for Redux-managed state
18+
const stringGetter = useStringGetter();
1719
const form = useSpotForm();
1820

19-
// Local UI state (not in Redux)
2021
const [isSubmitting, setIsSubmitting] = useState(false);
21-
22-
// Quick options state
2322
const [quickOptionsState, setQuickOptionsState] = useState({
2423
[SpotSide.SELL]: {
2524
[SpotSellInputType.PERCENT]: ['10', '25', '50', '100'],
@@ -153,18 +152,20 @@ export const SpotTradeForm = () => {
153152
}}
154153
state={isSubmitting ? ButtonState.Loading : ButtonState.Default}
155154
>
156-
{form.state.side === SpotSide.BUY ? 'Buy' : 'Sell'}
155+
{form.state.side === SpotSide.BUY
156+
? stringGetter({ key: STRING_KEYS.BUY })
157+
: stringGetter({ key: STRING_KEYS.SELL })}
157158
</Button>
158159
</div>
159160
}
160161
items={[
161162
{
162-
label: 'Buy',
163+
label: stringGetter({ key: STRING_KEYS.BUY }),
163164
value: SpotSide.BUY,
164165
variant: SpotTabVariant.Buy,
165166
},
166167
{
167-
label: 'Sell',
168+
label: stringGetter({ key: STRING_KEYS.SELL }),
168169
value: SpotSide.SELL,
169170
variant: SpotTabVariant.Sell,
170171
},

0 commit comments

Comments
 (0)