Skip to content

Commit

Permalink
[C-3234] Update today date to include time so that tracks uploaded on…
Browse files Browse the repository at this point in the history
… the same day don't mix (#7335)
  • Loading branch information
Kyle-Shanks authored Jan 25, 2024
1 parent e467583 commit 8a38728
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ export const ReleaseDateTriggerLegacy = (
const initialValues = useMemo(() => {
return {
[RELEASE_DATE]:
trackReleaseDateState ??
moment(trackReleaseDateState).startOf('day').toString(),
trackReleaseDateState ?? moment(trackReleaseDateState).toString(),
[RELEASE_DATE_HOUR]: trackReleaseDateState
? moment(trackReleaseDateState).format('h:mm')
: moment().format('h:mm'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const ReleaseDateField = () => {

const initialValues = useMemo(() => {
return {
[RELEASE_DATE]: trackReleaseDate ?? moment().startOf('day').toString(),
[RELEASE_DATE]: trackReleaseDate ?? moment().toString(),
[RELEASE_DATE_HOUR]: trackReleaseDate
? moment(trackReleaseDate).format('h:mm')
: moment().format('h:mm'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const EditCollectionForm = (props: EditCollectionFormProps) => {
artwork: null,
playlist_name: '',
description: '',
release_date: moment().startOf('day').toString(),
release_date: moment().toString(),
trackDetails: {
genre: null,
mood: null,
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/pages/upload-page/forms/EditTrackForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const EditTrackForm = (props: EditTrackFormProps) => {
trackMetadatas: tracks.map((track) => ({
...track.metadata,
description: '',
releaseDate: new Date(moment().startOf('day').toString()),
releaseDate: new Date(moment().toString()),
tags: '',
field_visibility: {
...defaultHiddenFields,
Expand Down

0 comments on commit 8a38728

Please sign in to comment.