-
Notifications
You must be signed in to change notification settings - Fork 3
refactor: レイアウト整理・型共通化・メタデータおよびパフォーマンス改善 #387
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
Open
tanahiro2010
wants to merge
37
commits into
gakuseiBOT:main
Choose a base branch
from
tanahiro2010:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
d2cce8e
refactor: EngineerとDeveloperの表記をEngineerで統一。
tanahiro2010 642c609
style: interface順にメンバーデータのキーをソート
tanahiro2010 7466654
refactor: 各ページコンポーネントの名前を適切に修正
tanahiro2010 f021cd0
Merge branch 'main' into main
yuito-it b146332
feat: メンバーのロールとデータ構造を定義する形を追加
ae86af4
Merge branch 'gakuseiBOT:main' into main
tanahiro2010 dab68f7
feat: MemberData型を使用してBioCardコンポーネントのプロパティを定義
40ef3aa
feat: MemberData型を使用してメンバー情報を簡素化し、BioCardコンポーネントにプロパティを展開
686acb5
fix: 不要なReactインポートを削除
3e239c0
fix: アナウンスのURLを正しいドメインに修正
4a40f98
feat: UpdateDetailPageProps型を定義し、メタデータ生成関数を追加
dba4c4e
fix: 不要なReactインポートを削除
115a24c
Update src/app/member/page.tsx
tanahiro2010 51b3e5f
Update src/type/member.ts
tanahiro2010 5349c21
fix: 不要なインポートを削除
dc8412d
fix: 不要なインポート、未使用の変数を削除し、引数名を修正
29b093a
fix: generateMetadata関数でアップデートが見つからない場合の処理を追加
51deaa8
feat: メタデータを定義し、ページタイトルと説明を追加
2ad5ba7
feat: Viewport設定を追加し、Metadataインポートを修正
aa30e65
refactor: 不要なHeadインポートとviewportメタタグを削除
57ae79b
fix: 他のページのメタデータと競合しないように、templateを削除
70f6201
feat: Headerと同様に、FooterもコンポーネントとしてLayoutから切り出し
7f13384
feat: HeaderとFooterコンポーネントを見つけやすいようにlayoutディレクトリに移動
25e951d
fix: HeaderとFooterのインポートパスを修正
63dd8f0
refactor: 投稿取得処理と最近の投稿取得処理をPromise.allでまとめる
tanahiro2010 1fc3d99
fix: どちらも関数は非同期でなかったため、通常取得に修正
tanahiro2010 4ca662b
fix: 非同期ではなかったので、awaitを削除
tanahiro2010 9dacd85
refactor: index.module.cssをスタイル用ディレクトリに移動
tanahiro2010 9287c27
fix: ファイル移動に伴い、スタイルのインポートパスを修正
tanahiro2010 0ac257c
refactor: globals.cssをスタイル用ディレクトリに移動
tanahiro2010 1a140b4
fix: ファイルの移動に伴い、スタイルのインポートパスを修正
tanahiro2010 85f74d5
refactor: useCallbackを使用してformattedDateとformattedTypeを最適化
tanahiro2010 97e7f15
refactor: useMemoを使用してスライド設定を最適化
tanahiro2010 7a46734
refactor: TypeScriptの型定義を改善し、型の一貫性を向上
tanahiro2010 31e7d85
Merge branch 'gakuseiBOT:main' into main
tanahiro2010 2ab4e14
Apply suggestions from code review
tanahiro2010 5646cae
fix: updateがなかった時のエラーハンドリングを追加
tanahiro2010 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,25 @@ import html from 'remark-html'; | |
| import Link from 'next/link'; | ||
| import ArrowBackIcon from '@mui/icons-material/ArrowBack'; | ||
|
|
||
| export default async function UpdateDetailPage(props: { params: Promise<{ slug: string }> }) { | ||
| type UpdateDetailPageProps = { | ||
| params: Promise<{ slug: string }>; | ||
| } | ||
|
|
||
| export async function generateMetadata(props: UpdateDetailPageProps) { | ||
| const { slug } = await props.params; | ||
| const update = updates.find((u) => u.slug === slug); | ||
| if (!update) return { | ||
| title: "アップデートが見つかりませんでした" | ||
| } | ||
|
|
||
| if (!update) return { title: "更新情報が見つかりません" }; | ||
|
|
||
| return { | ||
| title: `${update.title} - ${update.date}`, | ||
| } | ||
| } | ||
|
Comment on lines
+16
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
🛠️ 修正案 export async function generateMetadata(props: UpdateDetailPageProps) {
const { slug } = await props.params;
const update = updates.find((u) => u.slug === slug);
+ if (!update) {
+ return {
+ title: '更新情報が見つかりません',
+ };
+ }
+
return {
- title: `${update?.title} - ${update?.date}`,
+ title: `${update.title} - ${update.date}`,
}
}🤖 Prompt for AI Agents |
||
|
|
||
| export default async function UpdateDetailPage(props: UpdateDetailPageProps) { | ||
| const { slug } = await props.params; | ||
|
|
||
| const update = updates.find((u) => u.slug === slug); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import Link from "next/link" | ||
|
|
||
| export default function Footer() { | ||
| return ( | ||
| <footer className="p-4 bg-gray-800 text-white w-full flex lg:flex-row flex-col items-center justify-center lg:justify-between relative"> | ||
| <Link | ||
| href={'https://github.com/gakuseiBOT/HP/graphs/contributors'} | ||
| className="text-center hover:text-blue mx-auto" | ||
| > | ||
| Copyright©2025 GakuseiBOTコミュニティ All Rights Reserved. See credits here. | ||
| </Link> | ||
| </footer> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.