Update savedAt and publishedAt
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { useRouter } from 'next/router'
|
||||
import { Check, Moon, Sun, UserSwitch } from 'phosphor-react'
|
||||
import { ReactNode, useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import { Moon, Sun } from 'phosphor-react'
|
||||
import { ReactNode, useCallback, useState } from 'react'
|
||||
import { useGetViewerQuery } from '../../lib/networking/queries/useGetViewerQuery'
|
||||
import { currentThemeName, updateTheme } from '../../lib/themeUpdater'
|
||||
import { Avatar } from '../elements/Avatar'
|
||||
@ -13,10 +13,8 @@ import {
|
||||
} from '../elements/DropdownElements'
|
||||
import GridLayoutIcon from '../elements/images/GridLayoutIcon'
|
||||
import ListLayoutIcon from '../elements/images/ListLayoutIcon'
|
||||
import { Box, HStack, SpanBox, VStack } from '../elements/LayoutPrimitives'
|
||||
import { Separator } from '../elements/Separator'
|
||||
import { Box, HStack, VStack } from '../elements/LayoutPrimitives'
|
||||
import { StyledText } from '../elements/StyledText'
|
||||
import { DropdownMenu } from '../patterns/DropdownMenu'
|
||||
import { styled, theme, ThemeId } from '../tokens/stitches.config'
|
||||
import { LayoutType } from './homeFeed/HomeFeedContainer'
|
||||
|
||||
|
||||
@ -41,7 +41,8 @@ export function EditLibraryItemModal(
|
||||
title,
|
||||
description,
|
||||
byline: author,
|
||||
// savedAt: savedAt.toISOString(),
|
||||
savedAt: savedAt.toISOString(),
|
||||
publishedAt: publishedAt ? publishedAt.toISOString() : undefined,
|
||||
})
|
||||
|
||||
if (res) {
|
||||
@ -118,7 +119,8 @@ export function EditArticleModal(props: EditArticleModalProps): JSX.Element {
|
||||
title,
|
||||
description,
|
||||
byline: author,
|
||||
// savedAt: savedAt.toISOString(),
|
||||
savedAt: savedAt.toISOString(),
|
||||
publishedAt: publishedAt ? publishedAt.toISOString() : undefined,
|
||||
})
|
||||
if (res) {
|
||||
props.updateArticle(
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { useRef, useState } from 'react'
|
||||
import { Box, HStack, SpanBox, VStack } from '../../elements/LayoutPrimitives'
|
||||
import { Box, HStack, VStack } from '../../elements/LayoutPrimitives'
|
||||
import { theme } from '../../tokens/stitches.config'
|
||||
import { FormInput } from '../../elements/FormElements'
|
||||
import { searchBarCommands } from '../../../lib/keyboardShortcuts/navigationShortcuts'
|
||||
|
||||
@ -6,6 +6,8 @@ export type UpdatePageInput = {
|
||||
title: string
|
||||
byline?: string | undefined
|
||||
description: string
|
||||
savedAt?: string
|
||||
publishedAt?: string
|
||||
}
|
||||
|
||||
export async function updatePageMutation(
|
||||
@ -23,6 +25,7 @@ export async function updatePageMutation(
|
||||
author
|
||||
image
|
||||
description
|
||||
savedAt
|
||||
publishedAt
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user