diff --git a/src/features/Auth/Login/tests/Login.test.tsx b/src/features/Login/tests/Login.test.tsx
similarity index 100%
rename from src/features/Auth/Login/tests/Login.test.tsx
rename to src/features/Login/tests/Login.test.tsx
diff --git a/src/features/dashboard/components/Table/scopes.cell.module.scss b/src/features/dashboard/components/Table/scopes.cell.module.scss
deleted file mode 100644
index f894ac0e9..000000000
--- a/src/features/dashboard/components/Table/scopes.cell.module.scss
+++ /dev/null
@@ -1,16 +0,0 @@
-@use 'src/styles/utility' as *;
-
-.scope {
- display: inline-block;
- border: rem(0.1) solid var(--ifm-color-emphasis-400);
- border-radius: 4px;
- padding: rem(0.2) rem(0.8);
- font-size: rem(1.2);
- margin: rem(0.5);
- color: var(--ifm-color-emphasis-700);
-}
-
-.adminScope {
- border: rem(0.1) solid var(--admin-border);
- color: var(--admin-text);
-}
diff --git a/src/features/dashboard/components/Tabs/index.ts b/src/features/dashboard/components/Tabs/index.ts
new file mode 100644
index 000000000..96582c896
--- /dev/null
+++ b/src/features/dashboard/components/Tabs/index.ts
@@ -0,0 +1,3 @@
+import Tabs from './tabs';
+
+export default Tabs;
diff --git a/src/features/dashboard/components/Tabs/index.tsx b/src/features/dashboard/components/Tabs/tabs.tsx
similarity index 100%
rename from src/features/dashboard/components/Tabs/index.tsx
rename to src/features/dashboard/components/Tabs/tabs.tsx
diff --git a/src/features/dashboard/components/ApiTokenCard/__tests__/api-token.card.test.tsx b/src/features/dashboard/components/api-token-card/__tests__/api-token.card.test.tsx
similarity index 100%
rename from src/features/dashboard/components/ApiTokenCard/__tests__/api-token.card.test.tsx
rename to src/features/dashboard/components/api-token-card/__tests__/api-token.card.test.tsx
diff --git a/src/features/dashboard/components/ApiTokenCard/index.tsx b/src/features/dashboard/components/api-token-card/api-token-cards.tsx
similarity index 97%
rename from src/features/dashboard/components/ApiTokenCard/index.tsx
rename to src/features/dashboard/components/api-token-card/api-token-cards.tsx
index 808bc950b..c16a16ffc 100644
--- a/src/features/dashboard/components/ApiTokenCard/index.tsx
+++ b/src/features/dashboard/components/api-token-card/api-token-cards.tsx
@@ -5,7 +5,7 @@ import useDeviceType from '@site/src/hooks/useDeviceType';
import CustomCheckbox from '@site/src/components/CustomCheckbox';
import { Text, Heading, Modal, SectionMessage } from '@deriv-com/quill-ui';
import { StandaloneCircleExclamationRegularIcon } from '@deriv/quill-icons';
-import { TApiTokenForm, TApiTokenFormItemsNames } from '../ApiTokenForm/api-token.form';
+import { TApiTokenForm, TApiTokenFormItemsNames } from '../api-token-form/api-token.form';
import styles from './api-token.card.module.scss';
interface IApiTokenCardProps {
diff --git a/src/features/dashboard/components/ApiTokenCard/api-token.card.module.scss b/src/features/dashboard/components/api-token-card/api-token.card.module.scss
similarity index 100%
rename from src/features/dashboard/components/ApiTokenCard/api-token.card.module.scss
rename to src/features/dashboard/components/api-token-card/api-token.card.module.scss
diff --git a/src/features/dashboard/components/api-token-card/index.ts b/src/features/dashboard/components/api-token-card/index.ts
new file mode 100644
index 000000000..37351b576
--- /dev/null
+++ b/src/features/dashboard/components/api-token-card/index.ts
@@ -0,0 +1,3 @@
+import ApiTokenCard from './api-token-cards';
+
+export default ApiTokenCard;
diff --git a/src/features/dashboard/components/ApiTokenForm/__tests__/api-token.form.test.tsx b/src/features/dashboard/components/api-token-form/__tests__/api-token.form.test.tsx
similarity index 99%
rename from src/features/dashboard/components/ApiTokenForm/__tests__/api-token.form.test.tsx
rename to src/features/dashboard/components/api-token-form/__tests__/api-token.form.test.tsx
index 8d77d04e1..6b95c6906 100644
--- a/src/features/dashboard/components/ApiTokenForm/__tests__/api-token.form.test.tsx
+++ b/src/features/dashboard/components/api-token-form/__tests__/api-token.form.test.tsx
@@ -1,7 +1,7 @@
import React, { act } from 'react';
import { cleanup, render, screen, waitFor, within } from '@site/src/test-utils';
import userEvent from '@testing-library/user-event';
-import ApiTokenForm from '../api-token.form';
+import ApiTokenForm from '../api-token-form';
import useCreateToken from '../../../hooks/useCreateToken';
import useApiToken from '@site/src/hooks/useApiToken';
diff --git a/src/features/dashboard/components/ApiTokenForm/api-token.form.module.scss b/src/features/dashboard/components/api-token-form/api-token-form.module.scss
similarity index 100%
rename from src/features/dashboard/components/ApiTokenForm/api-token.form.module.scss
rename to src/features/dashboard/components/api-token-form/api-token-form.module.scss
diff --git a/src/features/dashboard/components/ApiTokenForm/api-token.form.tsx b/src/features/dashboard/components/api-token-form/api-token-form.tsx
similarity index 96%
rename from src/features/dashboard/components/ApiTokenForm/api-token.form.tsx
rename to src/features/dashboard/components/api-token-form/api-token-form.tsx
index f837d914e..a285cb764 100644
--- a/src/features/dashboard/components/ApiTokenForm/api-token.form.tsx
+++ b/src/features/dashboard/components/api-token-form/api-token-form.tsx
@@ -4,12 +4,12 @@ import { useForm } from 'react-hook-form';
import Spinner from '@site/src/components/Spinner';
import { yupResolver } from '@hookform/resolvers/yup';
import { scopesObjectToArray } from '@site/src/utils';
-import ApiTokenCard from '../ApiTokenCard';
+import ApiTokenCard from '../api-token-card';
import useCreateToken from '@site/src/features/dashboard/hooks/useCreateToken';
import * as yup from 'yup';
import styles from './api-token.form.module.scss';
-import TokenNameRestrictions from '../TokenNameRestrictions/TokenNameRestrictions';
-import CreateTokenField from './CreateTokenField';
+import TokenNameRestrictions from '../token-name-restrictions';
+import CreateTokenField from './create-token-field';
import useApiToken from '@site/src/hooks/useApiToken';
const schema = yup
diff --git a/src/features/dashboard/components/ApiTokenForm/CreateTokenField/index.tsx b/src/features/dashboard/components/api-token-form/create-token-field.tsx
similarity index 93%
rename from src/features/dashboard/components/ApiTokenForm/CreateTokenField/index.tsx
rename to src/features/dashboard/components/api-token-form/create-token-field.tsx
index 82bed91ae..e4266088a 100644
--- a/src/features/dashboard/components/ApiTokenForm/CreateTokenField/index.tsx
+++ b/src/features/dashboard/components/api-token-form/create-token-field.tsx
@@ -4,10 +4,10 @@ import useApiToken from '@site/src/hooks/useApiToken';
import useAppManager from '@site/src/hooks/useAppManager';
import { TDashboardTab } from '@site/src/contexts/app-manager/app-manager.context';
import { Text, Button, TextField } from '@deriv-com/quill-ui';
-import TokenCreationDialogSuccess from '../../Dialogs/TokenCreationDialogSuccess';
-import TokenNameRestrictions from '../../TokenNameRestrictions/TokenNameRestrictions';
-import CustomErrors from './CustomErrors';
-import styles from '../api-token.form.module.scss';
+import TokenCreationDialogSuccess from '../dialogs/token-creation-dialog-success';
+import TokenNameRestrictions from '../token-name-restrictions/token-name-restrictions';
+import CustomErrors from './custom-error';
+import styles from './api-token-form.module.scss';
type TCreateTokenField = {
register: UseFormRegisterReturn;
diff --git a/src/features/dashboard/components/ApiTokenForm/CreateTokenField/CustomErrors/index.tsx b/src/features/dashboard/components/api-token-form/custom-error.tsx
similarity index 100%
rename from src/features/dashboard/components/ApiTokenForm/CreateTokenField/CustomErrors/index.tsx
rename to src/features/dashboard/components/api-token-form/custom-error.tsx
diff --git a/src/features/dashboard/components/api-token-form/index.ts b/src/features/dashboard/components/api-token-form/index.ts
new file mode 100644
index 000000000..f190cc4fa
--- /dev/null
+++ b/src/features/dashboard/components/api-token-form/index.ts
@@ -0,0 +1,3 @@
+import ApiTokenForm from './api-token-form';
+
+export default ApiTokenForm;
diff --git a/src/features/dashboard/components/ApiTokenTable/__tests__/index.test.tsx b/src/features/dashboard/components/api-token-table/__tests__/api-token-table.test.tsx
similarity index 100%
rename from src/features/dashboard/components/ApiTokenTable/__tests__/index.test.tsx
rename to src/features/dashboard/components/api-token-table/__tests__/api-token-table.test.tsx
diff --git a/src/features/dashboard/components/ApiTokenTable/CopyButton/__tests__/CopyButton.test.tsx b/src/features/dashboard/components/api-token-table/__tests__/copy-button.test.tsx
similarity index 98%
rename from src/features/dashboard/components/ApiTokenTable/CopyButton/__tests__/CopyButton.test.tsx
rename to src/features/dashboard/components/api-token-table/__tests__/copy-button.test.tsx
index 56409815c..2c820d0b7 100644
--- a/src/features/dashboard/components/ApiTokenTable/CopyButton/__tests__/CopyButton.test.tsx
+++ b/src/features/dashboard/components/api-token-table/__tests__/copy-button.test.tsx
@@ -1,5 +1,5 @@
import React, { act } from 'react';
-import CopyButton from '..';
+import CopyButton from '../copy-button';
import userEvent from '@testing-library/user-event';
import { render, screen } from '@testing-library/react';
diff --git a/src/features/dashboard/components/ApiTokenTable/api-table.module.scss b/src/features/dashboard/components/api-token-table/api-table.module.scss
similarity index 86%
rename from src/features/dashboard/components/ApiTokenTable/api-table.module.scss
rename to src/features/dashboard/components/api-token-table/api-table.module.scss
index 31c4b3d8f..48d9aad94 100644
--- a/src/features/dashboard/components/ApiTokenTable/api-table.module.scss
+++ b/src/features/dashboard/components/api-token-table/api-table.module.scss
@@ -1,3 +1,5 @@
+@use 'src/styles/mixins' as *;
+
.flex-center {
display: flex;
flex-direction: column;
@@ -8,7 +10,7 @@
align-self: self-end;
position: relative;
- @media (max-width: 1023px) {
+ @include tablet-lg {
align-self: center;
}
@@ -23,7 +25,7 @@
border: 1px solid var(--opacity-black-100);
border-radius: 32px;
- @media screen and (max-width: 1023px) {
+ @include tablet-lg {
border: none;
margin: 0 1rem;
gap: 3rem;
@@ -33,9 +35,6 @@
z-index: 1;
table-layout: fixed;
border-collapse: collapse;
- display: flex;
- flex-direction: column;
- align-items: center;
margin-inline: 48px;
th,
@@ -93,7 +92,7 @@
padding: 48px 48px 25px;
gap: 16px;
- @media (max-width: 1023px) {
+ @include tablet-lg {
flex-direction: column;
align-items: center;
text-align: center;
@@ -105,7 +104,7 @@
}
&__button {
- @media screen and (max-width: 1023px) {
+ @include tablet-lg {
margin-top: 1rem;
}
@@ -117,7 +116,7 @@
&__text {
font-size: 16px;
- @media screen and (max-width: 786px) {
+ @include mobile {
padding: 0 1rem;
}
}
@@ -129,7 +128,7 @@
justify-content: space-between;
align-self: stretch;
- @media (max-width: 1023px) {
+ @include tablet-lg {
flex-direction: column;
align-items: center;
text-align: center;
@@ -137,8 +136,10 @@
}
&__texts {
- flex: 1;
- display: block;
+ gap: 1rem;
+ display: flex;
+ flex-direction: column;
+ max-width: 72%;
}
}
}
diff --git a/src/features/dashboard/components/ApiTokenTable/index.tsx b/src/features/dashboard/components/api-token-table/api-token-table.tsx
similarity index 87%
rename from src/features/dashboard/components/ApiTokenTable/index.tsx
rename to src/features/dashboard/components/api-token-table/api-token-table.tsx
index 188cc7460..e1db7a151 100644
--- a/src/features/dashboard/components/ApiTokenTable/index.tsx
+++ b/src/features/dashboard/components/api-token-table/api-token-table.tsx
@@ -1,4 +1,4 @@
-import React, { HTMLAttributes, useState, useEffect } from 'react';
+import React, { HTMLAttributes, useState } from 'react';
import { Column } from 'react-table';
import { Button, Heading, Text } from '@deriv-com/quill-ui';
import { LabelPairedCirclePlusMdRegularIcon } from '@deriv/quill-icons';
@@ -8,12 +8,12 @@ import Spinner from '@site/src/components/Spinner';
import useApiToken from '@site/src/hooks/useApiToken';
import useDeviceType from '@site/src/hooks/useDeviceType';
import AccountSwitcher from '@site/src/components/AccountSwitcher';
-import ScopesCell from '../Table/scopes.cell';
-import Table from '../Table';
-import ApiTokenCell from './table.token.cell';
-import ApiLastUsedCell from './table.lastused.cell';
-import TokenActionsCell from './delete.token.cell';
-import AccountTypeCell from './account.type.cell';
+import ScopesCell from '../common-table/cell-scopes';
+import Table from '../common-table';
+import ApiTokenCell from './cell-token';
+import ApiLastUsedCell from './cell-last-used';
+import TokenActionsCell from './cell-delete-token';
+import AccountTypeCell from './cell-account-type';
import ResponsiveTable from './responsive-table';
import useAppManager from '@site/src/hooks/useAppManager';
import styles from './api-table.module.scss';
@@ -24,32 +24,39 @@ const tableColumns: TTokenColumn[] = [
{
Header: 'Name',
accessor: 'display_name',
+ width: '25%',
+ minWidth: 200,
},
{
Header: 'Account Type',
Cell: AccountTypeCell,
+ width: '20%',
},
{
Header: 'Token',
accessor: 'token',
Cell: ApiTokenCell,
+ width: '15%',
},
{
Header: 'Token scopes',
accessor: 'scopes',
Cell: ScopesCell,
- minWidth: 300,
+ width: '25%',
+ maxWidth: 300,
},
{
Header: 'Last used',
accessor: 'last_used',
Cell: ApiLastUsedCell,
+ width: '15%',
},
{
Header: 'Actions',
id: 'actions',
accessor: (originalRow) => originalRow.token,
Cell: ({ row }) =>
,
+ width: '5%',
},
];
diff --git a/src/features/dashboard/components/ApiTokenTable/account.type.cell.tsx b/src/features/dashboard/components/api-token-table/cell-account-type.tsx
similarity index 100%
rename from src/features/dashboard/components/ApiTokenTable/account.type.cell.tsx
rename to src/features/dashboard/components/api-token-table/cell-account-type.tsx
diff --git a/src/features/dashboard/components/ApiTokenTable/delete.token.cell.tsx b/src/features/dashboard/components/api-token-table/cell-delete-token.tsx
similarity index 96%
rename from src/features/dashboard/components/ApiTokenTable/delete.token.cell.tsx
rename to src/features/dashboard/components/api-token-table/cell-delete-token.tsx
index 7779463d2..15f2ef674 100644
--- a/src/features/dashboard/components/ApiTokenTable/delete.token.cell.tsx
+++ b/src/features/dashboard/components/api-token-table/cell-delete-token.tsx
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
import { LabelPairedTrashMdRegularIcon } from '@deriv/quill-icons';
import CustomTooltip from '@site/src/components/CustomTooltip';
import useApiToken from '@site/src/hooks/useApiToken';
-import DeleteTokenDialog from './DeleteTokenDialog';
+import DeleteTokenDialog from './delete-token-dialog';
import styles from './cells.module.scss';
type TTokenActionsCellProps = {
diff --git a/src/features/dashboard/components/ApiTokenTable/table.lastused.cell.tsx b/src/features/dashboard/components/api-token-table/cell-last-used.tsx
similarity index 100%
rename from src/features/dashboard/components/ApiTokenTable/table.lastused.cell.tsx
rename to src/features/dashboard/components/api-token-table/cell-last-used.tsx
diff --git a/src/features/dashboard/components/ApiTokenTable/table.token.cell.tsx b/src/features/dashboard/components/api-token-table/cell-token.tsx
similarity index 100%
rename from src/features/dashboard/components/ApiTokenTable/table.token.cell.tsx
rename to src/features/dashboard/components/api-token-table/cell-token.tsx
diff --git a/src/features/dashboard/components/ApiTokenTable/cells.module.scss b/src/features/dashboard/components/api-token-table/cells.module.scss
similarity index 100%
rename from src/features/dashboard/components/ApiTokenTable/cells.module.scss
rename to src/features/dashboard/components/api-token-table/cells.module.scss
diff --git a/src/features/dashboard/components/ApiTokenTable/CopyButton/index.tsx b/src/features/dashboard/components/api-token-table/copy-button.tsx
similarity index 91%
rename from src/features/dashboard/components/ApiTokenTable/CopyButton/index.tsx
rename to src/features/dashboard/components/api-token-table/copy-button.tsx
index 6ab218ede..401872621 100644
--- a/src/features/dashboard/components/ApiTokenTable/CopyButton/index.tsx
+++ b/src/features/dashboard/components/api-token-table/copy-button.tsx
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
-import CopyTokenDialog from '../CopyTokenDialog';
-import styles from '../token-cell.module.scss';
+import CopyTokenDialog from './copy-token-dialog';
+import styles from './token-cell.module.scss';
type TCopyButton = {
value: string;
diff --git a/src/features/dashboard/components/ApiTokenTable/CopyTokenDialog/CopyTokenDialog.module.scss b/src/features/dashboard/components/api-token-table/copy-token-dialog/copy-token-dialog.module.scss
similarity index 100%
rename from src/features/dashboard/components/ApiTokenTable/CopyTokenDialog/CopyTokenDialog.module.scss
rename to src/features/dashboard/components/api-token-table/copy-token-dialog/copy-token-dialog.module.scss
diff --git a/src/features/dashboard/components/ApiTokenTable/CopyTokenDialog/index.tsx b/src/features/dashboard/components/api-token-table/copy-token-dialog/copy-token-dialog.tsx
similarity index 97%
rename from src/features/dashboard/components/ApiTokenTable/CopyTokenDialog/index.tsx
rename to src/features/dashboard/components/api-token-table/copy-token-dialog/copy-token-dialog.tsx
index 2b43ce0fa..7cdd49788 100644
--- a/src/features/dashboard/components/ApiTokenTable/CopyTokenDialog/index.tsx
+++ b/src/features/dashboard/components/api-token-table/copy-token-dialog/copy-token-dialog.tsx
@@ -1,7 +1,7 @@
import React, { useMemo, useCallback } from 'react';
import { Modal } from '@deriv/ui';
import { TModalActionButton } from '@deriv/ui/dist/types/src/components/core/modal/types';
-import styles from './CopyTokenDialog.module.scss';
+import styles from './copy-token-dialog.module.scss';
import Translate, { translate } from '@docusaurus/Translate';
type TCopyTokenDialog = {
diff --git a/src/features/dashboard/components/api-token-table/copy-token-dialog/index.ts b/src/features/dashboard/components/api-token-table/copy-token-dialog/index.ts
new file mode 100644
index 000000000..3ac0d954d
--- /dev/null
+++ b/src/features/dashboard/components/api-token-table/copy-token-dialog/index.ts
@@ -0,0 +1,3 @@
+import CopyTokenDialog from './copy-token-dialog';
+
+export default CopyTokenDialog;
diff --git a/src/features/dashboard/components/ApiTokenTable/DeleteTokenDialog/delete-token-dialog.scss b/src/features/dashboard/components/api-token-table/delete-token-dialog/delete-token-dialog.scss
similarity index 100%
rename from src/features/dashboard/components/ApiTokenTable/DeleteTokenDialog/delete-token-dialog.scss
rename to src/features/dashboard/components/api-token-table/delete-token-dialog/delete-token-dialog.scss
diff --git a/src/features/dashboard/components/ApiTokenTable/DeleteTokenDialog/index.tsx b/src/features/dashboard/components/api-token-table/delete-token-dialog/delete-token-dialog.tsx
similarity index 100%
rename from src/features/dashboard/components/ApiTokenTable/DeleteTokenDialog/index.tsx
rename to src/features/dashboard/components/api-token-table/delete-token-dialog/delete-token-dialog.tsx
diff --git a/src/features/dashboard/components/api-token-table/delete-token-dialog/index.ts b/src/features/dashboard/components/api-token-table/delete-token-dialog/index.ts
new file mode 100644
index 000000000..d99736747
--- /dev/null
+++ b/src/features/dashboard/components/api-token-table/delete-token-dialog/index.ts
@@ -0,0 +1,3 @@
+import DeleteTokenDialog from './delete-token-dialog';
+
+export default DeleteTokenDialog;
diff --git a/src/features/dashboard/components/api-token-table/index.ts b/src/features/dashboard/components/api-token-table/index.ts
new file mode 100644
index 000000000..29abc0435
--- /dev/null
+++ b/src/features/dashboard/components/api-token-table/index.ts
@@ -0,0 +1,3 @@
+import ApiTokenTable from './api-token-table';
+
+export default ApiTokenTable;
diff --git a/src/features/dashboard/components/ApiTokenTable/responsive-table.tsx b/src/features/dashboard/components/api-token-table/responsive-table.tsx
similarity index 87%
rename from src/features/dashboard/components/ApiTokenTable/responsive-table.tsx
rename to src/features/dashboard/components/api-token-table/responsive-table.tsx
index 60df046d4..e6e803621 100644
--- a/src/features/dashboard/components/ApiTokenTable/responsive-table.tsx
+++ b/src/features/dashboard/components/api-token-table/responsive-table.tsx
@@ -1,10 +1,10 @@
import React from 'react';
import CustomAccordion from '@site/src/components/CustomAccordion';
import { TTokenType } from '@site/src/types';
-import ScopesCell from '../Table/scopes.cell';
-import TokenActionsCell from './delete.token.cell';
-import AccountTypeCell from './account.type.cell';
-import ApiLastUsedCell from './table.lastused.cell';
+import TokenActionsCell from './cell-delete-token';
+import AccountTypeCell from './cell-account-type';
+import ApiLastUsedCell from './cell-last-used';
+import ScopesCell from '../common-table/cell-scopes';
type TResponsiveTableProps = {
tokens: TTokenType[];
diff --git a/src/features/dashboard/components/ApiTokenTable/token-cell.module.scss b/src/features/dashboard/components/api-token-table/token-cell.module.scss
similarity index 100%
rename from src/features/dashboard/components/ApiTokenTable/token-cell.module.scss
rename to src/features/dashboard/components/api-token-table/token-cell.module.scss
diff --git a/src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx b/src/features/dashboard/components/app-form/__tests__/app-form.test.tsx
similarity index 99%
rename from src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx
rename to src/features/dashboard/components/app-form/__tests__/app-form.test.tsx
index 764c831fb..550c94cc4 100644
--- a/src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx
+++ b/src/features/dashboard/components/app-form/__tests__/app-form.test.tsx
@@ -6,7 +6,7 @@ import React, { act } from 'react';
import AppForm from '..';
import { ApplicationObject } from '@deriv/api-types';
import useAppManager from '@site/src/hooks/useAppManager';
-import { app_name_error_map } from '../../AppRegister/types';
+import { app_name_error_map } from '../../app-register/types';
jest.mock('@site/src/hooks/useApiToken');
jest.mock('@site/src/utils', () => ({
diff --git a/src/features/dashboard/components/AppForm/app-form.module.scss b/src/features/dashboard/components/app-form/app-form.module.scss
similarity index 100%
rename from src/features/dashboard/components/AppForm/app-form.module.scss
rename to src/features/dashboard/components/app-form/app-form.module.scss
diff --git a/src/features/dashboard/components/AppForm/index.tsx b/src/features/dashboard/components/app-form/app-form.tsx
similarity index 99%
rename from src/features/dashboard/components/AppForm/index.tsx
rename to src/features/dashboard/components/app-form/app-form.tsx
index b2b88c899..d3c922463 100644
--- a/src/features/dashboard/components/AppForm/index.tsx
+++ b/src/features/dashboard/components/app-form/app-form.tsx
@@ -1,7 +1,6 @@
-import React, { Dispatch, ReactNode, SetStateAction, useEffect, useMemo, useState } from 'react';
+import React, { Dispatch, ReactNode, SetStateAction, useEffect, useState } from 'react';
import { Button, Text } from '@deriv/ui';
import { useForm } from 'react-hook-form';
-import { isNotDemoCurrency } from '@site/src/utils';
import { yupResolver } from '@hookform/resolvers/yup';
import { appRegisterSchema, appEditSchema, IRegisterAppForm } from '../../types';
import useApiToken from '@site/src/hooks/useApiToken';
@@ -16,7 +15,7 @@ import styles from './app-form.module.scss';
import clsx from 'clsx';
import useAppManager from '@site/src/hooks/useAppManager';
import useWS from '@site/src/hooks/useWs';
-import RestrictionsAppname from '../RestrictionsAppname';
+import RestrictionsAppname from '../restrictions-appname';
type TAppFormProps = {
initialValues?: Partial
;
diff --git a/src/features/dashboard/components/app-form/index.ts b/src/features/dashboard/components/app-form/index.ts
new file mode 100644
index 000000000..8e48024a8
--- /dev/null
+++ b/src/features/dashboard/components/app-form/index.ts
@@ -0,0 +1,3 @@
+import AppForm from './app-form';
+
+export default AppForm;
diff --git a/src/features/dashboard/components/Modals/AppRegisterSuccessModal/__tests__/app-register-success-modal.test.tsx b/src/features/dashboard/components/app-register-success-modal/__tests__/app-register-success-modal.test.tsx
similarity index 96%
rename from src/features/dashboard/components/Modals/AppRegisterSuccessModal/__tests__/app-register-success-modal.test.tsx
rename to src/features/dashboard/components/app-register-success-modal/__tests__/app-register-success-modal.test.tsx
index f313db4ee..d97dbdc48 100644
--- a/src/features/dashboard/components/Modals/AppRegisterSuccessModal/__tests__/app-register-success-modal.test.tsx
+++ b/src/features/dashboard/components/app-register-success-modal/__tests__/app-register-success-modal.test.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import { cleanup, render, screen } from '@site/src/test-utils';
-import { AppRegisterSuccessModal } from '..';
+import AppRegisterSuccessModal from '../app-register-success-modal';
import useAppManager from '@site/src/hooks/useAppManager';
import useDeviceType from '@site/src/hooks/useDeviceType';
import userEvent from '@testing-library/user-event';
diff --git a/src/features/dashboard/components/Modals/AppRegisterSuccessModal/index.tsx b/src/features/dashboard/components/app-register-success-modal/app-register-success-modal.tsx
similarity index 91%
rename from src/features/dashboard/components/Modals/AppRegisterSuccessModal/index.tsx
rename to src/features/dashboard/components/app-register-success-modal/app-register-success-modal.tsx
index ab3c720e0..450bc1cd6 100644
--- a/src/features/dashboard/components/Modals/AppRegisterSuccessModal/index.tsx
+++ b/src/features/dashboard/components/app-register-success-modal/app-register-success-modal.tsx
@@ -3,16 +3,16 @@ import useAppManager from '@site/src/hooks/useAppManager';
import { Heading, Modal, Text } from '@deriv-com/quill-ui';
import { StandaloneCircleCheckRegularIcon } from '@deriv/quill-icons';
import useDeviceType from '@site/src/hooks/useDeviceType';
-import '../../Dialogs/DeleteAppDialog/delete-app-dialog.scss';
-import useDisableScroll from '../../../hooks/useDisableScroll';
+import useDisableScroll from '../../hooks/useDisableScroll';
import Translate from '@docusaurus/Translate';
+import '../dialogs/delete-app-dialog/delete-app-dialog.scss';
interface IAppRegisterSuccessModalProps {
onConfigure: () => void;
onCancel: () => void;
}
-export const AppRegisterSuccessModal = ({
+const AppRegisterSuccessModal = ({
onConfigure,
onCancel,
}: IAppRegisterSuccessModalProps) => {
@@ -75,3 +75,5 @@ export const AppRegisterSuccessModal = ({
);
};
+
+export default AppRegisterSuccessModal;
diff --git a/src/features/dashboard/components/app-register-success-modal/index.ts b/src/features/dashboard/components/app-register-success-modal/index.ts
new file mode 100644
index 000000000..c53f3d3da
--- /dev/null
+++ b/src/features/dashboard/components/app-register-success-modal/index.ts
@@ -0,0 +1,3 @@
+import AppRegisterSuccessModal from './app-register-success-modal';
+
+export default AppRegisterSuccessModal;
diff --git a/src/features/dashboard/components/AppRegister/__tests__/app-register.test.tsx b/src/features/dashboard/components/app-register/__tests__/app-register.test.tsx
similarity index 100%
rename from src/features/dashboard/components/AppRegister/__tests__/app-register.test.tsx
rename to src/features/dashboard/components/app-register/__tests__/app-register.test.tsx
diff --git a/src/features/dashboard/components/AppRegister/app-register.scss b/src/features/dashboard/components/app-register/app-register.scss
similarity index 61%
rename from src/features/dashboard/components/AppRegister/app-register.scss
rename to src/features/dashboard/components/app-register/app-register.scss
index 3b5a41b9d..ce24456e7 100644
--- a/src/features/dashboard/components/AppRegister/app-register.scss
+++ b/src/features/dashboard/components/app-register/app-register.scss
@@ -1,9 +1,13 @@
-.app_register_container {
+@use 'src/styles/mixins' as *;
+
+.app-register-container {
margin-inline: 16px;
margin-top: 60px;
max-width: 608px;
- &_input {
- padding: 16px;
+ &__input {
+ padding-block: 12px;
+ padding-inline-end: 12px;
+ padding-inline-start: 4px;
width: 90%;
border: none;
@@ -16,18 +20,22 @@
justify-content: center;
}
- @media screen and (max-width: 992px) {
+ @include tablet {
margin-top: 48px;
}
&__fields {
display: flex;
align-items: center;
- border: 1px solid #00000014;
- padding-block: 5px;
- padding-inline-end: 12px;
+ border: 1px solid var(--opacity-black-100);
+ padding-block: 12px;
+ padding-inline: 12px;
border-radius: 8px;
+ @include mobile {
+ padding-block: 4px;
+ }
+
&.error-border {
border: 1px solid var(--colors-coral500);
}
@@ -38,13 +46,19 @@
}
&__restrictions {
- color: #0000007a;
+ color: var(--validation-text-light);
margin-top: 4px;
- margin-left: 16px;
font-size: 14px;
ul {
- list-style: disc;
line-height: 24px;
+ padding-left: 32px;
+ @include mobile {
+ line-height: 18px;
+ padding: 0 16px 0 32px;
+ li {
+ font-size: 12px;
+ }
+ }
}
}
@@ -54,8 +68,8 @@
font-weight: 400;
font-size: 16px;
position: relative;
- top: 0px;
- @media screen and (max-width: 992px) {
+ line-height: 24px;
+ @include tablet {
font-size: 14px;
top: -4px;
}
diff --git a/src/features/dashboard/components/AppRegister/index.tsx b/src/features/dashboard/components/app-register/app-register.tsx
similarity index 60%
rename from src/features/dashboard/components/AppRegister/index.tsx
rename to src/features/dashboard/components/app-register/app-register.tsx
index a74c7b4e1..35ae4e617 100644
--- a/src/features/dashboard/components/AppRegister/index.tsx
+++ b/src/features/dashboard/components/app-register/app-register.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Button } from '@deriv-com/quill-ui';
+import { Button, Text } from '@deriv-com/quill-ui';
import { useForm } from 'react-hook-form';
import { yupResolver } from '@hookform/resolvers/yup';
import './app-register.scss';
@@ -12,29 +12,33 @@ import {
app_name_error_map,
} from './types';
import CustomCheckbox from '@site/src/components/CustomCheckbox';
+import useDeviceType from '@site/src/hooks/useDeviceType';
const TermsAndConditions: React.FC = ({ register }) => {
return (
-
+
-
);
};
-export const RestrictionsComponent: React.FC
= ({ error }) => {
+
+export const Restrictions: React.FC = ({ error }) => {
return (
-
+
-
{app_name_error_map.error_code_1}
@@ -60,21 +64,24 @@ const AppRegister: React.FC = ({ submit }) => {
resolver: yupResolver(baseAppRegisterSchema),
});
const has_error = Object.entries(errors).length !== 0;
+ const { deviceType } = useDeviceType();
+ const is_desktop = deviceType === 'desktop';
+
return (
-