-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: revert form values after cancelling edits (#113)
* fix back, next, cancel, and sasve buttons to match Figma designs * fix: bug with resetting frequency value when editing * fix: revert form values to previous values * remove unnecessary lines * fix: yarn fix * fix: remove duplicated imports * fix api call Co-authored-by: Hanlin Cheng <h62cheng@uwaterloo.ca> Co-authored-by: Shehryar Suleman <shehryarsuleman@gmail.com>
- Loading branch information
1 parent
db0d7cd
commit 730d50b
Showing
9 changed files
with
95 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 7 additions & 6 deletions
13
frontend/src/components/pages/Scheduling/CancelEditsButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
import { Button, CloseButton, Flex } from "@chakra-ui/react"; | ||
import React from "react"; | ||
|
||
import { ButtonProps } from "./types"; | ||
|
||
export default function CancelButton({ go }: ButtonProps) { | ||
export default function CancelButton({ discardChanges }: ButtonProps) { | ||
return ( | ||
<Flex justify="flex-end" mt="2em"> | ||
<CloseButton | ||
onClick={() => go && go("confirm donation details")} | ||
variant="cancelNavigation" | ||
size="lg" | ||
/> | ||
<CloseButton | ||
onClick={discardChanges} | ||
variant="cancelNavigation" | ||
size="lg" | ||
/> | ||
</Flex> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters