mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-12 10:45:54 +00:00
fix(Map): Add Rally point. Change placement of settings in Map User Settings. Add ability to placement minimap.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { WithClassName } from '@/hooks/Mapper/types/common.ts';
|
||||
import { SystemViewStandalone } from '@/hooks/Mapper/components/ui-kit';
|
||||
import { SystemViewStandalone, SystemViewStandaloneProps } from '@/hooks/Mapper/components/ui-kit';
|
||||
import { useLoadSystemStatic } from '@/hooks/Mapper/mapRootProvider/hooks/useLoadSystemStatic.ts';
|
||||
import { useMemo } from 'react';
|
||||
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
|
||||
@@ -8,18 +7,11 @@ import { SolarSystemStaticInfoRaw } from '@/hooks/Mapper/types';
|
||||
export type SystemViewProps = {
|
||||
systemId: string;
|
||||
systemInfo?: SolarSystemStaticInfoRaw;
|
||||
hideRegion?: boolean;
|
||||
useSystemsCache?: boolean;
|
||||
showCustomName?: boolean;
|
||||
} & WithClassName;
|
||||
} & Pick<SystemViewStandaloneProps, 'className' | 'compact' | 'hideRegion'>;
|
||||
|
||||
export const SystemView = ({
|
||||
systemId,
|
||||
systemInfo: customSystemInfo,
|
||||
hideRegion,
|
||||
className,
|
||||
showCustomName,
|
||||
}: SystemViewProps) => {
|
||||
export const SystemView = ({ systemId, systemInfo: customSystemInfo, showCustomName, ...rest }: SystemViewProps) => {
|
||||
const memSystems = useMemo(() => [systemId], [systemId]);
|
||||
const { systems, loading } = useLoadSystemStatic({ systems: memSystems });
|
||||
|
||||
@@ -47,13 +39,8 @@ export const SystemView = ({
|
||||
}
|
||||
|
||||
if (!mapSystemInfo) {
|
||||
return <SystemViewStandalone hideRegion={hideRegion} className={className} {...systemInfo} />;
|
||||
return <SystemViewStandalone {...rest} {...systemInfo} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<SystemViewStandalone hideRegion={hideRegion} className={className} {...systemInfo} />
|
||||
<span>{systemInfo.solar_system_name}</span>
|
||||
</div>
|
||||
);
|
||||
return <SystemViewStandalone customName={mapSystemInfo.name ?? undefined} {...rest} {...systemInfo} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user