Skip to content

Commit

Permalink
fix: date last modified iso format
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Oct 18, 2020
1 parent c7d719e commit 923141f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions core/store/src/create-pages/pages-paths.ts
Expand Up @@ -11,7 +11,6 @@ import {
TabConfiguration,
getDocPath,
getStoryPath,
dateToLocalString,
} from '@component-controls/core';

import { HomePageInfo } from '../types';
Expand All @@ -35,7 +34,9 @@ export const getIndexPage = (store: Store): HomePageInfo => {
? docStories[0]
: undefined;
return {
lastModified: dateToLocalString(homePage?.dateModified),
lastModified: homePage?.dateModified
? new Date(homePage?.dateModified).toISOString()
: undefined,
path: homePath,
storyId,
docId,
Expand Down Expand Up @@ -75,7 +76,9 @@ export const getHomePages = (store: Store): DocHomePagesPath[] => {
? docStories[0]
: undefined;
return {
lastModified: dateToLocalString(doc?.dateModified),
lastModified: doc?.dateModified
? new Date(doc?.dateModified).toISOString()
: undefined,
type,
path,
docId,
Expand Down Expand Up @@ -165,7 +168,9 @@ export const getDocPages = (store: Store): DocPagesPath[] => {
stories.forEach((storyId?: string) => {
const path = getStoryPath(storyId, doc, store, route);
docPaths.push({
lastModified: dateToLocalString(doc.dateModified),
lastModified: doc.dateModified
? new Date(doc.dateModified).toISOString()
: undefined,
path,
type: docType,
activeTab: route,
Expand Down

0 comments on commit 923141f

Please sign in to comment.