refactor(guides) : consolidate duplicate guide and Stygian logic
This commit is contained in:
@@ -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) => ({
|
||||
|
||||
Reference in New Issue
Block a user