Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixing asterisk for prime #124

Merged
merged 2 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions prime/src/pages/BorrowActionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,10 @@ export default function BorrowActionsPage() {

function updateActionResults(updatedActionResults: ActionCardState[]) {
setActionResults(updatedActionResults);
// If we have no actions results left, we are no longer showing hypothetical
if (updatedActionResults.length === 0) {
setIsShowingHypothetical(false);
}
}

function handleAddAction(action: Action) {
Expand Down Expand Up @@ -432,10 +436,10 @@ export default function BorrowActionsPage() {
setActionModalOpen(true);
}}
onRemoveAction={(index: number) => {
let actionResultsCopy = [...actionResults];
const actionResultsCopy = [...actionResults];
const updatedActionResults = actionResultsCopy.filter((_, i) => i !== index);
setActionResults(updatedActionResults);
let activeActionsCopy = [...activeActions];
updateActionResults(updatedActionResults);
const activeActionsCopy = [...activeActions];
setActiveActions(activeActionsCopy.filter((_, i) => i !== index));
}}
problematicActionIdx={problematicActionIdx}
Expand Down
4 changes: 2 additions & 2 deletions shared/src/components/common/Buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ export const LinkButton = styled.button`

export const WarningButton = styled.button`
border-radius: 0.375rem;
color: #FF7A00;
color: #ff7a00;
background-color: transparent;
font-weight: 500;
position: relative;
Expand Down Expand Up @@ -761,7 +761,7 @@ export const WarningButton = styled.button`
}

:disabled {
color: #6447B5;
color: #6447b5;
}
`;

Expand Down