Skip to content

Commit 7c08a9e

Browse files
committed
Formatted the code
1 parent 7a14517 commit 7c08a9e

5 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/components/control/Pagination.astro

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { Icon } from "astro-icon/components";
44
import { url } from "../../utils/url-utils";
55
66
interface Props {
7-
page: Page;
8-
class?: string;
9-
style?: string;
7+
page: Page;
8+
class?: string;
9+
style?: string;
1010
}
1111
1212
const { page, style } = Astro.props;
@@ -23,17 +23,17 @@ let count = 1;
2323
let l = page.currentPage;
2424
let r = page.currentPage;
2525
while (0 < l - 1 && r + 1 <= page.lastPage && count + 2 <= VISIBLE) {
26-
count += 2;
27-
l--;
28-
r++;
26+
count += 2;
27+
l--;
28+
r++;
2929
}
3030
while (0 < l - 1 && count < VISIBLE) {
31-
count++;
32-
l--;
31+
count++;
32+
l--;
3333
}
3434
while (r + 1 <= page.lastPage && count < VISIBLE) {
35-
count++;
36-
r++;
35+
count++;
36+
r++;
3737
}
3838
3939
let pages: number[] = [];
@@ -46,8 +46,8 @@ if (r === page.lastPage - 2) pages.push(page.lastPage - 1);
4646
if (r < page.lastPage) pages.push(page.lastPage);
4747
4848
const getPageUrl = (p: number) => {
49-
if (p === 1) return "/writeups/";
50-
return `/writeups/${p}/`;
49+
if (p === 1) return "/writeups/";
50+
return `/writeups/${p}/`;
5151
};
5252
---
5353

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const siteConfig: SiteConfig = {
4040

4141
export const navBarConfig: NavBarConfig = {
4242
links: [
43-
LinkPreset.About,
43+
LinkPreset.About,
4444
LinkPreset.Team,
4545
LinkPreset.Writeup,
4646
LinkPreset.Archive,

src/constants/link-presets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { i18n } from "@i18n/translation";
33
import { LinkPreset, type NavBarLink } from "@/types/config";
44

55
export const LinkPresets: { [key in LinkPreset]: NavBarLink } = {
6-
[LinkPreset.About]: {
6+
[LinkPreset.About]: {
77
name: i18n(I18nKey.about),
88
url: "/",
99
},

src/pages/writeups/[...page].astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import MainGridLayout from "../../layouts/MainGridLayout.astro";
77
import { getSortedPosts } from "../../utils/content-utils";
88
99
export const getStaticPaths = (async ({ paginate }) => {
10-
const allBlogPosts = await getSortedPosts();
11-
return paginate(allBlogPosts, { pageSize: PAGE_SIZE });
10+
const allBlogPosts = await getSortedPosts();
11+
return paginate(allBlogPosts, { pageSize: PAGE_SIZE });
1212
}) satisfies GetStaticPaths;
1313
// https://github.com/withastro/astro/issues/6507#issuecomment-1489916992
1414

src/types/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export type Favicon = {
4545
};
4646

4747
export enum LinkPreset {
48-
About = 0,
48+
About = 0,
4949
Archive = 1,
5050
Writeup = 2,
5151
Team = 3,

0 commit comments

Comments
 (0)