Skip to content

Commit

Permalink
chore: move constexpr out of FC
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjunyu19 committed Jul 30, 2022
1 parent ece32e4 commit 7988289
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GZCTF/ClientApp/src/pages/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import LogoHeader from '../components/LogoHeader'
import WithNavBar from '../components/WithNavbar'
import MainIcon from '../components/icon/MainIcon'

const MODULE_LOAD_DATE = new Date()
const sha = import.meta.env.VITE_APP_GIT_SHA ?? '000000'
const tag = import.meta.env.VITE_APP_GIT_NAME ?? 'develop'
const timestamp = import.meta.env.VITE_APP_BUILD_TIMESTAMP ?? '2022-07-23T12:00:00+08:00'
const builtdate = import.meta.env.DEV ? new Date() : new Date(timestamp)

const dateTimeFormat = new Intl.DateTimeFormat(undefined, { dateStyle: 'long', timeStyle: 'long' })

const useStyles = createStyles((theme) => ({
Expand All @@ -14,10 +18,6 @@ const useStyles = createStyles((theme) => ({
}))

const About: FC = () => {
const sha = import.meta.env.VITE_APP_GIT_SHA ?? '000000'
const tag = import.meta.env.VITE_APP_GIT_NAME ?? 'develop'
const timestamp = import.meta.env.VITE_APP_BUILD_TIMESTAMP ?? '2022-07-23T12:00:00+08:00'
const builtdate = import.meta.env.DEV ? MODULE_LOAD_DATE : new Date(timestamp)
const { classes } = useStyles()

return (
Expand Down

0 comments on commit 7988289

Please sign in to comment.