diff --git a/src/app/routes/Dashboard.tsx b/src/app/routes/Dashboard.tsx
index 2e430c0..819297b 100644
--- a/src/app/routes/Dashboard.tsx
+++ b/src/app/routes/Dashboard.tsx
@@ -429,10 +429,11 @@ export const Dashboard: React.FC = () => {
}
};
- const handleSubclassRightClick = (subclass: SubclassConfig) => {
+ const handleSubclassOpen = (subclass: SubclassConfig) => {
setCustomizingSubclass(subclass);
setShowAbilitiesModification(true);
};
+
const subclassColor = useMemo(() => {
if (selectedSubclass) {
const damageTypeName = DAMAGE_TYPE[selectedSubclass.damageType].toLowerCase();
@@ -440,6 +441,7 @@ export const Dashboard: React.FC = () => {
}
return subclassColors.kinetic;
}, [selectedSubclass]);
+
return (
<>
{showAbilitiesModification && customizingSubclass ? (
@@ -481,7 +483,7 @@ export const Dashboard: React.FC = () => {
subclasses={subclasses}
selectedSubclass={selectedSubclass}
onSubclassSelect={handleSubclassSelect}
- onSubclassOpen={handleSubclassRightClick}
+ onSubclassOpen={handleSubclassOpen}
/>
diff --git a/src/features/subclass/components/SubclassSelector.tsx b/src/features/subclass/components/SubclassSelector.tsx
index 1c8d759..c4a7fb8 100644
--- a/src/features/subclass/components/SubclassSelector.tsx
+++ b/src/features/subclass/components/SubclassSelector.tsx
@@ -258,8 +258,11 @@ const SubclassSelector: React.FC = React.memo(
isSelected={isSelected}
isCenter={isCenter}
onClick={(event) => {
- handleSelect(subclass);
- if (subclass === selectedSubclass) handleOpenSubclass(event, subclass);
+ if (subclass === selectedSubclass) {
+ handleOpenSubclass(event, subclass);
+ } else {
+ handleSelect(subclass);
+ }
}}
style={{ gridArea: gridPositions[index] }}
onMouseEnter={() => setHoveredSubclass(subclass)}