Skip to content

Commit

Permalink
chore: prepend new added rules
Browse files Browse the repository at this point in the history
  • Loading branch information
MystiPanda committed Jul 24, 2024
1 parent 88d9851 commit 624eb2a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/profile/groups-editor-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ export const GroupsEditorViewer = (props: Props) => {
throw new Error(t("Group Name Already Exists"));
}
}
setPrependSeq([...prependSeq, formIns.getValues()]);
setPrependSeq([formIns.getValues(), ...prependSeq]);
} catch (err: any) {
Notice.error(err.message || err.toString());
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/profile/proxies-editor-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export const ProxiesEditorViewer = (props: Props) => {
startIcon={<VerticalAlignTopRounded />}
onClick={() => {
let proxies = handleParse();
setPrependSeq([...prependSeq, ...proxies]);
setPrependSeq([...proxies, ...prependSeq]);
}}
>
{t("Prepend Proxy")}
Expand Down
2 changes: 1 addition & 1 deletion src/components/profile/rules-editor-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ export const RulesEditorViewer = (props: Props) => {
try {
let raw = validateRule();
if (prependSeq.includes(raw)) return;
setPrependSeq([...prependSeq, raw]);
setPrependSeq([raw, ...prependSeq]);
} catch (err: any) {
Notice.error(err.message || err.toString());
}
Expand Down

0 comments on commit 624eb2a

Please sign in to comment.