-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(deps): update dependency supabase to v2 * Develop (#51) * ci: 🎡 nextのバージョンを15に戻す * fix: 🐛 cache関連の記述 削除 * refactor: 💡 関数名を内容にあうように修正 * feat: 🎸 各ユーザのページをnext buildにてビルドするように * ci: 🎡 各種パッケージ更新 * ci: 🎡 push時にビルドチェックを走らせるのを辞める * refactor: 💡 不要な記述を削除 * feat: 🎸 ユーザのページをrevalidate出来るように * ServerActionとして動いていないバグを修正 * Develop (#54) * ci: 🎡 nextのバージョンを15に戻す * fix: 🐛 cache関連の記述 削除 * refactor: 💡 関数名を内容にあうように修正 * feat: 🎸 各ユーザのページをnext buildにてビルドするように * ci: 🎡 各種パッケージ更新 * ci: 🎡 push時にビルドチェックを走らせるのを辞める * refactor: 💡 不要な記述を削除 * feat: 🎸 ユーザのページをrevalidate出来るように * ServerActionとして動いていないバグを修正 * fix: 🐛 時差が発生するのを修正 (#52) * Feature/online (#53) * fix: 🐛 時差が発生するのを修正 * fix: 🐛 時差バグ 再修正 * refactor: 💡 300秒キャッシュ * fix: 🐛 時差バグ 本当の本当になおった * refactor: 💡 不要なimportを削除 * ci: 🎡 事前ビルド対象を直近30日内にプレイのあったユーザに限定 * chore: 🤖 キャッシュ時間設定 * chore: 🤖 キーワード・ページ名・キャッシュ時間を指定 ✅ Closes: #33 * v0.6.0 * chore(deps): update dependency eslint to v9 * chore(deps): update dependency eslint-config-prettier to v10 * chore(deps): update dependency @types/node to v22 * chore(deps): update dependency sass to v1.85.1 (#64) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency supabase to v2.15.8 (#65) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency react-toastify to v11.0.5 (#62) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update typescript-eslint monorepo to v8.25.0 (#63) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Merge/release (#67) * fix(deps): update dependency supabase to v2 * Develop (#51) * ci: 🎡 nextのバージョンを15に戻す * fix: 🐛 cache関連の記述 削除 * refactor: 💡 関数名を内容にあうように修正 * feat: 🎸 各ユーザのページをnext buildにてビルドするように * ci: 🎡 各種パッケージ更新 * ci: 🎡 push時にビルドチェックを走らせるのを辞める * refactor: 💡 不要な記述を削除 * feat: 🎸 ユーザのページをrevalidate出来るように * ServerActionとして動いていないバグを修正 * Develop (#54) * ci: 🎡 nextのバージョンを15に戻す * fix: 🐛 cache関連の記述 削除 * refactor: 💡 関数名を内容にあうように修正 * feat: 🎸 各ユーザのページをnext buildにてビルドするように * ci: 🎡 各種パッケージ更新 * ci: 🎡 push時にビルドチェックを走らせるのを辞める * refactor: 💡 不要な記述を削除 * feat: 🎸 ユーザのページをrevalidate出来るように * ServerActionとして動いていないバグを修正 * fix: 🐛 時差が発生するのを修正 (#52) * Feature/online (#53) * fix: 🐛 時差が発生するのを修正 * fix: 🐛 時差バグ 再修正 * refactor: 💡 300秒キャッシュ * fix: 🐛 時差バグ 本当の本当になおった * refactor: 💡 不要なimportを削除 * ci: 🎡 事前ビルド対象を直近30日内にプレイのあったユーザに限定 * chore: 🤖 キャッシュ時間設定 * chore: 🤖 キーワード・ページ名・キャッシュ時間を指定 ✅ Closes: #33 * v0.6.0 * chore(deps): update dependency eslint to v9 * chore(deps): update dependency eslint-config-prettier to v10 * chore(deps): update dependency @types/node to v22 * Hotfix/invalid multibytes tags (#58) * fix: 🐛 Revalidateでマルチバイト文字を指定してはいけない * fix: 🐛 各種パラメータがundefinedになるのを修正 * v0.6.1 * Hotfix/sns image (#59) * chore: 🤖 metadataBaseをexport * refactor: 💡 不要なコードを削除 * v0.6.2 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * feat: 🎸 player/id/[id]を実装 (#68) * feat: 🎸 player/id/[id]を実装 ユーザ名のページにアクセスしたらIDのページに転送 * feat: 🎸 更新したらリロードさせる * fix: 🐛 ステージの表示名を修正 * feat: 🎸 オンラインページを更新 * ci: 🎡 パッケージの更新 * Update package.json (#71) --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information
1 parent
f7a12dd
commit 92aca5b
Showing
13 changed files
with
525 additions
and
1,221 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
@@ -1,36 +1,23 @@ | ||
import { Metadata } from 'next' | ||
import { notFound, redirect } from 'next/navigation' | ||
|
||
import { PlayerPage } from '@/features/player' | ||
import { fetchAchievement } from '@/service/supabase/achievement' | ||
import { fetchPlayer, fetchRecentPlayedPlayersName } from '@/service/supabase/player' | ||
import { getPlayerIdByName } from '@/service/supabase/player' | ||
|
||
interface PageProps { | ||
params: Promise<{ name: string }> | ||
} | ||
|
||
export const revalidate = 86400 // 丸一日キャッシュする | ||
export const dynamicParams = true | ||
|
||
export async function generateStaticParams() { | ||
const players = await fetchRecentPlayedPlayersName() | ||
return players.map(name => ({ name })) | ||
export const metadata: Metadata = { | ||
robots: { index: false }, | ||
} | ||
|
||
export async function generateMetadata({ params }: PageProps): Promise<Metadata> { | ||
const name = decodeURI((await params).name) | ||
|
||
return { | ||
title: `${name}さんのページ`, | ||
description: `${name}さんの記録を閲覧します`, | ||
} | ||
interface PageProps { | ||
params: Promise<{ name: string }> | ||
} | ||
|
||
export default async function Page({ params }: PageProps) { | ||
const name = decodeURI((await params).name) | ||
if (!name) return | ||
|
||
const player = await fetchPlayer(name) | ||
const achievement = (await fetchAchievement(player.records[0]?.achievement)) ?? undefined | ||
const id = await getPlayerIdByName(name) | ||
|
||
return player ? <PlayerPage player={player} achievement={achievement} /> : <></> | ||
if (id) { | ||
redirect(`/player/id/${id}`) | ||
} else { | ||
notFound() | ||
} | ||
} |
This file contains 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,35 @@ | ||
import { Metadata } from 'next' | ||
|
||
import { PlayerPage } from '@/features/player' | ||
import { fetchAchievement } from '@/service/supabase/achievement' | ||
import { fetchPlayer, fetchRecentPlayedPlayersId } from '@/service/supabase/player' | ||
|
||
interface PageProps { | ||
params: Promise<{ id: string }> | ||
} | ||
|
||
export const revalidate = 86400 // 丸一日キャッシュする | ||
export const dynamicParams = true | ||
|
||
export async function generateStaticParams() { | ||
const players = await fetchRecentPlayedPlayersId() | ||
return players.map(id => ({ id: `${id}` })) | ||
} | ||
|
||
export async function generateMetadata({ params }: PageProps): Promise<Metadata> { | ||
const { name } = await fetchPlayer(parseInt((await params).id)) | ||
return { | ||
title: `${name}さんのページ`, | ||
description: `${name}さんの記録を閲覧します`, | ||
robots: { | ||
index: false, | ||
}, | ||
} | ||
} | ||
|
||
export default async function Page({ params }: PageProps) { | ||
const player = await fetchPlayer(parseInt((await params).id)) | ||
const achievement = (await fetchAchievement(player.records[0].achievement)) ?? undefined | ||
|
||
return player ? <PlayerPage player={player} achievement={achievement} /> : <></> | ||
} |
This file contains 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 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 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 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 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 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 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,53 @@ | ||
import classNames from 'classnames' | ||
import { format, isWithinInterval, parseISO } from 'date-fns' | ||
|
||
import { fetchSchedule } from '@/service/supabase/schedule' | ||
|
||
export const ScheduleTable = async () => { | ||
const schedule = await fetchSchedule() | ||
return ( | ||
<> | ||
<table className="min-w-full divide-y divide-gray-200 rounded-lg"> | ||
<thead className="bg-orange-300"> | ||
<tr> | ||
<th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-center"> | ||
日付 | ||
</th> | ||
<th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-center"> | ||
偶数 | ||
</th> | ||
<th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-center"> | ||
奇数 | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody className="bg-white divide-y divide-gray-200"> | ||
{schedule.slice(-4).map(table => { | ||
const isActiveTerm = isWithinInterval(new Date(), { | ||
start: parseISO(table.started_at!), | ||
end: parseISO(table.ended_at!), | ||
}) | ||
return ( | ||
<tr | ||
key={table.id} | ||
className={classNames({ | ||
['bg-amber-200']: isActiveTerm, | ||
})} | ||
> | ||
<td className="text-center py-2 items-center gap-2 justify-center"> | ||
{format(table.started_at!, 'MM/dd')} ~ {format(table.ended_at!, 'MM/dd')} | ||
</td> | ||
<td className="text-center py-2 items-center gap-2 justify-center"> | ||
{table.even_time} | ||
</td> | ||
<td className="text-center py-2 items-center gap-2 justify-center"> | ||
{table.odd_time} | ||
</td> | ||
</tr> | ||
) | ||
})} | ||
</tbody> | ||
</table> | ||
</> | ||
) | ||
} |
This file contains 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 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