Skip to content

Commit 6b72900

Browse files
committed
Adds prettier
1 parent 6b679e8 commit 6b72900

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2230
-2221
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
name: Issue Template
33
about: Create a report to help us improve
4-
title: ""
5-
labels: ""
6-
assignees: ""
4+
title: ''
5+
labels: ''
6+
assignees: ''
77
---
88

99
## Issue Type

.github/workflows/nextjs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: Deploy Next.js site to Pages
77
on:
88
# Runs on pushes targeting the default branch
99
push:
10-
branches: ["main"]
10+
branches: ['main']
1111

1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
@@ -21,7 +21,7 @@ permissions:
2121
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
2222
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2323
concurrency:
24-
group: "pages"
24+
group: 'pages'
2525
cancel-in-progress: false
2626

2727
jobs:
@@ -51,7 +51,7 @@ jobs:
5151
- name: Setup Node
5252
uses: actions/setup-node@v4
5353
with:
54-
node-version: "20"
54+
node-version: '20'
5555
cache: ${{ steps.detect-package-manager.outputs.manager }}
5656
- name: Setup Pages
5757
uses: actions/configure-pages@v5

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 80,
7+
"bracketSpacing": true,
8+
"arrowParens": "avoid"
9+
}

next.config.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import type { NextConfig } from "next";
1+
import type { NextConfig } from 'next'
22

33
const nextConfig: NextConfig = {
44
/* config options here */
55
images: {
66
remotePatterns: [
77
{
8-
protocol: "https",
9-
hostname: "i0.wp.com",
10-
pathname: "**",
8+
protocol: 'https',
9+
hostname: 'i0.wp.com',
10+
pathname: '**',
1111
},
1212
{
13-
protocol: "https",
14-
hostname: "procedure.tech",
15-
pathname: "**",
13+
protocol: 'https',
14+
hostname: 'procedure.tech',
15+
pathname: '**',
1616
},
1717
],
1818
},
19-
};
19+
}
2020

21-
export default nextConfig;
21+
export default nextConfig

postcss.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ const config = {
33
plugins: {
44
tailwindcss: {},
55
},
6-
};
6+
}
77

8-
export default config;
8+
export default config

src/app/[slug]/components/Author.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { AuthorDataType } from "@/data/types";
2-
import Image from "next/image";
3-
import Link from "next/link";
4-
import React from "react";
1+
import { AuthorDataType } from '@/data/types'
2+
import Image from 'next/image'
3+
import Link from 'next/link'
4+
import React from 'react'
55

66
type AuthorProps = {
7-
authorData: AuthorDataType;
8-
};
7+
authorData: AuthorDataType
8+
}
99

1010
const Author = ({ authorData }: AuthorProps) => {
1111
return (
@@ -24,7 +24,7 @@ const Author = ({ authorData }: AuthorProps) => {
2424
</div>
2525
</Link>
2626
</div>
27-
);
28-
};
27+
)
28+
}
2929

30-
export default Author;
30+
export default Author
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from "react";
1+
import React from 'react'
22

33
type LeftSectionProps = {
4-
subHeadings: string[];
5-
content: string;
6-
};
4+
subHeadings: string[]
5+
content: string
6+
}
77

88
const LeftSection = ({ subHeadings, content }: LeftSectionProps) => {
99
return (
@@ -15,7 +15,7 @@ const LeftSection = ({ subHeadings, content }: LeftSectionProps) => {
1515
))}
1616
<div dangerouslySetInnerHTML={{ __html: content }}></div>
1717
</div>
18-
);
19-
};
18+
)
19+
}
2020

21-
export default LeftSection;
21+
export default LeftSection

src/app/[slug]/components/RightSection.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { PostType, TagsType } from "@/data/types";
2-
import Link from "next/link";
3-
import React from "react";
1+
import { PostType, TagsType } from '@/data/types'
2+
import Link from 'next/link'
3+
import React from 'react'
44

55
type RightSectionProps = {
6-
latestPosts: PostType[];
7-
tags: TagsType[];
8-
};
6+
latestPosts: PostType[]
7+
tags: TagsType[]
8+
}
99

1010
const RightSection = ({ latestPosts, tags }: RightSectionProps) => {
1111
return (
@@ -35,7 +35,7 @@ const RightSection = ({ latestPosts, tags }: RightSectionProps) => {
3535
Tag Cloud
3636
</h4>
3737
<div className="flex flex-wrap lg:border-b border-b-black/20 pb-10">
38-
{tags.map((tag) => (
38+
{tags.map(tag => (
3939
<Link
4040
key={tag.link}
4141
className="py-1.5 px-5 bg-[#D0D0D0] mr-2.5 mb-2.5 rounded-full border-none text-sm relative animation-easein-slow left-0 hover:bg-[rgba(208,208,208,0.3)]"
@@ -46,7 +46,7 @@ const RightSection = ({ latestPosts, tags }: RightSectionProps) => {
4646
))}
4747
</div>
4848
</div>
49-
);
50-
};
49+
)
50+
}
5151

52-
export default RightSection;
52+
export default RightSection

src/app/[slug]/page.tsx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
import PageNavbar from "@/components/PageNavbar";
2-
import { blogsPageData } from "@/data";
3-
import Image from "next/image";
4-
import React from "react";
5-
import { twMerge } from "tailwind-merge";
6-
import Author from "./components/Author";
7-
import LeftSection from "./components/LeftSection";
8-
import RightSection from "./components/RightSection";
9-
import { DynamicPagePropsType } from "../types";
10-
import { Metadata } from "next/types";
11-
import { removeDashAndCapitalize } from "@/utils/utils";
1+
import PageNavbar from '@/components/PageNavbar'
2+
import { blogsPageData } from '@/data'
3+
import Image from 'next/image'
4+
import React from 'react'
5+
import { twMerge } from 'tailwind-merge'
6+
import Author from './components/Author'
7+
import LeftSection from './components/LeftSection'
8+
import RightSection from './components/RightSection'
9+
import { DynamicPagePropsType } from '../types'
10+
import { Metadata } from 'next/types'
11+
import { removeDashAndCapitalize } from '@/utils/utils'
1212

13-
export const dynamicParams = false;
13+
export const dynamicParams = false
1414

1515
export async function generateStaticParams() {
16-
return Object.keys(blogsPageData).map((pageName) => ({
16+
return Object.keys(blogsPageData).map(pageName => ({
1717
slug: pageName,
18-
}));
18+
}))
1919
}
2020

21-
export async function generateMetadata({ params }: DynamicPagePropsType): Promise<Metadata> {
21+
export async function generateMetadata({
22+
params,
23+
}: DynamicPagePropsType): Promise<Metadata> {
2224
const slug = (await params).slug
2325

2426
return {
2527
title: removeDashAndCapitalize(slug),
26-
description: ""
27-
};
28+
description: '',
29+
}
2830
}
2931

30-
export default async function Page({
31-
params,
32-
}: DynamicPagePropsType) {
33-
const slug = (await params).slug;
34-
const pageData = blogsPageData[slug];
32+
export default async function Page({ params }: DynamicPagePropsType) {
33+
const slug = (await params).slug
34+
const pageData = blogsPageData[slug]
3535

3636
return (
3737
<>
@@ -44,7 +44,7 @@ export default async function Page({
4444
>
4545
<h1
4646
className={twMerge(
47-
"text-5xl lg:text-6xl xl:text-7xl pt-4 dot mb-1.5 tracking-tighter",
47+
'text-5xl lg:text-6xl xl:text-7xl pt-4 dot mb-1.5 tracking-tighter'
4848
)}
4949
>
5050
{pageData.heroSection.heading}
@@ -99,5 +99,5 @@ export default async function Page({
9999
</div>
100100
</div>
101101
</>
102-
);
102+
)
103103
}

src/app/about/[slug]/layout.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import React from "react";
2-
import Image from "next/image";
3-
import Link from "next/link";
1+
import React from 'react'
2+
import Image from 'next/image'
3+
import Link from 'next/link'
44

55
const Layout = ({
66
children,
77
}: Readonly<{
8-
children: React.ReactNode;
8+
children: React.ReactNode
99
}>) => {
1010
return (
1111
<>
@@ -50,7 +50,7 @@ const Layout = ({
5050
</div>
5151
</section>
5252
</>
53-
);
54-
};
53+
)
54+
}
5555

56-
export default Layout;
56+
export default Layout

0 commit comments

Comments
 (0)