diff --git a/src/components/default/Table/Table.tsx b/src/components/default/Table/Table.tsx index 312d584..4fa33dc 100644 --- a/src/components/default/Table/Table.tsx +++ b/src/components/default/Table/Table.tsx @@ -68,57 +68,59 @@ function Table(props: TableProps) { - {pagination && -
-
-

Pages:

-
- - -
- onNumberInput(e, setPage)} - /> -
- {pagesTotal &&

Pages total: {pagesTotal}

} -
-
-

Items on page:

- onNumberInput(e, setItemsOnPage, 50)} - /> -
- {!hidePaginationBlock && -
-

Go to block:

- onNumberInput(e, setGoToBlock)} - onEnterPress={goToBlockEnter} - /> -
- } -
-
- } - + ) + + function Pagination ({pagination}:{pagination:boolean | undefined}) { + if (!pagination) return null + return
+
+

Pages:

+
+ + +
+ onNumberInput(e, setPage)} + /> +
+ {pagesTotal &&

Pages total: {pagesTotal}

} +
+
+

Items on page:

+ onNumberInput(e, setItemsOnPage, 50)} + /> +
+ {!hidePaginationBlock && +
+

Go to block:

+ onNumberInput(e, setGoToBlock)} + onEnterPress={goToBlockEnter} + /> +
+ } +
+
+ } } export default Table; \ No newline at end of file diff --git a/src/pages/aliases/index.tsx b/src/pages/aliases/index.tsx index 4bc04e4..def1c23 100644 --- a/src/pages/aliases/index.tsx +++ b/src/pages/aliases/index.tsx @@ -66,12 +66,15 @@ function Aliases(props: AliasesPageProps) { hasMatrixConnection: e.hasMatrixConnection || false })) ); - }, [itemsOnPage, page, searchState, isPremiumOnly]); + }, [itemsOnPage, page, searchState, isPremiumOnly, isInMatrix]); const fetchMatrixAliases = useCallback(async () => { const result = await Fetch.getMatrixAddresses(page, itemsOnPage); if(!result.success || !(result.addresses instanceof Array)) return; - setAliases(result.addresses); + const aliases = result.addresses.map((e :any)=>{ + return {...e, hasMatrixConnection: true} + }) + setAliases(aliases); },[itemsOnPage, page]) useEffect(() => { @@ -121,23 +124,25 @@ function Aliases(props: AliasesPageProps) { - {hasMatrixConnection && } + {hasMatrixConnection && } :
<> {alias} - {hasMatrixConnection && } + {hasMatrixConnection && }
); } - function ConnectionIcon(){ + function ConnectionIcon({alias}:{alias: string}){ const [hovered, setHovered] = useState(false); + const link = `https://matrix.to/#/@${alias}:zano.org` return ( +
setHovered(true)} onMouseLeave={ ()=> setHovered(false)} > <> @@ -149,6 +154,7 @@ function Aliases(props: AliasesPageProps) {
} +
) } diff --git a/src/styles/Aliases.module.scss b/src/styles/Aliases.module.scss index 1d55a69..c7c392a 100644 --- a/src/styles/Aliases.module.scss +++ b/src/styles/Aliases.module.scss @@ -20,7 +20,7 @@ .connection_icon__tooltip__arrow { z-index: 1; position: absolute; - top:0px; + top: 0px; transform: rotate(45deg) translateY(-5px); height: 10px; width: 10px;