mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 10:31:35 +00:00
host fixed
This commit is contained in:
parent
1cbab240ca
commit
0cf88efb6c
@ -10,8 +10,6 @@ import Notifications from '../components/Notifications';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { GarageContext, type UseGarageStoreType } from '../contexts/GarageContext';
|
import { GarageContext, type UseGarageStoreType } from '../contexts/GarageContext';
|
||||||
|
|
||||||
//const Router = window.NativeRobosats === undefined ? BrowserRouter : MemoryRouter;
|
|
||||||
|
|
||||||
const Router = (window.NativeRobosats === undefined && window.DesktopRobosats === undefined)? BrowserRouter : window.DesktopRobosats === 'Desktop-App' ? HashRouter : MemoryRouter;
|
const Router = (window.NativeRobosats === undefined && window.DesktopRobosats === undefined)? BrowserRouter : window.DesktopRobosats === 'Desktop-App' ? HashRouter : MemoryRouter;
|
||||||
|
|
||||||
const TestnetTypography = styled(Typography)({
|
const TestnetTypography = styled(Typography)({
|
||||||
|
@ -73,7 +73,7 @@ const RobotAvatar: React.FC<Props> = ({
|
|||||||
if (shortAlias !== undefined) {
|
if (shortAlias !== undefined) {
|
||||||
if (window.NativeRobosats === undefined) {
|
if (window.NativeRobosats === undefined) {
|
||||||
setAvatarSrc(
|
setAvatarSrc(
|
||||||
`${hostUrl.substring(hostUrl.indexOf("http://")+7)}/static/federation/avatars/${shortAlias}${small ? '.small' : ''}.webp`,
|
`${hostUrl}/static/federation/avatars/${shortAlias}${small ? '.small' : ''}.webp`,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
setAvatarSrc(
|
setAvatarSrc(
|
||||||
|
@ -89,7 +89,7 @@ const getHostUrl = (network = 'mainnet'): string => {
|
|||||||
host = defaultFederation.exp[network]['onion'];
|
host = defaultFederation.exp[network]['onion'];
|
||||||
protocol = 'http:';
|
protocol = 'http:';
|
||||||
}
|
}
|
||||||
const hostUrl = `${protocol}//${host}`;
|
const hostUrl = `${host}`;
|
||||||
return hostUrl;
|
return hostUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||||
export const getWorldmapGeojson = async (apiClient, baseUrl) => {
|
export const getWorldmapGeojson = async (apiClient, baseUrl) => {
|
||||||
return apiClient.get(baseUrl.substring(baseUrl.indexOf("http://")+7), '/static/assets/geo/countries-coastline-10km.geo.json');
|
return apiClient.get(baseUrl, '/static/assets/geo/countries-coastline-10km.geo.json');
|
||||||
};
|
};
|
||||||
|
|
||||||
export default getWorldmapGeojson;
|
export default getWorldmapGeojson;
|
||||||
|
@ -21,7 +21,7 @@ export class Federation {
|
|||||||
// Do not add `Local Dev` unless it is running on localhost
|
// Do not add `Local Dev` unless it is running on localhost
|
||||||
return acc;
|
return acc;
|
||||||
} else {
|
} else {
|
||||||
acc[key] = new Coordinator(value, origin, settings, hostUrl.substring(hostUrl.indexOf("http://")+7));
|
acc[key] = new Coordinator(value, origin, settings, hostUrl);
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user