fix: invalidate frame on shell switch

This commit is contained in:
TrèsAbhi committed 2024-08-21 20:04:27 -05:00
1 parent e6b29a4ab8
commit 679bd2956b
2 files changed
+7 -1

No files matched your search

@@ -17,6 +17,7 @@ import {
Tabs,
Text,
} from '@radix-ui/themes';
import { invalidate } from '@react-three/fiber';
import { useEffect, useState } from 'react';
import { ModuleButton } from '../../../../../../../components/ModuleButtons/ModuleButton';
import { SmallTankIcon } from '../../../../../../../components/SmallTankIcon';
@@ -216,6 +217,7 @@ export function Options({ thicknessRange }: OptionsProps) {
marginTop: shellIndex === 0 ? 0 : -1,
}}
onClick={() => {
invalidate();
mutateDuel((draft) => {
draft.antagonist.shell = thisShell;
});