mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-02-15 10:00:06 +00:00
move featured servers config from homeserver list
This commit is contained in:
parent
4fb8e83574
commit
200e531a3c
|
@ -26,7 +26,8 @@
|
|||
"#thisweekinmatrix:matrix.org",
|
||||
"#matrix-dev:matrix.org",
|
||||
"#matrix:matrix.org"
|
||||
]
|
||||
],
|
||||
"servers": ["envs.net", "matrix.org", "monero.social", "mozilla.org"]
|
||||
},
|
||||
|
||||
"hashRouter": {
|
||||
|
|
|
@ -9,6 +9,7 @@ export type ClientConfig = {
|
|||
openAsDefault?: boolean;
|
||||
spaces?: string[];
|
||||
rooms?: string[];
|
||||
servers?: string[];
|
||||
};
|
||||
|
||||
hashRouter?: {
|
||||
|
|
|
@ -30,7 +30,7 @@ import {
|
|||
NavLink,
|
||||
} from '../../../components/nav';
|
||||
import { getExploreFeaturedPath, getExploreServerPath } from '../../pathUtils';
|
||||
import { clientDefaultServer, useClientConfig } from '../../../hooks/useClientConfig';
|
||||
import { useClientConfig } from '../../../hooks/useClientConfig';
|
||||
import {
|
||||
useExploreFeaturedSelected,
|
||||
useExploreServer,
|
||||
|
@ -162,8 +162,8 @@ export function Explore() {
|
|||
const userId = mx.getUserId();
|
||||
const clientConfig = useClientConfig();
|
||||
const userServer = userId ? getMxIdServer(userId) : undefined;
|
||||
const clientServers = clientConfig.homeserverList ?? [clientDefaultServer(clientConfig)];
|
||||
const servers = clientServers.filter((server) => server !== userServer);
|
||||
const servers =
|
||||
clientConfig.featuredCommunities?.servers?.filter((server) => server !== userServer) ?? [];
|
||||
|
||||
const featuredSelected = useExploreFeaturedSelected();
|
||||
const selectedServer = useExploreServer();
|
||||
|
|
Loading…
Reference in a new issue