Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajat Saxena committed Nov 14, 2024
1 parent 4077ec2 commit 1a04d9d
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 39 deletions.
5 changes: 2 additions & 3 deletions apps/web/app/dashboard2/blogs/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ export async function generateMetadata(
parent: ResolvingMetadata,
): Promise<Metadata> {
return {
title: `${MANAGE_BLOG_PAGE_HEADING} | ${
(await parent)?.title?.absolute
}`,
title: `${MANAGE_BLOG_PAGE_HEADING} | ${(await parent)?.title
?.absolute}`,
};
}

Expand Down
5 changes: 2 additions & 3 deletions apps/web/app/dashboard2/pages/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ export async function generateMetadata(
parent: ResolvingMetadata,
): Promise<Metadata> {
return {
title: `${MANAGE_PAGES_PAGE_HEADING} | ${
(await parent)?.title?.absolute
}`,
title: `${MANAGE_PAGES_PAGE_HEADING} | ${(await parent)?.title
?.absolute}`,
};
}

Expand Down
5 changes: 2 additions & 3 deletions apps/web/app/dashboard2/products/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ export async function generateMetadata(
parent: ResolvingMetadata,
): Promise<Metadata> {
return {
title: `${MANAGE_COURSES_PAGE_HEADING} | ${
(await parent)?.title?.absolute
}`,
title: `${MANAGE_COURSES_PAGE_HEADING} | ${(await parent)?.title
?.absolute}`,
};
}

Expand Down
5 changes: 2 additions & 3 deletions apps/web/app/dashboard2/settings/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ export async function generateMetadata(
parent: ResolvingMetadata,
): Promise<Metadata> {
return {
title: `${SITE_SETTINGS_PAGE_HEADING} | ${
(await parent)?.title?.absolute
}`,
title: `${SITE_SETTINGS_PAGE_HEADING} | ${(await parent)?.title
?.absolute}`,
};
}

Expand Down
6 changes: 3 additions & 3 deletions apps/web/app/verify-domain/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ export async function GET(req: Request) {
if (!domain) {
return Response.json(
{
message: `${responses.domain_doesnt_exist}: ${
host?.split(".")[0]
}`,
message: `${responses.domain_doesnt_exist}: ${host?.split(
".",
)[0]}`,
},
{ status: 404 },
);
Expand Down
10 changes: 5 additions & 5 deletions apps/web/components/admin/mails/sequence-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -633,11 +633,11 @@ const SequenceEditor = ({
value: tag.tag,
}))
: triggerType === "PRODUCT_PURCHASED"
? products.map((product) => ({
label: product.title,
value: product.courseId,
}))
: []
? products.map((product) => ({
label: product.title,
value: product.courseId,
}))
: []
}
/>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/components/admin/page-editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ function PageEditor({
typeof page.draftRobotsAllowed === "boolean"
? page.draftRobotsAllowed
: typeof page.robotsAllowed === "boolean"
? page.robotsAllowed
: true
? page.robotsAllowed
: true
}
socialImage={page.draftSocialImage || {}}
onClose={(e) => setLeftPaneContent("none")}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/graphql/settings/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
UIConstants,
} from "@courselit/common-models";

const currencyISOCodes = currencies.map((currency) =>
currency.isoCode?.toLowerCase(),
const currencyISOCodes = currencies.map(
(currency) => currency.isoCode?.toLowerCase(),
);

const verifyCurrencyISOCode = (isoCode: string) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/common-widgets/src/banner/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export default function Widget({
: undefined
: description
: product.description
? JSON.parse(product.description as string)
: undefined;
? JSON.parse(product.description as string)
: undefined;

let direction: any;
switch (alignment) {
Expand Down
4 changes: 2 additions & 2 deletions packages/common-widgets/src/email-form/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const Widget = ({
alignment === "center"
? "center"
: alignment === "right"
? "flex-end"
: "flex-start";
? "flex-end"
: "flex-start";

useEffect(() => {
if (state.config.turnstileSiteKey) {
Expand Down
4 changes: 2 additions & 2 deletions packages/common-widgets/src/header/widget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export default function Widget({ state, settings }: WidgetProps) {
linkAlignment === "right"
? "justify-end"
: linkAlignment === "center"
? "justify-center"
: "justify-start"
? "justify-center"
: "justify-start"
}`}
style={{
gap: `${spacingBetweenLinks}px`,
Expand Down
18 changes: 9 additions & 9 deletions packages/common-widgets/src/hero/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,15 @@ export default function Widget({
descriptionFontSize === 0
? "text-base"
: descriptionFontSize === 1
? "text-lg lg:text-xl"
: `text-${
descriptionFontSize -
1 ===
1
? ""
: descriptionFontSize -
1
}xl lg:text-${descriptionFontSize}xl`,
? "text-lg lg:text-xl"
: `text-${
descriptionFontSize -
1 ===
1
? ""
: descriptionFontSize -
1
}xl lg:text-${descriptionFontSize}xl`,
buttonAction && buttonCaption
? "mb-8"
: "mb-0",
Expand Down

0 comments on commit 1a04d9d

Please sign in to comment.