feat(nextjs): Custom layout name instead of id

This commit is contained in:
shiva raj badu 2025-09-22 17:29:36 +05:45
parent c64cc86684
commit e737a3b5a4
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ const TemplateSelection: React.FC<TemplateSelectionProps> = ({
const map: Record<string, { lastUpdatedAt?: number; name?: string; description?: string }> = {};
if (data && Array.isArray(data.presentations)) {
for (const p of data.presentations) {
const slug = `custom-${p.presentation}`;
const slug = `custom-${p.presentation_id}`;
map[slug] = {
lastUpdatedAt: p.last_updated_at ? new Date(p.last_updated_at).getTime() : 0,
name: p.template?.name,

View file

@ -46,7 +46,7 @@ const LayoutPreview = () => {
const map: Record<string, { lastUpdatedAt?: number; name?: string; description?: string }> = {};
if (data && Array.isArray(data.presentations)) {
for (const p of data.presentations) {
const slug = `custom-${p.presentation}`;
const slug = `custom-${p.presentation_id}`;
map[slug] = {
lastUpdatedAt: p.last_updated_at ? new Date(p.last_updated_at).getTime() : 0,
name: p.template?.name,