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

Develop #148

Merged
merged 39 commits into from
Feb 22, 2025
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9175697
プロフィールにいろいろ
natanata25 Feb 21, 2025
4bc4650
Merge branch 'develop' of https://github.com/kc3hack/2025_10 into Pro…
natanata25 Feb 21, 2025
084654a
Lottie動かない問題
RAIT-09 Feb 21, 2025
6903520
サイドメニューから設定削除
RAIT-09 Feb 21, 2025
a1b1c89
システムプロンプト修正 拗音(ゃゅょ)は1音として扱わない
yone-al Feb 21, 2025
5943272
ニュースを取得する関数
yone-al Feb 22, 2025
49fd775
Tankalizerロゴクリックでタイムライン遷移
RAIT-09 Feb 22, 2025
74e9a6f
詠ボタンをタイムライン以外にも表示
RAIT-09 Feb 22, 2025
67e2b51
getOnePost APIの追加
TARO-gh Feb 22, 2025
a24e975
Merge remote-tracking branch 'origin/taro/develop' into RAIT-09/featu…
RAIT-09 Feb 22, 2025
4777fb9
Merge remote-tracking branch 'origin/taro/develop' into RAIT-09/featu…
RAIT-09 Feb 22, 2025
be920fd
getOnePost APIの修正
TARO-gh Feb 22, 2025
9ea90e1
Merge remote-tracking branch 'origin/taro/develop' into RAIT-09/featu…
RAIT-09 Feb 22, 2025
9313232
NewsのAPI(仮)をdocsに追加
yone-al Feb 22, 2025
0cbc101
共有機能フロント
RAIT-09 Feb 22, 2025
a5bf07a
env example追加
ABfry Feb 22, 2025
c9e53f8
大きさ変更に対応
natanata25 Feb 22, 2025
97d3289
投稿取得中表示とハンバーガー戻し
RAIT-09 Feb 22, 2025
b46bbc2
Merge pull request #141 from kc3hack/RAIT-09/feature/postpage
RAIT-09 Feb 22, 2025
2b55c49
Merge branch 'develop' of https://github.com/kc3hack/2025_10 into Pro…
natanata25 Feb 22, 2025
a63ee3d
news投稿
ABfry Feb 22, 2025
957320a
Merge pull request #142 from kc3hack/Profilr_UI
natanata25 Feb 22, 2025
b5b862f
私たちのアカウントか判定
TARO-gh Feb 22, 2025
c84dec2
Merge pull request #143 from kc3hack/taro/develop
TARO-gh Feb 22, 2025
773ee73
動的ルーティングNotFound一旦対応
RAIT-09 Feb 22, 2025
4ca2589
投稿単独ページで投稿を削除した場合にタイムラインに遷移
RAIT-09 Feb 22, 2025
707a9cd
Merge branch 'develop' into RAIT-09/develop
RAIT-09 Feb 22, 2025
51f21b5
スキーマ例修正
yone-al Feb 22, 2025
17a8c36
Revert "スキーマ例修正"
yone-al Feb 22, 2025
276ab71
スキーマ例修正
yone-al Feb 22, 2025
b9afe3b
NEWS_USER_ICON環境変数
yone-al Feb 22, 2025
fd9a508
NEWS_USER_ICONー>NEWS_USER_ID
yone-al Feb 22, 2025
5fb7e7e
動的ルーティングページのNotFound改善
RAIT-09 Feb 22, 2025
8480708
Merge branch 'develop' into yone/develop
yone-al Feb 22, 2025
3b2af87
動的ルーティングページのNotFound改善
RAIT-09 Feb 22, 2025
a254154
帽子追加
natanata25 Feb 22, 2025
fe69cb0
Merge pull request #147 from kc3hack/Profilr_UI
ABfry Feb 22, 2025
4c94349
Merge pull request #146 from kc3hack/RAIT-09/develop
ABfry Feb 22, 2025
cfe3f21
Merge pull request #140 from kc3hack/yone/develop
ABfry Feb 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
動的ルーティングページのNotFound改善
RAIT-09 committed Feb 22, 2025
commit 3b2af87c7e32f54052a3c374f4adafa17f4721fc
9 changes: 2 additions & 7 deletions frontend/src/app/(main)/post/[postId]/page.tsx
Original file line number Diff line number Diff line change
@@ -22,23 +22,18 @@ const PostPage = () => {

// 投稿IDから投稿をFetchする
useEffect(() => {
let isMounted = true;
const getPost = async () => {
if (!postId) return;
if (session.status === 'loading') return;
if (post) return;
const data = await fetchOnePost({
postId: postId as string,
iconUrl: session.data?.user?.image ?? '',
});
if (!isMounted) return;
if (!data) router.push('/post-not-found');
setPost(data);
};
getPost();
return () => {
isMounted = false;
};
}, [postId, session.data?.user?.image, session.status, router, post]);
}, [postId, session.data?.user?.image, session.status, router]);

return (
<div>
9 changes: 2 additions & 7 deletions frontend/src/app/(main)/profile/[userId]/page.tsx
Original file line number Diff line number Diff line change
@@ -19,19 +19,14 @@ const Profile = () => {

// ユーザIDからプロフィールをFetchする
useEffect(() => {
let isMounted = true;
const getProfile = async () => {
if (profile) return;
if (!userId) return;
const data = await fetchProfile({ userId: userId as string });
if (!isMounted) return;
if (!data) router.push('/user-not-found');
setProfile(data);
};
getProfile();
return () => {
isMounted = false;
};
}, [userId, router, profile]);
}, [userId, router]);

// totalPost に応じた背景色のクラスを決定
const getBackgroundClass = () => {