Fix create page serverside vs clientside render discrepancy console error
This commit is contained in:
parent
a040df2732
commit
a9ea335cd1
|
@ -1,2 +1,3 @@
|
||||||
export const HOUR_MS = 60 * 60 * 1000
|
export const MINUTE_MS = 60 * 1000
|
||||||
|
export const HOUR_MS = 60 * MINUTE_MS
|
||||||
export const DAY_MS = 24 * HOUR_MS
|
export const DAY_MS = 24 * HOUR_MS
|
||||||
|
|
|
@ -33,6 +33,7 @@ import { redirectIfLoggedOut } from 'web/lib/firebase/server-auth'
|
||||||
import { Title } from 'web/components/title'
|
import { Title } from 'web/components/title'
|
||||||
import { SEO } from 'web/components/SEO'
|
import { SEO } from 'web/components/SEO'
|
||||||
import { MultipleChoiceAnswers } from 'web/components/answers/multiple-choice-answers'
|
import { MultipleChoiceAnswers } from 'web/components/answers/multiple-choice-answers'
|
||||||
|
import { MINUTE_MS } from 'common/util/time'
|
||||||
|
|
||||||
export const getServerSideProps = redirectIfLoggedOut('/', async (_, creds) => {
|
export const getServerSideProps = redirectIfLoggedOut('/', async (_, creds) => {
|
||||||
return { props: { auth: await getUserAndPrivateUser(creds.user.uid) } }
|
return { props: { auth: await getUserAndPrivateUser(creds.user.uid) } }
|
||||||
|
@ -427,7 +428,7 @@ export function NewContract(props: {
|
||||||
className="input input-bordered mt-4"
|
className="input input-bordered mt-4"
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
onChange={(e) => setCloseDate(e.target.value)}
|
onChange={(e) => setCloseDate(e.target.value)}
|
||||||
min={Date.now()}
|
min={Math.round(Date.now() / MINUTE_MS) * MINUTE_MS}
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
value={closeDate}
|
value={closeDate}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user