Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmfern committed Feb 5, 2025
1 parent 5624af1 commit 0d62001
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 21 deletions.
4 changes: 2 additions & 2 deletions apps/demo/emails/magic-links/raycast-magic-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export const RaycastMagicLinkEmail = ({
);

RaycastMagicLinkEmail.PreviewProps = {
magicLink: 'https://raycast.com'
}
magicLink: 'https://raycast.com',
};

export default RaycastMagicLinkEmail;

Expand Down
5 changes: 1 addition & 4 deletions packages/react-email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@
"url": "https://github.com/resend/react-email.git",
"directory": "packages/react-email"
},
"keywords": [
"react",
"email"
],
"keywords": ["react", "email"],
"engines": {
"node": ">=18.0.0"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/react-email/src/actions/get-email-controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import type { ErrorObject } from '../utils/types/error-object';

export type Control =
| {
key: string;
type: 'email' | 'text' | 'checkbox' | 'number';
}
key: string;
type: 'email' | 'text' | 'checkbox' | 'number';
}
| {
key: string;
type: 'select';
options: { name: string; value: string }[];
};
key: string;
type: 'select';
options: { name: string; value: string }[];
};

export type ControlsResult =
| { error: ErrorObject }
Expand Down
4 changes: 2 additions & 2 deletions packages/react-email/src/actions/get-preview-props.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use server';

import { cookies } from 'next/headers';
import { emailsDirectoryAbsolutePath } from '../utils/emails-directory-absolute-path';
import { cachedGetEmailComponent } from '../utils/cached-get-email-component';
import { emailsDirectoryAbsolutePath } from '../utils/emails-directory-absolute-path';

export const getPreviewProps = async (emailPath: string) => {
const cookieStore = await cookies();
Expand All @@ -17,7 +17,7 @@ export const getPreviewProps = async (emailPath: string) => {
string,
unknown
>;
} catch (exception) { }
} catch (exception) {}

const componentResult = await cachedGetEmailComponent(emailPath);
if ('emailComponent' in componentResult) {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-email/src/components/button.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use client';
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
import * as SlotPrimitive from '@radix-ui/react-slot';
import type * as React from 'react';
import animatedLoadIcon from '../animated-icons-data/load.json';
import { cn } from '../utils/cn';
import { unreachable } from '../utils/unreachable';
import { DotLottieReact } from '@lottiefiles/dotlottie-react';

type RootProps = React.ComponentProps<'button'>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as Checkbox from '@radix-ui/react-checkbox';
import * as Select from '@radix-ui/react-select';
import type { Control } from '../actions/get-email-controls';
import { IconArrowDown } from './icons/icon-arrow-down';
import { IconCheck } from './icons/icon-check';
import type { Control } from '../actions/get-email-controls';

interface PreviewPropControls {
previewProps: Record<string, unknown>;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-email/src/components/sidebar/sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use client';

import { DotLottieReact } from '@lottiefiles/dotlottie-react';
import * as Tabs from '@radix-ui/react-tabs';
import { clsx } from 'clsx';
import { motion } from 'framer-motion';
import Lottie from 'lottie-react';
import Link from 'next/link';
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
import type * as React from 'react';
import animatedHelpIcon from '../../animated-icons-data/help.json';
Expand Down
4 changes: 1 addition & 3 deletions packages/react-email/src/hooks/use-icon-animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export const useIconAnimation = () => {
}

const total = Math.round(ref.current.totalFrames ?? 0);
const current = Math.round(
(ref.current.currentFrame ?? 0) + 1,
);
const current = Math.round((ref.current.currentFrame ?? 0) + 1);

if (current === 1 || current >= total * THRESHOLD_ANIMATION) {
timer.current = setTimeout(() => {
Expand Down

0 comments on commit 0d62001

Please sign in to comment.