Skip to content

Commit

Permalink
Add typescript pick to specify which props to be included in FeeCompl…
Browse files Browse the repository at this point in the history
…aintForm
  • Loading branch information
jonasbrunvoll committed Sep 26, 2024
1 parent 1fb6336 commit 44d45b0
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type FeeComplaintFormProps = {
send: (event: typeof ticketControlFormEvents) => void;
};

type FirstAgreementProps = FeeComplaintFormProps;
type FirstAgreementProps = Pick<FeeComplaintFormProps, 'state' | 'send'>;

const FirstAgreement = ({ state, send }: FirstAgreementProps) => {
const { t } = useTranslation();
Expand Down Expand Up @@ -64,7 +64,7 @@ const FirstAgreement = ({ state, send }: FirstAgreementProps) => {
);
};

type SecondAgreementProps = FeeComplaintFormProps;
type SecondAgreementProps = Pick<FeeComplaintFormProps, 'state' | 'send'>;

const SecondAgreement = ({ state, send }: SecondAgreementProps) => {
const { t } = useTranslation();
Expand Down Expand Up @@ -104,8 +104,7 @@ const SecondAgreement = ({ state, send }: SecondAgreementProps) => {
);
};

type FormProps = FeeComplaintFormProps;

type FormProps = Pick<FeeComplaintFormProps, 'state' | 'send'>;
const FormContent = ({ state, send }: FormProps) => {
const { t } = useTranslation();
return (
Expand Down

0 comments on commit 44d45b0

Please sign in to comment.