= {
+ id: Number(req.params.acctId),
+ user: {
+ id: Number(req.params.id),
+ },
+ };
+
+ if (await linkedAccountsRepository.exist({ where: condition })) {
+ await linkedAccountsRepository.delete(condition);
+ return res.status(204).send();
+ } else {
+ return res.status(404).send();
+ }
+ }
+);
+
userSettingsRoutes.get<{ id: string }, UserSettingsNotificationsResponse>(
'/notifications',
isOwnProfileOrAdmin(),
diff --git a/src/components/Common/Button/index.tsx b/src/components/Common/Button/index.tsx
index eb422f2248..753aedeb33 100644
--- a/src/components/Common/Button/index.tsx
+++ b/src/components/Common/Button/index.tsx
@@ -31,7 +31,7 @@ type BaseProps = {
) => void;
};
-type ButtonProps
= {
+export type ButtonProps
= {
as?: P;
} & MergeElementProps
>;
diff --git a/src/components/Common/LabeledCheckbox/index.tsx b/src/components/Common/LabeledCheckbox/index.tsx
index f37ccb41c9..3884d4aa39 100644
--- a/src/components/Common/LabeledCheckbox/index.tsx
+++ b/src/components/Common/LabeledCheckbox/index.tsx
@@ -1,31 +1,34 @@
import { Field } from 'formik';
+import { useId } from 'react';
import { twMerge } from 'tailwind-merge';
interface LabeledCheckboxProps {
- id: string;
+ name: string;
className?: string;
label: string;
description: string;
- onChange: () => void;
+ onChange?: () => void;
children?: React.ReactNode;
}
const LabeledCheckbox: React.FC = ({
- id,
+ name,
className,
label,
description,
onChange,
children,
}) => {
+ const id = useId();
+
return (
<>
-
+
-