Merged in chore/cleanup-after-trpc-migration (pull request #2457)
Chore/cleanup after trpc migration * Clean up TODOs * Rename REDEMPTION constant to SEARCH_TYPE_REDEMPTION * Update dependencies Remove unused deps from scandic-web Add missing deps to trpc package * Update self-referencing imports * Remove unused variables from scandic-web env * Fix missing graphql-tag package * Actually fix * Remove unused env var Approved-by: Christian Andolf Approved-by: Linus Flood
This commit is contained in:
@@ -6,7 +6,7 @@ import { useMediaQuery } from "usehooks-ts"
|
||||
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
import { REDEMPTION } from "@scandic-hotels/trpc/constants/booking"
|
||||
import { SEARCH_TYPE_REDEMPTION } from "@scandic-hotels/trpc/constants/booking"
|
||||
|
||||
import Modal from "@/components/Modal"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
@@ -65,11 +65,11 @@ export default function BookingCode() {
|
||||
shouldDirty: true,
|
||||
})
|
||||
|
||||
if (getValues(REDEMPTION)) {
|
||||
if (getValues(SEARCH_TYPE_REDEMPTION)) {
|
||||
// Remove the redemption as user types booking code and show notification for the same
|
||||
// Add delay to handle table mode rendering
|
||||
setTimeout(function () {
|
||||
setValue(REDEMPTION, false, {
|
||||
setValue(SEARCH_TYPE_REDEMPTION, false, {
|
||||
shouldValidate: true,
|
||||
shouldDirty: true,
|
||||
})
|
||||
@@ -321,7 +321,7 @@ export function RemoveExtraRooms({ ...props }: ButtonProps) {
|
||||
const rooms = getValues("rooms")[0]
|
||||
setValue("rooms", [rooms], { shouldValidate: true, shouldDirty: true })
|
||||
trigger("bookingCode.value")
|
||||
trigger(REDEMPTION)
|
||||
trigger(SEARCH_TYPE_REDEMPTION)
|
||||
}, 300)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user