Skip to content

Commit

Permalink
feat: CodeAreaコンポーネントに置き換え
Browse files Browse the repository at this point in the history
  • Loading branch information
SatooRu65536 committed Nov 5, 2024
1 parent 84a5254 commit 6106f38
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/app/(use-header)/codes/_components/view/Page/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use client';

import styles from './index.module.scss';
import CodeArea from '@/components/CodeArea';
import { type Post } from '@/types/post';

const articles: Post[] = [
Expand Down Expand Up @@ -119,7 +118,7 @@ function Card({ post }: CardProps) {
))}
</div>
<p>{post.description}</p>
<p>{post.code}</p>
<CodeArea code={post.code} language={post.language.name.toLowerCase()} />
<div className={styles.userAndValue}>
<div className={styles.user}>
<img
Expand Down
5 changes: 2 additions & 3 deletions src/app/(use-header)/mypage/_components/view/Page/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use client';

import styles from './index.module.scss';
import CodeArea from '@/components/CodeArea';
import { type Post } from '@/types/post';

const articles: Post[] = [
Expand Down Expand Up @@ -109,7 +108,7 @@ export default function Page() {
<p>{post.description}</p>
<details>
<summary>Code</summary>
<p>{post.code}</p>
<CodeArea code={post.code} language={post.language.name.toLowerCase()} />
</details>
<div className={styles.score_box}>
<div className={styles.kuso_box}>
Expand Down
3 changes: 1 addition & 2 deletions src/app/(use-header)/mypage/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// src/app/post/page.tsx
import TopPage from './_components/view/Page'; // 本来はロジックのコンポーネントが来る
import TopPage from './_components/view/Page';

export default function Page() {
return <TopPage />;
Expand Down

0 comments on commit 6106f38

Please sign in to comment.