React 19 refactoring: Removed forwardRef references in all UI Components (#99)
* React 19 refactoring: Removed forwardRef references in all UI Components * Added Progress UI component from Shadcn * Updated dependencies * Formatted files * Fix Mobile Dropdowns
This commit is contained in:
committed by
GitHub
parent
970f901d05
commit
cec47cef78
@@ -3,8 +3,6 @@
|
||||
import { revalidatePath } from 'next/cache';
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { enhanceAction } from '@kit/next/actions';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { getSupabaseServerAdminClient } from '@kit/supabase/server-admin-client';
|
||||
@@ -13,8 +11,6 @@ import { getSupabaseServerClient } from '@kit/supabase/server-client';
|
||||
import { DeletePersonalAccountSchema } from '../schema/delete-personal-account.schema';
|
||||
import { createDeletePersonalAccountService } from './services/delete-personal-account.service';
|
||||
|
||||
const emailSettings = getEmailSettingsFromEnvironment();
|
||||
|
||||
const enableAccountDeletion =
|
||||
process.env.NEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_DELETION === 'true';
|
||||
|
||||
@@ -65,7 +61,6 @@ export const deletePersonalAccountAction = enhanceAction(
|
||||
adminClient: getSupabaseServerAdminClient(),
|
||||
userId: user.id,
|
||||
userEmail: user.email ?? null,
|
||||
emailSettings,
|
||||
});
|
||||
|
||||
logger.info(ctx, `Account request successfully sent`);
|
||||
@@ -78,23 +73,3 @@ export const deletePersonalAccountAction = enhanceAction(
|
||||
},
|
||||
{},
|
||||
);
|
||||
|
||||
function getEmailSettingsFromEnvironment() {
|
||||
return z
|
||||
.object({
|
||||
fromEmail: z
|
||||
.string({
|
||||
required_error: 'Provide the variable EMAIL_SENDER',
|
||||
})
|
||||
.email(),
|
||||
productName: z
|
||||
.string({
|
||||
required_error: 'Provide the variable NEXT_PUBLIC_PRODUCT_NAME',
|
||||
})
|
||||
.min(1),
|
||||
})
|
||||
.parse({
|
||||
fromEmail: process.env.EMAIL_SENDER,
|
||||
productName: process.env.NEXT_PUBLIC_PRODUCT_NAME,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -33,11 +33,6 @@ class DeletePersonalAccountService {
|
||||
|
||||
userId: string;
|
||||
userEmail: string | null;
|
||||
|
||||
emailSettings: {
|
||||
fromEmail: string;
|
||||
productName: string;
|
||||
};
|
||||
}) {
|
||||
const logger = await getLogger();
|
||||
|
||||
|
||||
@@ -20,9 +20,7 @@ import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import { useCaptchaToken } from '../captcha/client';
|
||||
|
||||
export function ResendAuthLinkForm(props: {
|
||||
redirectPath?: string;
|
||||
}) {
|
||||
export function ResendAuthLinkForm(props: { redirectPath?: string }) {
|
||||
const resendLink = useResendLink();
|
||||
|
||||
const form = useForm({
|
||||
|
||||
@@ -7,9 +7,9 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Database } from '@kit/supabase/database';
|
||||
import { Button } from '@kit/ui/button';
|
||||
import { Divider } from '@kit/ui/divider';
|
||||
import { If } from '@kit/ui/if';
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@kit/ui/popover';
|
||||
import { Separator } from '@kit/ui/separator';
|
||||
import { cn } from '@kit/ui/utils';
|
||||
|
||||
import { useDismissNotification, useFetchNotifications } from '../hooks';
|
||||
@@ -147,7 +147,7 @@ export function NotificationsPopover(params: {
|
||||
{t('common:notifications')}
|
||||
</div>
|
||||
|
||||
<Divider />
|
||||
<Separator />
|
||||
|
||||
<If condition={!notifications.length}>
|
||||
<div className={'px-3 py-2 text-sm'}>
|
||||
|
||||
Reference in New Issue
Block a user