Skip to content

Commit

Permalink
move statement info panel to new UI kit #159
Browse files Browse the repository at this point in the history
  • Loading branch information
ukorvl committed Nov 20, 2023
1 parent e69be56 commit 078a2a5
Show file tree
Hide file tree
Showing 32 changed files with 211 additions and 215 deletions.
29 changes: 21 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@loadable/component": "^5.15.3",
"@nilfoundation/react-components": "^0.8.3",
"@nilfoundation/ui-kit": "^2.0.16",
"@nilfoundation/ui-kit": "^2.0.37",
"@reduxjs/toolkit": "^1.8.5",
"@sentry/react": "^7.21.1",
"@sentry/tracing": "^7.21.1",
Expand Down
6 changes: 0 additions & 6 deletions src/components/login/AuthCard/index.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/components/login/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @copyright Yury Korotovskikh <u.korotovskiy@nil.foundation>
*/

export * from './LoginForm';
export * from '../../features/auth/components/LoginForm';
export * from './AuthContainer';
export * from './RegisterForm';
export * from './ReadonlyAccessProvider';
export * from '../../features/auth/components/RegisterForm';
export * from '../../features/auth/components/ReadonlyAccessProvider';
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import { match } from 'ts-pattern';
import { ChartType, DateUnit } from '@/enums';
import { selectCurrentStatement, useAppSelector } from '@/redux';
import { useLocalStorage, useWindowHeight } from '@/hooks';
import { StatementInfoPanel } from '@/features/dashboard';
import type { ChartBaseProps } from '../../common';
import { DashboardCard, FullScreenView, ProofCostChart, ProofTimeGenChart } from '../../common';
import { ChartTypeSelect } from './ChartTypeSelect';
import { DataRangeSelect } from './DataRangeSelect';
import { DashboardToolbar } from './DashboardToolbar';
import { StatementInfoPanel } from '../StatementInfoPanel';
import { CopyToClipboardNavItem } from './CopyToClipboardNavItem';
import './StatementDashboard.scss';

Expand Down

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions src/components/market/StatementDetailedInfo/index.ts

This file was deleted.

This file was deleted.

57 changes: 0 additions & 57 deletions src/components/market/StatementInfoPanel/StatementInfoPanel.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions src/components/market/StatementInfoPanel/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/market/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
* @copyright Yury Korotovskikh <u.korotovskiy@nil.foundation>
*/

export * from './StatementDetailedInfo';
export * from './StatementDashboard';
export * from './OrderBook';
export * from './OrderManagementContextProvider';
export * from './CreateOrdersPanel';
export * from './ManageOrdersPanel';
export * from './StatementInfoPanel';
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { login } from '@/api';
import { useLogin } from '@/features/auth';
import type { LoginData } from '@/models';
import { getApiErrorMessage } from '@/utils';
import { AuthCard } from '../AuthCard';
import { AuthCard } from '../AuthCard/AuthCard';
import styles from './LoginForm.module.scss';

/**
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { SocialLinks } from '@/features/shared';
import type { RegisterData } from '@/models';
import { signUp, checkIsUsernameUnique } from '@/api';
import { getApiErrorMessage } from '@/utils';
import { AuthCard } from '../AuthCard';
import { AuthCard } from '../AuthCard/AuthCard';
import styles from './RegisterForm.module.scss';

const usernameRequiredMinLength = 3;
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/features/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ export { useLogout } from './hooks/useLogout';
export { useLogin } from './hooks/useLogin';

export * from './components/ProtectedContent/ProtectedContent';
export * from './components/ReadonlyAccessProvider/ReadonlyAccessProvider';
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* @file React component.
* @copyright Yury Korotovskikh <u.korotovskiy@nil.foundation>
*/

import { globalStyles } from '@/styles/globalStyles';

Check warning on line 6 in src/features/dashboard/components/StatementInfoPanel/StatementDetailedInfo.tsx

View workflow job for this annotation

GitHub Actions / build / Build

`@/styles/globalStyles` import should occur after import of `styletron-react`

Check warning on line 6 in src/features/dashboard/components/StatementInfoPanel/StatementDetailedInfo.tsx

View workflow job for this annotation

GitHub Actions / build / Build

`@/styles/globalStyles` import should occur after import of `styletron-react`

Check warning on line 6 in src/features/dashboard/components/StatementInfoPanel/StatementDetailedInfo.tsx

View workflow job for this annotation

GitHub Actions / build / Build

`@/styles/globalStyles` import should occur after import of `styletron-react`

Check warning on line 6 in src/features/dashboard/components/StatementInfoPanel/StatementDetailedInfo.tsx

View workflow job for this annotation

GitHub Actions / build / Build

`@/styles/globalStyles` import should occur after import of `styletron-react`
import type { ReactElement } from 'react';
import { useStyletron } from 'styletron-react';

type StatementDetailedInfoProps = {
description?: string;
url?: string;
};

/**
* Statement detailed info component.
*
* @param {StatementDetailedInfoProps} props Props.
* @returns React component.
*/
export const StatementDetailedInfo = ({
description,
url,
}: StatementDetailedInfoProps): ReactElement => {
const [css] = useStyletron();

return (
<div>
<div>
<span className={css(globalStyles.textMuted)}>Description:</span>
{description ? ` ${description}` : 'No description'}
</div>
{url && (
<div>
<span className={css(globalStyles.textMuted)}>Url:</span>{' '}
<a
href={url}
rel="noreferrer"
target="_blank"
>
{url}
</a>
</div>
)}
</div>
);
};
Loading

0 comments on commit 078a2a5

Please sign in to comment.