-
+
+
+
{
const { renderSettingItem } = useMapSettings();
- const renderSettingsList = (list: SettingsListItem[]) => {
- return list.map(renderSettingItem);
- };
+ const renderSettingsList = useCallback(
+ (list: SettingsListItem[]) => {
+ return list.map(renderSettingItem);
+ },
+ [renderSettingItem],
+ );
- return {renderSettingsList(COMMON_CHECKBOXES_PROPS)}
;
+ return (
+
+
+
{renderSettingsList(UI_CHECKBOXES_PROPS)}
+
+
+
+
+
{renderSettingItem(MINI_MAP_PLACEMENT)}
+
{renderSettingItem(PINGS_PLACEMENT)}
+
{renderSettingItem(THEME_SETTING)}
+
+ );
};
diff --git a/assets/js/hooks/Mapper/components/mapRootContent/components/MapSettings/components/PrettySwitchbox/PrettySwitchbox.tsx b/assets/js/hooks/Mapper/components/mapRootContent/components/MapSettings/components/PrettySwitchbox/PrettySwitchbox.tsx
index 9edd4172..1f2eba20 100644
--- a/assets/js/hooks/Mapper/components/mapRootContent/components/MapSettings/components/PrettySwitchbox/PrettySwitchbox.tsx
+++ b/assets/js/hooks/Mapper/components/mapRootContent/components/MapSettings/components/PrettySwitchbox/PrettySwitchbox.tsx
@@ -10,9 +10,9 @@ interface PrettySwitchboxProps {
export const PrettySwitchbox = ({ checked, setChecked, label }: PrettySwitchboxProps) => {
return (
-
);
};
diff --git a/assets/js/hooks/Mapper/components/mapRootContent/components/RightBar/RightBar.tsx b/assets/js/hooks/Mapper/components/mapRootContent/components/RightBar/RightBar.tsx
index 1f51c9e9..221fba0a 100644
--- a/assets/js/hooks/Mapper/components/mapRootContent/components/RightBar/RightBar.tsx
+++ b/assets/js/hooks/Mapper/components/mapRootContent/components/RightBar/RightBar.tsx
@@ -1,6 +1,6 @@
import classes from './RightBar.module.scss';
import clsx from 'clsx';
-import { useCallback } from 'react';
+import { ReactNode, useCallback } from 'react';
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
import { WdTooltipWrapper } from '@/hooks/Mapper/components/ui-kit/WdTooltipWrapper';
import { TooltipPosition } from '@/hooks/Mapper/components/ui-kit';
@@ -12,24 +12,21 @@ interface RightBarProps {
onShowOnTheMap?: () => void;
onShowMapSettings?: () => void;
onShowTrackingDialog?: () => void;
+ additionalContent?: ReactNode;
}
-export const RightBar = ({ onShowOnTheMap, onShowMapSettings, onShowTrackingDialog }: RightBarProps) => {
+export const RightBar = ({
+ onShowOnTheMap,
+ onShowMapSettings,
+ onShowTrackingDialog,
+ additionalContent,
+}: RightBarProps) => {
const {
storedSettings: { interfaceSettings, setInterfaceSettings },
} = useMapRootState();
const canTrackCharacters = useMapCheckPermissions([UserPermission.TRACK_CHARACTER]);
- const isShowMinimap = interfaceSettings.isShowMinimap === undefined ? true : interfaceSettings.isShowMinimap;
-
- const toggleMinimap = useCallback(() => {
- setInterfaceSettings(x => ({
- ...x,
- isShowMinimap: !x.isShowMinimap,
- }));
- }, [setInterfaceSettings]);
-
const toggleKSpace = useCallback(() => {
setInterfaceSettings(x => ({
...x,
@@ -78,6 +75,7 @@ export const RightBar = ({ onShowOnTheMap, onShowMapSettings, onShowTrackingDial
>
)}
+ {additionalContent}
@@ -106,16 +104,6 @@ export const RightBar = ({ onShowOnTheMap, onShowMapSettings, onShowTrackingDial
-
-
-
-