My Names
@@ -35,8 +36,8 @@ const AccountContent = () => {
{ text: "50", value: 50 },
{ text: "100", value: 100 },
]}
- sortBy={"sortBy"}
- orderBy={"orderBy"}
+ sortBy={SORT_BY.RESERVATION_TIMESTAMP}
+ orderBy={ORDER_BY.DESC}
onChangePage={(data) => {
console.log(data);
}}
diff --git a/ui/components/organisms/accountConent/constants.ts b/ui/components/organisms/accountConent/constants.ts
index e3521fa..08aa8c2 100644
--- a/ui/components/organisms/accountConent/constants.ts
+++ b/ui/components/organisms/accountConent/constants.ts
@@ -1,8 +1,8 @@
-import { SORT_BY } from "../../../comman/types";
+import { SORT_BY, TableConfig } from "../../../comman/types";
import { TableTemplates } from "../table/templates";
import iconMock from "./img/iconMock.svg";
-export const ScoringConfig = [
+export const ScoringConfig: TableConfig[] = [
{
colName: "names",
headerText: "Registered Names",
diff --git a/ui/components/organisms/accountConent/index.module.css b/ui/components/organisms/accountConent/index.module.css
index d47f133..5292730 100644
--- a/ui/components/organisms/accountConent/index.module.css
+++ b/ui/components/organisms/accountConent/index.module.css
@@ -2,8 +2,6 @@
display: flex;
flex-direction: column;
width: 100%;
- padding: 0 40px;
- margin-left: 265px;
}
.header {
diff --git a/ui/components/organisms/detailsNameTable/constants.ts b/ui/components/organisms/detailsNameTable/constants.ts
new file mode 100644
index 0000000..f5f975b
--- /dev/null
+++ b/ui/components/organisms/detailsNameTable/constants.ts
@@ -0,0 +1,38 @@
+import { SORT_BY, TableConfig } from "@/comman/types";
+import { TableTemplates } from "../table/templates";
+
+
+export const mockData = {
+ data: [
+ { record: "Email", value: 'Set' },
+ { record: "Discord",value: 'Set' },
+ { record: "Github", value: 'Set' },
+ { record: "Reddit", value: 'Set' },
+ { record: "X (Twitter)", value: 'Set' },
+ { record: "Telegram", value: 'Set'},
+ ],
+
+ };
+
+
+export const tableConfig: TableConfig[] = [
+ {
+ colName: "record",
+ headerText: "Record",
+ columnTemplate: TableTemplates.STRING,
+ fields: {
+ value: "record",
+ },
+ },
+ {
+ colName: "value",
+ columnTemplate: TableTemplates.STRING,
+ headerText: "Value",
+ fields: {
+ value: "value",
+ },
+ style: {
+ color: '#7191FC'
+ }
+ },
+];
diff --git a/ui/components/organisms/detailsNameTable/detailsNameTable.tsx b/ui/components/organisms/detailsNameTable/detailsNameTable.tsx
new file mode 100644
index 0000000..f925176
--- /dev/null
+++ b/ui/components/organisms/detailsNameTable/detailsNameTable.tsx
@@ -0,0 +1,23 @@
+import { TypeView } from "@/components/atoms/switchView/switchView";
+import { Table } from "../table";
+import { mockData, tableConfig } from "./constants";
+import { SubHeader } from "@/components/atoms/subHeader";
+
+import style from './index.module.css'
+
+const DetailsNameTable = () => {
+ return (
+
+ );
+};
+
+export default DetailsNameTable;
diff --git a/ui/components/organisms/detailsNameTable/index.module.css b/ui/components/organisms/detailsNameTable/index.module.css
new file mode 100644
index 0000000..146d441
--- /dev/null
+++ b/ui/components/organisms/detailsNameTable/index.module.css
@@ -0,0 +1,3 @@
+.subHeader {
+ margin-bottom: 13px;
+}
\ No newline at end of file
diff --git a/ui/components/organisms/table/table.tsx b/ui/components/organisms/table/table.tsx
index ef55f9e..dfaa0ec 100644
--- a/ui/components/organisms/table/table.tsx
+++ b/ui/components/organisms/table/table.tsx
@@ -1,15 +1,16 @@
import style from "./index.module.css";
-import { ORDER_BY } from "../../../comman/types";
+import { ORDER_BY, SORT_BY } from "../../../comman/types";
import { TableErrorMessage } from "../../atoms/tableErrorMessage";
import { Loader, LoaderVariant } from "../../atoms/loader";
import { TypeView } from "../../atoms/switchView/switchView";
import NameCards from "./view/nameCards";
import ListTableContent from "./view/listTableContent";
import Pagination from "../pagination/pagination";
+import { TableProps } from "./types";
const Table = ({
data,
- config: configs,
+ config,
isLoading,
currentPage,
pageLimit,
@@ -23,8 +24,9 @@ const Table = ({
onChangeSort,
onChangeOrder,
typeView,
-}) => {
- const handleSort = (sort?: string): void => {
+ isHiddenPagination,
+}: TableProps): JSX.Element => {
+ const handleSort = (sort?: SORT_BY): void => {
if (!sort) return;
if (sort === sortBy) {
return onChangeOrder(
@@ -37,6 +39,7 @@ const Table = ({
const showErrorMessage = !isLoading && (!data || data?.data?.length < 1);
const renderPagination = () => {
+ if (isHiddenPagination) return null;
return (
void;
- prefix?: string;
- postfix?: string;
- additionValue?: string;
- };
- };
+ config: TableConfig;
};
const StringTemplate = ({ data, config }: StringTemplateProps) => {
@@ -34,7 +25,7 @@ const StringTemplate = ({ data, config }: StringTemplateProps) => {
value === null;
return (
-
+
{isShowDash ? (
"-"
) : (
diff --git a/ui/components/organisms/table/types.ts b/ui/components/organisms/table/types.ts
new file mode 100644
index 0000000..704119f
--- /dev/null
+++ b/ui/components/organisms/table/types.ts
@@ -0,0 +1,21 @@
+import { LimitOptions, ORDER_BY, SORT_BY, TableConfig } from "@/comman/types";
+import { TypeView } from "@/components/atoms/switchView/switchView";
+
+export interface TableProps {
+ data: { data: any[] };
+ config: TableConfig[];
+ isLoading: boolean;
+ currentPage?: number;
+ pageLimit?: number;
+ totalElements?: number;
+ pagesCount?: number;
+ sortBy?: SORT_BY;
+ orderBy?: ORDER_BY;
+ onChangePage?: (value: string) => void;
+ limitOptions?: LimitOptions;
+ onChangeLimit?: (value: number) => void;
+ onChangeSort?: (value: SORT_BY) => void;
+ onChangeOrder?: (value: ORDER_BY) => void;
+ typeView: TypeView;
+ isHiddenPagination?: boolean;
+}
diff --git a/ui/components/organisms/table/view/listTableContent.tsx b/ui/components/organisms/table/view/listTableContent.tsx
index 4ad2afe..3673fa8 100644
--- a/ui/components/organisms/table/view/listTableContent.tsx
+++ b/ui/components/organisms/table/view/listTableContent.tsx
@@ -25,7 +25,7 @@ const ListTableContent = ({
showErrorMessage,
sortBy,
orderBy,
-}: ListTableContent): JSX.Element => {
+}: ListTableContent): JSX.Element => {
return (
@@ -39,7 +39,7 @@ const ListTableContent = ({
})}
>
{headerText}
- {sortBy === configSortBy && (
+ {configSortBy && sortBy === configSortBy && (