Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorKowalczyk committed Sep 28, 2024
1 parent a5e6ad0 commit b81f7e8
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 14 deletions.
6 changes: 3 additions & 3 deletions app/api/og/repository/[owner]/[repository]/route.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { redirect } from "next/navigation";
import { ImageResponse } from "next/og";
import { GetOGImage } from "@/lib/graphql";
import { NextRequest } from "next/server";
import { GetOGImage } from "@/lib/graphql";

export const runtime = "edge";

Expand Down Expand Up @@ -44,8 +44,8 @@ export async function GET(request: NextRequest, context: { params: Params }) {
});
}

const fontBold = fetch(new URL(`public/fonts/geist-mono-900.otf`, import.meta.url)).then((res) => res.arrayBuffer());
const fontRegular = fetch(new URL(`public/fonts/geist-mono-400.otf`, import.meta.url)).then((res) => res.arrayBuffer());
const fontBold = fetch(new URL("public/fonts/geist-mono-900.otf", import.meta.url)).then((res) => res.arrayBuffer());
const fontRegular = fetch(new URL("public/fonts/geist-mono-400.otf", import.meta.url)).then((res) => res.arrayBuffer());

const mostUsedLanguage = og.languages && og.languages.length > 0 ? og.languages.reduce((a, b) => (a.size > b.size ? a : b)) : { node: { name: "Unknown", color: "#c1c1c1" }, size: 0 };

Expand Down
4 changes: 2 additions & 2 deletions app/blog/[slug]/opengraph-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export default async function Image({ params }) {

if (!post) return redirect("/opengraph-image");

const fontBold = fetch(new URL(`public/fonts/geist-mono-900.otf`, import.meta.url)).then((res) => res.arrayBuffer());
const fontRegular = fetch(new URL(`public/fonts/geist-mono-400.otf`, import.meta.url)).then((res) => res.arrayBuffer());
const fontBold = fetch(new URL("public/fonts/geist-mono-900.otf", import.meta.url)).then((res) => res.arrayBuffer());
const fontRegular = fetch(new URL("public/fonts/geist-mono-400.otf", import.meta.url)).then((res) => res.arrayBuffer());

return new ImageResponse(
(
Expand Down
2 changes: 1 addition & 1 deletion app/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function Page() {
{posts.map((post, index) => (
<Link href={`/blog/${post.slug}`} className="w-full" key={`/blog/${post.slug}`}>
<li className="-mt-3 mb-10 ml-6 rounded-2xl border px-6 py-3 duration-200 hover:bg-neutral-200/50 motion-reduce:transition-none dark:border-neutral-800 dark:bg-[#161617] dark:hover:border-neutral-700 dark:hover:bg-[#202021]">
<span className="absolute -left-3 flex size-6 items-center justify-center rounded-full bg-black/10 ring-8 ring-white backdrop-blur dark:bg-neutral-800 dark:bg-white/10 dark:ring-[#101110]">
<span className="absolute -left-3 flex size-6 items-center justify-center rounded-full bg-black/10 ring-8 ring-white backdrop-blur dark:bg-white/10 dark:ring-[#101110]">
<Icons.Calendar className="size-3 text-neutral-800 dark:text-white" />
</span>
<header>
Expand Down
2 changes: 1 addition & 1 deletion app/manifest.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { meta } from "@/config";
import type { MetadataRoute } from "next";
import { meta } from "@/config";

export default function manifest(): MetadataRoute.Manifest {
return {
Expand Down
4 changes: 2 additions & 2 deletions app/opengraph-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export const size = {
};

export default async function Image() {
const fontBold = fetch(new URL(`public/fonts/geist-mono-900.otf`, import.meta.url)).then((res) => res.arrayBuffer());
const fontRegular = fetch(new URL(`public/fonts/geist-mono-400.otf`, import.meta.url)).then((res) => res.arrayBuffer());
const fontBold = fetch(new URL("public/fonts/geist-mono-900.otf", import.meta.url)).then((res) => res.arrayBuffer());
const fontRegular = fetch(new URL("public/fonts/geist-mono-400.otf", import.meta.url)).then((res) => res.arrayBuffer());

return new ImageResponse(
(
Expand Down
2 changes: 1 addition & 1 deletion app/robots.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetadataRoute } from "next";
import { meta } from "@/config";
import type { MetadataRoute } from 'next'

export default function robots(): MetadataRoute.Robots {
return {
Expand Down
2 changes: 1 addition & 1 deletion app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { allBlogs } from "contentlayer/generated";
import { meta } from "@/config";
import type { MetadataRoute } from "next";
import { meta } from "@/config";

export default function sitemap(): MetadataRoute.Sitemap {
const blogs = allBlogs.map((post) => ({
Expand Down
2 changes: 1 addition & 1 deletion components/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import Image from "next/image";
import Link from "next/link";
import { Icons } from "./Icons";
import { ButtonSecondary, ButtonPrimary } from "@/components/Button";
import { parseISO } from "@/lib/utils";
import { type Project } from "@/config";
import { parseISO } from "@/lib/utils";

export interface ProjectCardProps extends React.HTMLAttributes<HTMLDivElement> {
project: Project;
Expand Down
6 changes: 6 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ export default [
...eslintConfig.node,
...eslintConfig.tailwindcss,
...eslintConfig.typescript,
{
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.mjs"],
rules: {
"require-await": "off",
},
},
];
2 changes: 1 addition & 1 deletion lib/graphql/src/getPopular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ interface GraphqlResponse {
};
}

export async function GetPopular(): Promise<Object | null> {
export async function GetPopular(): Promise<User | null> {
const { data }: GraphqlResponse = await requestGraphql(
`
query($username: String!) {
Expand Down
2 changes: 1 addition & 1 deletion lib/graphql/src/getRepos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ interface GraphqlResponse {
};
}

export async function GetRepos(type: string, count: number): Promise<Object | null> {
export async function GetRepos(type: string, count: number): Promise<GraphqlResponse> {
if (type.toUpperCase() === "PRIVATE") {
const { data }: GraphqlResponse = await requestGraphql(
`
Expand Down

0 comments on commit b81f7e8

Please sign in to comment.