chore: add no unused vars lint rule

This commit is contained in:
Christian Andolf
2025-02-14 10:24:52 +01:00
parent 1116bdafa8
commit 06d861fb6f
54 changed files with 47 additions and 143 deletions

View File

@@ -7,10 +7,8 @@ import type { BookingWidgetSchema } from "@/types/components/bookingWidget"
export default function TabletCodeInput({
updateValue,
defaultValue,
}: {
updateValue: (val: string) => void
defaultValue?: string
}) {
const intl = useIntl()
const { register } = useFormContext<BookingWidgetSchema>()

View File

@@ -108,7 +108,7 @@ export default function BookingCode() {
<Checkbox
checked={!!bookingCode?.value}
{...register("bookingCode.flag", {
onChange: function (e) {
onChange: function () {
if (bookingCode?.value || isOpen) {
setValue("bookingCode.flag", true)
}
@@ -128,10 +128,7 @@ export default function BookingCode() {
<Dialog>
{({ close }) => (
<div className={styles.popover}>
<TabletCodeInput
updateValue={updateBookingCodeFormValue}
defaultValue={bookingCode?.value}
/>
<TabletCodeInput updateValue={updateBookingCodeFormValue} />
<div className={styles.bookingCodeRememberVisible}>
<CodeRemember
bookingCodeValue={bookingCode?.value}

View File

@@ -70,8 +70,6 @@ export function VoucherSkeleton() {
const intl = useIntl()
const vouchers = intl.formatMessage({ id: "Code / Voucher" })
const useVouchers = intl.formatMessage({ id: "Use code/voucher" })
const addVouchers = intl.formatMessage({ id: "Add code" })
const bonus = intl.formatMessage({ id: "Use Bonus Cheque" })
const reward = intl.formatMessage({ id: "Book Reward Night" })