Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: todo comments #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion src/components/layout/footer/NetworkStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const statusConfigs = () => ({
});

const NetworkStatus = () => {
// TODO complete the logic by adding the socket connctions status
const status = useNetworkStatus();
const { className, tooltip } = useMemo(() => statusConfigs()[status], [status]);

Expand Down
5 changes: 0 additions & 5 deletions src/components/layout/header/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ export const checkSwitcherType = async account_data => {
const is_eu = isEu(country);

const { country_code } = isMultiplier(landing_companies);
//TODO: check if this is needed
//is_multiplier
// const is_high_risk_or_eu = is_eu && is_high_risk;

const { financial_company, gaming_company } = landing_companies;

Expand All @@ -135,8 +132,6 @@ export const checkSwitcherType = async account_data => {
let is_high_risk = isHighRisk(financial_company, gaming_company, risk_classification);
const low_risk_no_account = is_low_risk && Object.keys(client_accounts).length === 1;
const high_risk_no_account = is_high_risk && Object.keys(client_accounts).length === 1;
//TODO: check if this is needed
// const is_high_risk_or_eu = is_eu && is_high_risk;

if (low_risk_no_account) is_low_risk = false;
if (high_risk_no_account) is_high_risk = false;
Expand Down
2 changes: 0 additions & 2 deletions src/components/shared/utils/currency/currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
minimumFractionDigits: minimumFractionDigits || decimal_places,
maximumFractionDigits: decimal_places,
};
// TODO: [use-shared-i18n] - Use a getLanguage function to determine number format.
money = new Intl.NumberFormat('en', options).format(money);
} else {
money = addComma(money, decimal_places);
Expand Down Expand Up @@ -142,9 +141,8 @@
};

export const CryptoConfig = (() => {
let crypto_config: any;

Check warning on line 144 in src/components/shared/utils/currency/currency.ts

View workflow job for this annotation

GitHub Actions / build_to_cloudflare_pages

Unexpected any. Specify a different type

// TODO: [use-shared-i18n] - Use translate function shared among apps or pass in translated names externally.
const initCryptoConfig = () =>
deepFreeze({
BTC: {
Expand Down
2 changes: 0 additions & 2 deletions src/components/shared_ui/autocomplete/autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,6 @@ const Autocomplete = React.memo((props: TAutocompleteProps) => {
width: input_wrapper_ref.current ? `${input_wrapper_ref.current.offsetWidth}px` : '100%',
...(style || {
marginTop: dropdown_offset ? `calc(-${dropdown_offset} + 8px)` : '8px', // 4px is the standard margin. In case of error, the list should overlap the error
// TODO confirm placement of dropdown list and positioning of error
// marginTop: form.errors[field.name] ? 'calc(4px - 18px)' : '4px', // 4px is the standard margin. In case of error, the list should overlap the error
}),
}}
is_visible={should_show_list || is_list_visible}
Expand Down
15 changes: 2 additions & 13 deletions src/components/shared_ui/drawer/drawer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import classNames from 'classnames';
import { LegacyHandleLessIcon } from '@deriv/quill-icons';
import { LabelPairedChevronsRightCaptionRegularIcon,LegacyHandleLessIcon } from '@deriv/quill-icons';
import { useDevice } from '@deriv-com/ui';

type TDrawer = {
Expand All @@ -15,17 +15,6 @@ type TDrawer = {
toggleDrawer?: (prop: boolean) => void;
};

// TODO: use-from-shared - Use this icon from icons' shared package
const IconDrawer = ({ className }: { className?: string }) => (
<svg className={className} xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'>
<path
fill='var(--text-less-prominent)'
fillRule='nonzero'
d='M8.87 2.164l5 5.5a.5.5 0 0 1 0 .672l-5 5.5a.5.5 0 0 1-.74-.672L12.824 8 8.13 2.836a.5.5 0 0 1 .74-.672zm-5 0l5 5.5a.5.5 0 0 1 0 .672l-5 5.5a.5.5 0 0 1-.74-.672L7.824 8 3.13 2.836a.5.5 0 1 1 .74-.672z'
/>
</svg>
);

const Drawer = ({
anchor = 'left',
children,
Expand Down Expand Up @@ -75,7 +64,7 @@ const Drawer = ({
onClick={toggleDrawer}
>
{isDesktop ? (
<IconDrawer
<LabelPairedChevronsRightCaptionRegularIcon
className={classNames('dc-drawer__toggle-icon', {
[`dc-drawer__toggle-icon--${anchor}`]: isDesktop,
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const ProgressSliderMobile = ({
<RemainingTime end_time={expiry_time} getCardLabels={getCardLabels} start_time={server_time} />
</Text>
{is_loading || percentage < 1 ? (
// TODO: Change this behavior in mobile
<div className='dc-progress-slider-mobile__infinite-loader'>
<div className='dc-progress-slider-mobile__infinite-loader--indeterminate' />
</div>
Expand Down
1 change: 0 additions & 1 deletion src/components/shared_ui/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import ThemedScrollbars from '../themed-scrollbars/themed-scrollbars';
import Tab from './tab';
import './tabs.scss';

// TODO: Remove this declaration after changing label to data-label in Tabs component
declare module 'react' {
interface HTMLAttributes<T> extends React.AriaAttributes, React.DOMAttributes<T> {
label?: React.ReactNode;
Expand Down
Loading