Skip to content

Commit

Permalink
Merge pull request #1008 from Dygmalab/fixEffectUpdate
Browse files Browse the repository at this point in the history
fix: solved effect update conditions
  • Loading branch information
alexpargon authored Feb 13, 2025
2 parents a838986 + f0f59b3 commit d9b61ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from "react";
import Styled from "styled-components";

const Styles = Styled.div`
margin: 0 24px 0 0;
margin: 0 0 0 24px;
border: 1px solid ${({ theme }) => theme.styles.memoryUsage.borderColor};
border-radius: 4px;
padding: 6px 12px;
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/components/organisms/Select/MacroSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import { i18n } from "@Renderer/i18n";

import NameModal from "@Renderer/components/molecules/CustomModal/ModalName";
Expand Down Expand Up @@ -77,7 +77,7 @@ const MacroSelector: React.FC<MacroSelectorProps> = ({
const toggleShowAdd = () => setShowAdd(!showAdd);
const [macroLength, setMacroLength] = useState(0);

useState(() => {
useEffect(() => {
if (
!Array.isArray(itemList) ||
selectedItem < 0 ||
Expand All @@ -90,7 +90,7 @@ const MacroSelector: React.FC<MacroSelectorProps> = ({
} else {
setMacroLength(itemList[selectedItem].actions.length);
}
});
}, [itemList, selectedItem]);

const handleSave = (data: string) => {
toggleShow();
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/modules/Macros/MacrosMemoryUsage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import ToastMessage from "@Renderer/components/atoms/ToastMessage";
import DotsProgressBar from "./DotsProgressBar";

const Styles = Styled.div`
margin: 0 24px 0 0;
margin: 0 0 0 24px;
border: 1px solid ${({ theme }) => theme.styles.memoryUsage.borderColor};
border-radius: 4px;
padding: 6px 12px;
Expand Down

0 comments on commit d9b61ad

Please sign in to comment.