Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/live markdown editor #276

Merged
merged 57 commits into from
Nov 3, 2024
Merged

Feat/live markdown editor #276

merged 57 commits into from
Nov 3, 2024

Conversation

yupix
Copy link
Contributor

@yupix yupix commented Oct 4, 2024

close #53

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

Biome

[Biome] reported by reviewdog 🐶

import { v4 as uuidv4 } from 'uuid';


[Biome] reported by reviewdog 🐶

import { fileTypeFromBuffer, FileTypeResult } from 'file-type';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { createCookieSessionStorage } from "@remix-run/node";
import { env } from "./env.server";


[Biome] reported by reviewdog 🐶

cookie: {
name: "auth_session",
sameSite: "lax",
path: "/",
httpOnly: true,
secrets: [env.SESSION_SECRET],
secure: process.env.NODE_ENV === "production",
maxAge: 60 * 60 * 24,
},


[Biome] reported by reviewdog 🐶

import { MemberCard } from '~/components/MemberCard';
import { Navbar } from '~/components/navbar';
import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { LoaderFunctionArgs } from "@remix-run/node";


[Biome] reported by reviewdog 🐶

export async function loader({request}: LoaderFunctionArgs) {
}


[Biome] reported by reviewdog 🐶

import { LoaderFunctionArgs } from "@remix-run/node";
import { authenticator } from "~/lib/auth.server";


[Biome] reported by reviewdog 🐶

export async function loader({request}: LoaderFunctionArgs) {
return authenticator.authenticate("oidc", request, {
successRedirect: "/",
})


[Biome] reported by reviewdog 🐶

import { useFetcher } from '@remix-run/react';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { uploadHandler } from '~/lib/s3.server';


[Biome] reported by reviewdog 🐶

import { action as PreveiwAction } from '../preview';


[Biome] reported by reviewdog 🐶

const handlePaste: ClipboardEventHandler<HTMLTextAreaElement> = async (event) => {


[Biome] reported by reviewdog 🐶

import { getSocialIcon } from '~/lib/utils';
import { getBlogPost } from '../../../lib/blog.server';


[Biome] reported by reviewdog 🐶

import { useFetcher } from '@remix-run/react';


[Biome] reported by reviewdog 🐶

import '~/mdx.css';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { uploadHandler } from '~/lib/s3.server';
import { authenticator } from '~/lib/auth.server';
import { action as PreveiwAction } from './blog+/preview';
import { IconPencil, IconPlayerPlay } from '@tabler/icons-react';


[Biome] reported by reviewdog 🐶

import { cn } from '~/lib/utils';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

<input placeholder="Title" className='bg-transparent focus-within:outline-none text-2xl mb-4'></input>


[Biome] reported by reviewdog 🐶

import { ActionFunctionArgs } from "@remix-run/node";
import { authenticator } from "~/lib/auth.server";


[Biome] reported by reviewdog 🐶

export async function action({request}: ActionFunctionArgs) {
const user = await authenticator.isAuthenticated(request, {
failureRedirect: "/login",
});
}


[Biome] reported by reviewdog 🐶

import { LoaderFunctionArgs } from "@remix-run/node";
import { authenticator } from "~/lib/auth.server";


[Biome] reported by reviewdog 🐶

export async function loader({request}: LoaderFunctionArgs) {


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { Navbar } from '~/components/navbar';

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

Biome

[Biome] reported by reviewdog 🐶

import { env } from './env.server';
import { UploadHandler } from '@remix-run/node';


[Biome] reported by reviewdog 🐶

import { v4 as uuidv4 } from 'uuid';


[Biome] reported by reviewdog 🐶

import { fileTypeFromBuffer, FileTypeResult } from 'file-type';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { createCookieSessionStorage } from "@remix-run/node";
import { env } from "./env.server";


[Biome] reported by reviewdog 🐶

cookie: {
name: "auth_session",
sameSite: "lax",
path: "/",
httpOnly: true,
secrets: [env.SESSION_SECRET],
secure: process.env.NODE_ENV === "production",
maxAge: 60 * 60 * 24,
},


[Biome] reported by reviewdog 🐶

import { useRouteLoaderData } from "@remix-run/react";
import {loader as rootLoader} from "~/root"


[Biome] reported by reviewdog 🐶

const data = useRouteLoaderData<typeof rootLoader>("root");


[Biome] reported by reviewdog 🐶

if (!data) {
return null;
}


[Biome] reported by reviewdog 🐶

return data.user;
}


[Biome] reported by reviewdog 🐶

LoaderFunctionArgs,


[Biome] reported by reviewdog 🐶

type MetaFunction,


[Biome] reported by reviewdog 🐶

import { MemberCard } from '~/components/MemberCard';
import { Navbar } from '~/components/navbar';
import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { LoaderFunctionArgs } from "@remix-run/node";


[Biome] reported by reviewdog 🐶

export async function loader({request}: LoaderFunctionArgs) {
}


[Biome] reported by reviewdog 🐶

import { LoaderFunctionArgs } from "@remix-run/node";
import { authenticator } from "~/lib/auth.server";


[Biome] reported by reviewdog 🐶

export async function loader({request}: LoaderFunctionArgs) {
return authenticator.authenticate("oidc", request, {
successRedirect: "/",
})


[Biome] reported by reviewdog 🐶

import { useFetcher } from '@remix-run/react';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { uploadHandler } from '~/lib/s3.server';


[Biome] reported by reviewdog 🐶

import { action as PreveiwAction } from '../preview';


[Biome] reported by reviewdog 🐶

const handlePaste: ClipboardEventHandler<HTMLTextAreaElement> = async (event) => {


[Biome] reported by reviewdog 🐶

import { getSocialIcon } from '~/lib/utils';
import { getBlogPost } from '../../../lib/blog.server';


[Biome] reported by reviewdog 🐶

const user = useUser() ?? undefined


[Biome] reported by reviewdog 🐶

import { useFetcher } from '@remix-run/react';


[Biome] reported by reviewdog 🐶

import '~/mdx.css';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { uploadHandler } from '~/lib/s3.server';
import { authenticator } from '~/lib/auth.server';
import { action as PreveiwAction } from './blog+/preview';
import { IconPencil, IconPlayerPlay } from '@tabler/icons-react';


[Biome] reported by reviewdog 🐶

import { cn } from '~/lib/utils';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

<input placeholder="Title" className='bg-transparent focus-within:outline-none text-2xl mb-4'></input>


[Biome] reported by reviewdog 🐶

import { ActionFunctionArgs } from "@remix-run/node";
import { authenticator } from "~/lib/auth.server";


[Biome] reported by reviewdog 🐶

export async function action({request}: ActionFunctionArgs) {
const user = await authenticator.isAuthenticated(request, {
failureRedirect: "/login",
});
}


[Biome] reported by reviewdog 🐶

import { LoaderFunctionArgs } from "@remix-run/node";
import { authenticator } from "~/lib/auth.server";


[Biome] reported by reviewdog 🐶

export async function loader({request}: LoaderFunctionArgs) {


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

const user = useUser() ?? undefined


[Biome] reported by reviewdog 🐶

<Navbar user={user}/>


[Biome] reported by reviewdog 🐶

import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { Navbar } from '~/components/navbar';


[Biome] reported by reviewdog 🐶

const user = useUser() ?? undefined


[Biome] reported by reviewdog 🐶

<Navbar user={user}/>


[Biome] reported by reviewdog 🐶

const user = useUser() ?? undefined

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

Biome

[Biome] reported by reviewdog 🐶

import { getSocialIcon } from '~/lib/utils';
import { getBlogPost } from '../../../lib/blog.server';


[Biome] reported by reviewdog 🐶

import { useFetcher } from '@remix-run/react';


[Biome] reported by reviewdog 🐶

import '~/mdx.css';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { uploadHandler } from '~/lib/s3.server';
import { authenticator } from '~/lib/auth.server';
import { action as PreveiwAction } from './blog+/preview';
import { IconPencil, IconPlayerPlay } from '@tabler/icons-react';


[Biome] reported by reviewdog 🐶

import { cn } from '~/lib/utils';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { Navbar } from '~/components/navbar';


[Biome] reported by reviewdog 🐶

import { devErrorBoundary } from '@metronome-sh/dev-error-boundary';
import { flatRoutes } from 'remix-flat-routes';

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

Biome

[Biome] reported by reviewdog 🐶

import { getSocialIcon } from '~/lib/utils';
import { getBlogPost } from '../../../lib/blog.server';


[Biome] reported by reviewdog 🐶

import { useFetcher } from '@remix-run/react';


[Biome] reported by reviewdog 🐶

import '~/mdx.css';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { uploadHandler } from '~/lib/s3.server';
import { authenticator } from '~/lib/auth.server';
import { action as PreveiwAction } from './blog+/preview';
import { IconPencil, IconPlayerPlay } from '@tabler/icons-react';


[Biome] reported by reviewdog 🐶

import { cn } from '~/lib/utils';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { Navbar } from '~/components/navbar';


[Biome] reported by reviewdog 🐶

import { devErrorBoundary } from '@metronome-sh/dev-error-boundary';
import { flatRoutes } from 'remix-flat-routes';

多分動くはず
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

Biome

[Biome] reported by reviewdog 🐶

import { getSocialIcon } from '~/lib/utils';
import { getBlogPost } from '../../../lib/blog.server';


[Biome] reported by reviewdog 🐶

import { useFetcher } from '@remix-run/react';


[Biome] reported by reviewdog 🐶

import '~/mdx.css';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { uploadHandler } from '~/lib/s3.server';
import { authenticator } from '~/lib/auth.server';
import { action as PreveiwAction } from './blog+/preview';
import { IconPencil, IconPlayerPlay } from '@tabler/icons-react';


[Biome] reported by reviewdog 🐶

import { cn } from '~/lib/utils';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { Navbar } from '~/components/navbar';


[Biome] reported by reviewdog 🐶

import { devErrorBoundary } from '@metronome-sh/dev-error-boundary';
import { flatRoutes } from 'remix-flat-routes';

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

Biome

[Biome] reported by reviewdog 🐶

className,
...props


[Biome] reported by reviewdog 🐶

return (
<span
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
{...props}
/>
)
}
DropdownMenuShortcut.displayName = "DropdownMenuShortcut"


[Biome] reported by reviewdog 🐶

DropdownMenu,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuCheckboxItem,
DropdownMenuRadioItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuGroup,
DropdownMenuPortal,
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuRadioGroup,
}


[Biome] reported by reviewdog 🐶

import { useMemo, useEffect, useRef, useState } from 'react';


[Biome] reported by reviewdog 🐶

import { EditorView, keymap, ViewUpdate, placeholder } from '@codemirror/view';
import { EditorState, StateEffect } from '@codemirror/state';


[Biome] reported by reviewdog 🐶

import { syntaxHighlighting, HighlightStyle } from '@codemirror/language';


[Biome] reported by reviewdog 🐶

import { action } from '~/routes/api+/upload.$tracker';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

const [uploadingImages, setUploadingImages] = useState<{ [key: string]: { cursorPos: number | null } }>({});


[Biome] reported by reviewdog 🐶

let files = Object.values(event.dataTransfer.items).map((item) => item.getAsFile()).filter((file) => file) as File[];
imageUpload(files, cursorPos)


[Biome] reported by reviewdog 🐶

console.log(event.clipboardData, "ペースト");


[Biome] reported by reviewdog 🐶

[imageUpload]


[Biome] reported by reviewdog 🐶

import { sessionStorage } from './session.server';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { S3Client } from '@aws-sdk/client-s3';


[Biome] reported by reviewdog 🐶

import { env } from './env.server';
import { UploadHandler } from '@remix-run/node';


[Biome] reported by reviewdog 🐶

import { v4 as uuidv4 } from 'uuid';


[Biome] reported by reviewdog 🐶

import { fileTypeFromBuffer, FileTypeResult } from 'file-type';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

LoaderFunctionArgs,


[Biome] reported by reviewdog 🐶

type MetaFunction,


[Biome] reported by reviewdog 🐶

import { getSocialIcon } from '~/lib/utils';
import { getBlogPost } from '../../../../lib/blog.server';


[Biome] reported by reviewdog 🐶

import { MemberCard } from '~/components/MemberCard';
import { Navbar } from '~/components/navbar';
import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { ActionFunctionArgs, unstable_parseMultipartFormData } from "@remix-run/node";
import { authenticator } from "~/lib/auth.server";
import { uploadHandler } from "~/lib/s3.server";


[Biome] reported by reviewdog 🐶

export async function action({ request, params }: ActionFunctionArgs) {
if (request.method !== 'POST') {return new Response(null, { status: 405 });}
const user = await authenticator.isAuthenticated(request, {
failureRedirect: '/login',


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

const formData = await unstable_parseMultipartFormData(
request,


[Biome] reported by reviewdog 🐶

return {urls, tacker: params.tracker};


[Biome] reported by reviewdog 🐶

import { useLoaderData } from "@remix-run/react";
import { ArticleCardWithLink } from "~/components/ArticleCard";
import { db } from "~/lib/db.server";


[Biome] reported by reviewdog 🐶

const posts = await db.post.findMany();
return posts;


[Biome] reported by reviewdog 🐶

const posts = useLoaderData<typeof loader>();
return (
<div>
<div className="text-2xl mb-16 text-center bg-white py-10">
最新の記事
</div>
<div className="grid gap-8 grid-cols-3 akari-container">
{posts.map((post) => (
<ArticleCardWithLink
key={post.title}
title={post.title}
emoji={"💩"}
classes={{ root: 'h-full' }}
slug={"aaa"}
dateDisplay={""}
/>
))}
</div>
</div>
);
}


[Biome] reported by reviewdog 🐶

import { getBlogPostListings } from '~/lib/blog.server';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { useFetcher, useLoaderData, useNavigation } from '@remix-run/react';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { useCallback, useEffect, useState } from 'react';
import { authenticator } from '~/lib/auth.server';
import { action as PreveiwAction } from './article+/preview';


[Biome] reported by reviewdog 🐶

import { useMarkdownEditor } from '~/hooks/md';
import { cn } from '~/lib/utils';
import { db } from '~/lib/db.server';
import { z } from 'zod';
import { parseWithZod } from '@conform-to/zod';
import { Post } from '@prisma/client';
import Loader from '~/components/Loader';


[Biome] reported by reviewdog 🐶

import { ClientOnly } from 'remix-utils/client-only';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { Navbar } from '~/components/navbar';


[Biome] reported by reviewdog 🐶

import { devErrorBoundary } from '@metronome-sh/dev-error-boundary';
import { flatRoutes } from 'remix-flat-routes';

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

Biome

[Biome] reported by reviewdog 🐶

import { getBlogPostListings } from '~/lib/blog.server';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { useFetcher, useLoaderData } from '@remix-run/react';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { useCallback, useEffect, useState } from 'react';
import { authenticator } from '~/lib/auth.server';
import { action as PreviewAction } from './article+/preview';


[Biome] reported by reviewdog 🐶

import { useMarkdownEditor } from '~/hooks/md';
import { cn } from '~/lib/utils';
import { db } from '~/lib/db.server';
import { z } from 'zod';
import { parseWithZod } from '@conform-to/zod';
import { Post } from '@prisma/client';
import Loader from '~/components/Loader';


[Biome] reported by reviewdog 🐶

import { ClientOnly } from 'remix-utils/client-only';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { Navbar } from '~/components/navbar';


[Biome] reported by reviewdog 🐶

import { devErrorBoundary } from '@metronome-sh/dev-error-boundary';
import { flatRoutes } from 'remix-flat-routes';

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

Biome

[Biome] reported by reviewdog 🐶

const posts = await db.post.findMany();
return posts;


[Biome] reported by reviewdog 🐶

const posts = useLoaderData<typeof loader>();
return (
<div>
<div className="text-2xl mb-16 text-center bg-white py-10">
最新の記事
</div>
<div className="grid gap-8 grid-cols-3 akari-container">
{posts.map((post) => (
<ArticleCardWithLink
key={post.title}
title={post.title}
emoji={"💩"}
classes={{ root: 'h-full' }}
slug={"aaa"}
dateDisplay={""}
/>
))}
</div>
</div>
);
}


[Biome] reported by reviewdog 🐶

import { getBlogPostListings } from '~/lib/blog.server';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { useFetcher, useLoaderData } from '@remix-run/react';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { useCallback, useEffect, useState } from 'react';
import { authenticator } from '~/lib/auth.server';
import { action as PreviewAction } from './article+/preview';


[Biome] reported by reviewdog 🐶

import { useMarkdownEditor } from '~/hooks/md';
import { cn } from '~/lib/utils';
import { db } from '~/lib/db.server';
import { z } from 'zod';
import { parseWithZod } from '@conform-to/zod';
import { Post } from '@prisma/client';
import Loader from '~/components/Loader';


[Biome] reported by reviewdog 🐶

import { ClientOnly } from 'remix-utils/client-only';


[Biome] reported by reviewdog 🐶


[Biome] reported by reviewdog 🐶

import { Footer } from '~/components/footer';


[Biome] reported by reviewdog 🐶

import { Navbar } from '~/components/navbar';


[Biome] reported by reviewdog 🐶

import { devErrorBoundary } from '@metronome-sh/dev-error-boundary';
import { flatRoutes } from 'remix-flat-routes';

@@ -0,0 +1,14 @@
// cc: https://github.com/shadcn-ui/ui/discussions/1694#discussioncomment-8167582

import { cn } from '~/lib/utils';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Biome] reported by reviewdog 🐶

Suggested change
import { cn } from '~/lib/utils';


import { cn } from '~/lib/utils';
import { Loader2 } from 'lucide-react';

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Biome] reported by reviewdog 🐶

Suggested change
import { cn } from '~/lib/utils';

Comment on lines +7 to +11
return (
<Loader2
className={cn('h-4 w-4 animate-spin', className)}
/>
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Biome] reported by reviewdog 🐶

Suggested change
return (
<Loader2
className={cn('h-4 w-4 animate-spin', className)}
/>
);
return <Loader2 className={cn('h-4 w-4 animate-spin', className)} />;

Comment on lines 13 to +15
import { cn } from '~/lib/utils';
import { Avatar } from './Avatar';
import { User } from '~/lib/auth.server';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Biome] reported by reviewdog 🐶

Suggested change
import { cn } from '~/lib/utils';
import { Avatar } from './Avatar';
import { User } from '~/lib/auth.server';

Comment on lines +155 to +156
<IconPencil />
記事の管理
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Biome] reported by reviewdog 🐶

Suggested change
<IconPencil />
記事の管理
<IconPencil />
記事の管理

import { db } from '~/lib/db.server';

export async function action() {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Biome] reported by reviewdog 🐶

Suggested change

Comment on lines +9 to +12

const foundPost = await db.post.findFirst({where: {
id: key
}});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Biome] reported by reviewdog 🐶

Suggested change
const foundPost = await db.post.findFirst({where: {
id: key
}});
const foundPost = await db.post.findFirst({
where: {
id: key,
},
});

}

return key;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Biome] reported by reviewdog 🐶

Suggested change
}
};


const postKey = await genKey();


Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Biome] reported by reviewdog 🐶

Suggested change

Comment on lines +1 to +3
import { useLoaderData } from "@remix-run/react";
import { ArticleCardWithLink } from "~/components/ArticleCard";
import { db } from "~/lib/db.server";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Biome] reported by reviewdog 🐶

Suggested change
import { useLoaderData } from "@remix-run/react";
import { ArticleCardWithLink } from "~/components/ArticleCard";
import { db } from "~/lib/db.server";
import { useLoaderData } from '@remix-run/react';
import { ArticleCardWithLink } from '~/components/ArticleCard';
import { db } from '~/lib/db.server';

@yupix yupix marked this pull request as ready for review November 3, 2024 10:40
@yupix yupix merged commit 97aa7f5 into master Nov 3, 2024
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪Enhance 機能の改善や強化 📓feature/ブログ ブログ機能に関するもの
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

記事をデータベースで管理する
2 participants