Skip to content

Commit ad296cb

Browse files
committed
Lint and prettier fixes
1 parent aaac6a0 commit ad296cb

15 files changed

Lines changed: 209 additions & 214 deletions

File tree

apps/docs/src/pages/en/website/blocks.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You will also see the newly added link on the header itself.
3636
3. Click on the pencil icon against the newly added link to edit it as shown above.
3737
4. Change the label (displayed as text on the header block) and the URL (where the user should be taken upon clicking the label on the header) and click `Done` to save.
3838
![Header edit link](/assets/pages/header-edit-link.png)
39-
</details>
39+
</details>
4040

4141
### [Rich Text](#rich-text)
4242

@@ -61,7 +61,7 @@ You can also use the floating controls to do the same as shown below.
6161
2. Click on the floating `link` button to reveal a popup text input.
6262
3. In the popup text input, enter the URL as shown below.
6363
![Create a hyperlink in rich text block](/assets/pages/rich-text-create-hyperlink.gif)
64-
</details>
64+
</details>
6565

6666
### [Hero](#hero)
6767

@@ -87,7 +87,7 @@ Following is how it looks on a page.
8787
4. In the button action, enter the URL the user should be taken to upon clicking.
8888
a. If the URL is from your own school, use its relative form, i.e., `/courses`.
8989
b. If the URL is from some external website, use the absolute (complete) URL, i.e., `https://website.com/courses`.
90-
</details>
90+
</details>
9191

9292
### [Grid](#grid)
9393

@@ -132,7 +132,7 @@ A grid block comes in handy when you want to show some sort of list, for example
132132
4. In the button action, enter the URL the user should be taken to upon clicking.
133133
a. If the URL is from your own school, use its relative form, i.e., `/courses`.
134134
b. If the URL is from some external website, use the absolute (complete) URL, i.e., `https://website.com/courses`.
135-
</details>
135+
</details>
136136

137137
### [Featured](#featured)
138138

@@ -268,7 +268,7 @@ In the `Design` panel, you can customize:
268268
- Maximum width
269269
- Vertical padding
270270
- Social media links (Facebook, Twitter, Instagram, LinkedIn, YouTube, Discord, GitHub)
271-
</details>
271+
</details>
272272

273273
## [Shared blocks](#shared-blocks)
274274

apps/docs/src/pages/en/website/themes.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -192,30 +192,30 @@ The typography editor lets you customize text styles across your website. These
192192
- Header 3: Smaller titles for subsections
193193
- Header 4: Small titles for minor sections
194194
- Preheader: Introductory text that appears above headers
195-
</details>
195+
</details>
196196

197197
<details>
198198
<summary>Subheaders</summary>
199199

200200
- Subheader 1: Primary subheaders for section introductions
201201
- Subheader 2: Secondary subheaders for supporting text
202-
</details>
202+
</details>
203203

204204
<details>
205205
<summary>Body Text</summary>
206206

207207
- Text 1: Main body text for content
208208
- Text 2: Secondary body text for supporting content
209209
- Caption: Small text for image captions and footnotes
210-
</details>
210+
</details>
211211

212212
<details>
213213
<summary>Interactive Elements</summary>
214214

215215
- Link: Text for clickable links
216216
- Button: Text for buttons and calls-to-action
217217
- Input: Text for form fields and search boxes
218-
</details>
218+
</details>
219219

220220
For each text style, you can customize:
221221

@@ -243,7 +243,7 @@ CourseLit provides a carefully curated selection of professional fonts, organize
243243
- **Mulish**: A geometric sans-serif with a modern feel
244244
- **Nunito**: A well-balanced font with rounded terminals
245245
- **Work Sans**: A clean, modern font with a geometric feel
246-
</details>
246+
</details>
247247

248248
<details>
249249
<summary>Serif Fonts</summary>
@@ -253,7 +253,7 @@ CourseLit provides a carefully curated selection of professional fonts, organize
253253
- **Playfair Display**: An elegant serif font for headings
254254
- **Roboto Slab**: A serif variant of Roboto
255255
- **Source Serif 4**: A serif font designed for digital reading
256-
</details>
256+
</details>
257257

258258
<details>
259259
<summary>Display Fonts</summary>
@@ -264,15 +264,15 @@ CourseLit provides a carefully curated selection of professional fonts, organize
264264
- **Rubik**: A sans-serif with a geometric feel
265265
- **Oswald**: A reworking of the classic style
266266
- **Bebas Neue**: A display font with a strong personality
267-
</details>
267+
</details>
268268

269269
<details>
270270
<summary>Modern Fonts</summary>
271271

272272
- **Lato**: A sans-serif font with a warm feel
273273
- **PT Sans**: A font designed for public use
274274
- **Quicksand**: A display sans-serif with rounded terminals
275-
</details>
275+
</details>
276276

277277
Each font is optimized for web use and includes multiple weights for flexibility in design. All fonts support Latin characters and are carefully selected for their readability and professional appearance.
278278

@@ -290,7 +290,7 @@ The interactives editor allows you to customize the appearance of interactive el
290290
- Shadow effects: From None to 2X Large
291291
- Custom styles: Add your own custom styles using [supported Tailwind classes](#supported-tailwind-classes)
292292
- Disabled state: How the button looks when it can't be clicked
293-
</details>
293+
</details>
294294

295295
<details>
296296
<summary>Link</summary>
@@ -300,7 +300,7 @@ The interactives editor allows you to customize the appearance of interactive el
300300
- Text shadow: Add depth to your links
301301
- Custom styles: Add your own custom styles using [supported Tailwind classes](#supported-tailwind-classes)
302302
- Disabled state: How the link looks when it can't be clicked
303-
</details>
303+
</details>
304304

305305
<details>
306306
<summary>Card</summary>
@@ -309,7 +309,7 @@ The interactives editor allows you to customize the appearance of interactive el
309309
- Border style: Choose from various border styles
310310
- Shadow effects: Add depth to your cards
311311
- Custom styles: Add your own custom styles using [supported Tailwind classes](#supported-tailwind-classes)
312-
</details>
312+
</details>
313313

314314
<details>
315315
<summary>Input</summary>
@@ -320,7 +320,7 @@ The interactives editor allows you to customize the appearance of interactive el
320320
- Shadow effects: Add depth to your input fields
321321
- Custom styles: Add your own custom styles using [supported Tailwind classes](#supported-tailwind-classes)
322322
- Disabled state: How the input looks when it can't be used
323-
</details>
323+
</details>
324324

325325
### 4. Structure
326326

@@ -332,14 +332,14 @@ The structure editor lets you customize the layout of your pages, like section p
332332
<summary>Page</summary>
333333

334334
- Maximum width options: - 2XL (42rem): Compact layout - 3XL (48rem): Standard layout - 4XL (56rem): Wide layout - 5XL (64rem): Extra wide layout - 6XL (72rem): Full width layout
335-
</details>
335+
</details>
336336

337337
<details>
338338
<summary>Section</summary>
339339

340340
- Horizontal padding: Space on the left and right sides (None to 9X Large)
341341
- Vertical padding: Space on the top and bottom (None to 9X Large)
342-
</details>
342+
</details>
343343

344344
## Publishing Changes
345345

@@ -387,7 +387,7 @@ When adding custom styles to interactive elements, you can use the following Tai
387387
- `text-6xl`: 6X large text
388388
- `text-7xl`: 7X large text
389389
- `text-8xl`: 8X large text
390-
</details>
390+
</details>
391391

392392
<details>
393393
<summary>Padding</summary>
@@ -399,7 +399,7 @@ When adding custom styles to interactive elements, you can use the following Tai
399399
#### Horizontal Padding
400400

401401
- `px-4` to `px-20`: Horizontal padding from 1rem to 5rem
402-
</details>
402+
</details>
403403

404404
<details>
405405
<summary>Colors</summary>
@@ -454,7 +454,7 @@ Variants available: `hover`, `disabled`, `dark`
454454
- `ease-out`: Ease out
455455
- `ease-in-out`: Ease in and out
456456
- `ease-linear`: Linear
457-
</details>
457+
</details>
458458

459459
<details>
460460
<summary>Transforms</summary>
@@ -481,7 +481,7 @@ Variants available: `hover`, `disabled`, `dark`
481481
- `scale-110`: 110% scale
482482
- `scale-125`: 125% scale
483483
- `scale-150`: 150% scale
484-
</details>
484+
</details>
485485

486486
<details>
487487
<summary>Shadows</summary>

apps/web/app/(with-contexts)/course/[slug]/[id]/[lesson]/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import { ProfileContext, AddressContext } from "@components/contexts";
77
import { Profile } from "@courselit/common-models";
88

99
export default function LessonPage({
10-
params
10+
params,
1111
}: {
1212
params: {
1313
slug: string;
1414
id: string;
1515
lesson: string;
16-
}
16+
};
1717
}) {
1818
const { slug, id, lesson } = params;
1919
const { profile, setProfile } = useContext(ProfileContext);
@@ -32,5 +32,5 @@ export default function LessonPage({
3232
address={address}
3333
productId={id}
3434
/>
35-
)
36-
}
35+
);
36+
}

apps/web/app/(with-contexts)/course/[slug]/[id]/helpers.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ type CourseWithoutGroups = Pick<
2424
| "defaultPaymentPlan"
2525
>;
2626

27-
export const getProduct = async (id: string, address: string): Promise<CourseFrontend> => {
27+
export const getProduct = async (
28+
id: string,
29+
address: string,
30+
): Promise<CourseFrontend> => {
2831
const fetch = new FetchBuilder()
2932
.setUrl(`${address}/api/graph`)
3033
.setIsGraphQLEndpoint(true)
@@ -80,13 +83,13 @@ export const getProduct = async (id: string, address: string): Promise<CourseFro
8083
}
8184
}
8285
`,
83-
variables: { id }
86+
variables: { id },
8487
})
8588
.setIsGraphQLEndpoint(true)
8689
.build();
87-
const response= await fetch.exec();
90+
const response = await fetch.exec();
8891
return formatCourse(response.product);
89-
}
92+
};
9093

9194
export function formatCourse(
9295
post: Course & { lessons: Lesson[]; firstLesson: string; groups: Group[] },
@@ -117,4 +120,4 @@ export function formatCourse(
117120
paymentPlans: post.paymentPlans,
118121
defaultPaymentPlan: post.defaultPaymentPlan,
119122
};
120-
}
123+
}

apps/web/app/(with-contexts)/course/[slug]/[id]/layout-with-sidebar.tsx

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
"use client";
22

33
import { useContext } from "react";
4-
import {
5-
isEnrolled,
6-
isLessonCompleted,
7-
} from "@ui-lib/utils";
4+
import { isEnrolled, isLessonCompleted } from "@ui-lib/utils";
85
import { CheckCircled, Circle, Lock } from "@courselit/icons";
9-
import {
10-
SIDEBAR_TEXT_COURSE_ABOUT,
11-
} from "@ui-config/strings";
12-
import {
13-
Profile,
14-
Constants,
15-
} from "@courselit/common-models";
6+
import { SIDEBAR_TEXT_COURSE_ABOUT } from "@ui-config/strings";
7+
import { Profile, Constants } from "@courselit/common-models";
168
import {
179
ComponentScaffoldMenuItem,
1810
ComponentScaffold,
@@ -21,9 +13,12 @@ import {
2113
import { ProfileContext, SiteInfoContext } from "@components/contexts";
2214
import { CourseFrontend, GroupWithLessons } from "./helpers";
2315

24-
export default function ProductPage({ product, children }: {
25-
product: CourseFrontend,
26-
children: React.ReactNode
16+
export default function ProductPage({
17+
product,
18+
children,
19+
}: {
20+
product: CourseFrontend;
21+
children: React.ReactNode;
2722
}) {
2823
const { profile } = useContext(ProfileContext);
2924
const siteInfo = useContext(SiteInfoContext);
@@ -33,15 +28,15 @@ export default function ProductPage({ product, children }: {
3328
}
3429

3530
return (
36-
<ComponentScaffold
37-
items={generateSideBarItems(product, profile as Profile)}
38-
drawerWidth={360}
39-
showCourseLitBranding={true}
40-
siteinfo={siteInfo}
41-
>
42-
{children}
43-
</ComponentScaffold>
44-
)
31+
<ComponentScaffold
32+
items={generateSideBarItems(product, profile as Profile)}
33+
drawerWidth={360}
34+
showCourseLitBranding={true}
35+
siteinfo={siteInfo}
36+
>
37+
{children}
38+
</ComponentScaffold>
39+
);
4540
}
4641

4742
export function generateSideBarItems(
@@ -157,4 +152,4 @@ export function isGroupAccessibleToUser(
157152
}
158153

159154
return false;
160-
}
155+
}

apps/web/app/(with-contexts)/course/[slug]/[id]/layout.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ export async function generateMetadata(
2828
title
2929
}
3030
}
31-
`
31+
`;
3232
const fetch = new FetchBuilder()
3333
.setUrl(`${address}/api/graph`)
3434
.setPayload({
3535
query,
36-
variables: { id: params.id }
36+
variables: { id: params.id },
3737
})
3838
.setIsGraphQLEndpoint(true)
3939
.build();
@@ -62,10 +62,7 @@ export default async function Layout({
6262

6363
return (
6464
<SessionProvider session={session}>
65-
<LayoutWithSidebar product={product}>
66-
{children}
67-
</LayoutWithSidebar>
65+
<LayoutWithSidebar product={product}>{children}</LayoutWithSidebar>
6866
</SessionProvider>
6967
);
7068
}
71-

0 commit comments

Comments
 (0)