refactor(guides) : consolidate duplicate guide and Stygian logic

This commit is contained in:
2026-10-07 01:41:13 +07:00 Unverified
parent 3c8f60433a
commit b35c1a4471
17 changed files with 268 additions and 171 deletions
+3 -24
View File
@@ -10,6 +10,7 @@ import { AdminHeader } from "@/components/admin/admin-header";
import { EditorPresence } from "@/components/admin/editor-presence";
import { Button } from "@/components/ui/button";
import { getAdminSession } from "@/lib/auth/server";
import { toTeamDraft } from "@/lib/guides/team-draft";
import {
getCatalogOptions,
getAdminGuideContent,
@@ -135,18 +136,7 @@ export default async function StructuredEditorPage({
})),
teams: content.teams.map((team) => ({
id: team.id,
title: team.title,
rotationSeconds: team.rotationSeconds,
combo: team.combo,
members: team.members.map((member) => ({
characterKey: member.characterKey,
weaponKey: member.weaponKey,
artifactKey: member.artifactKey,
secondArtifactKey: member.secondArtifactKey,
constellation: member.constellation,
refinement: member.refinement,
damage: member.damage,
})),
...toTeamDraft(team),
})),
teamGroups: content.teamGroups.map((group) => ({
id: group.id,
@@ -156,18 +146,7 @@ export default async function StructuredEditorPage({
iconUrl: group.iconUrl,
teams: group.teams.map((team) => ({
id: team.id,
title: team.title,
rotationSeconds: team.rotationSeconds,
combo: team.combo,
members: team.members.map((member) => ({
characterKey: member.characterKey,
weaponKey: member.weaponKey,
artifactKey: member.artifactKey,
secondArtifactKey: member.secondArtifactKey,
constellation: member.constellation,
refinement: member.refinement,
damage: member.damage,
})),
...toTeamDraft(team),
})),
})),
extras: content.extras.filter((section) => !extraSection || section.id === extraSection.id).map((section) => ({