Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #522 from true-runes/development
Browse files Browse the repository at this point in the history
v17.3.0
  • Loading branch information
nikukyugamer committed Jun 23, 2022
2 parents 2522b2a + 91c79ac commit 77fc299
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 187 deletions.
35 changes: 35 additions & 0 deletions components/humberger-menu/GeneralInformation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import Link from 'next/link'

export const GeneralInformation = () => {
return (
<>
<div className="collapse collapse-arrow">
<input type="checkbox" className="peer" />

<div className="collapse-title pl-0">
<div>各種情報</div>
</div>

<div className="collapse-content">
<div>
<Link
href="/events-in-event/result-illustration-applications"
passHref
>
<span className="link link-hover">開票イラスト応募状況</span>
</Link>
</div>
<div className="my-4" />
<div>
<Link
href="/events-in-event/novels-on-themes-application-results"
passHref
>
<span className="link link-hover">「お題」募集結果</span>
</Link>
</div>
</div>
</div>
</>
)
}
8 changes: 5 additions & 3 deletions components/humberger-menu/HumbergerNavigation.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { push as Menu } from 'react-burger-menu'
import Link from 'next/link'
import PreviousWebsites from '@/components/humberger-menu/PreviousWebsites'
import { PreviousWebsites } from '@/components/humberger-menu/PreviousWebsites'
import { GeneralInformation } from '@/components/humberger-menu/GeneralInformation'
import { useLocale } from '@/hooks/useLocale'
// import useTranslation from 'next-translate/useTranslation'

const Navigation = () => {
const { t, locale } = useLocale()
// const { t } = useTranslation('')

return (
<div id="outer-container">
Expand Down Expand Up @@ -127,6 +126,9 @@ const Navigation = () => {
</div>
</div>
</div>
<div className="text-lg">
<GeneralInformation />
</div>
<div className="text-lg">
<PreviousWebsites />
</div>
Expand Down
4 changes: 1 addition & 3 deletions components/humberger-menu/PreviousWebsiteLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const PreviousWebsiteLink = (props: any) => {
export const PreviousWebsiteLink = (props: any) => {
return (
<div className="py-2">
<a
Expand Down Expand Up @@ -34,5 +34,3 @@ const PreviousWebsiteLink = (props: any) => {
</div>
)
}

export default PreviousWebsiteLink
8 changes: 2 additions & 6 deletions components/humberger-menu/PreviousWebsites.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import PreviousWebsiteLink from '@/components/humberger-menu/PreviousWebsiteLink'
import { PreviousWebsiteLink } from '@/components/humberger-menu/PreviousWebsiteLink'
import { useLocale } from '@/hooks/useLocale'
// import useTranslation from 'next-translate/useTranslation'

const PreviousWebsites = () => {
export const PreviousWebsites = () => {
const { t, locale } = useLocale()
// const { t } = useTranslation('')

const previousWebsiteNamesAndUrls = [
{
Expand Down Expand Up @@ -58,5 +56,3 @@ const PreviousWebsites = () => {
</>
)
}

export default PreviousWebsites
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"@types/styled-components": "^5.1.25",
"autoprefixer": "10.4.7",
"axios": "^0.27.2",
"cypress": "10.1.0",
"daisyui": "2.15.4",
"cypress": "10.2.0",
"daisyui": "2.17.0",
"dayjs": "^1.11.3",
"eslint": "8.18.0",
"eslint-config-next": "12.1.6",
"eslint-config-prettier": "^8.5.0",
Expand All @@ -33,13 +34,13 @@
"prettier": "2.7.1",
"react-burger-menu": "3.0.8",
"react-twitter-embed": "^4.0.4",
"sass": "1.52.3",
"sharp": "^0.30.6",
"sass": "1.53.0",
"sharp": "0.30.7",
"styled-components": "^5.3.5",
"stylelint": "14.9.1",
"stylelint-config-standard": "26.0.0",
"stylelint-order": "^5.0.0",
"tailwindcss": "3.1.3",
"tailwindcss": "3.1.4",
"typescript": "4.7.4",
"wait-on": "^6.0.1"
},
Expand Down
22 changes: 21 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React from 'react'
import Image from 'next/image'
import type { NextPage } from 'next'
import { useState, useEffect } from 'react'
import dayjs from 'dayjs'
import ja from 'dayjs/locale/ja'
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'

import HumbergerNavigation from '@/components/humberger-menu/HumbergerNavigation'

Expand All @@ -26,9 +30,25 @@ import { useLocale } from '@/hooks/useLocale'
import useTranslation from 'next-translate/useTranslation'

const Home: NextPage = () => {
dayjs.locale(ja)
dayjs.extend(isSameOrAfter)

const { t } = useLocale()
const { lang } = useTranslation()

const [isDuringVoteTerm, setIsDuringVoteTerm] = useState(false)

useEffect(() => {
const dayjsCurrentDateTime = dayjs(
new Date().toLocaleString('ja-JP', { timeZone: 'Asia/Tokyo' })
)
const dayjsVoteStartDateTime = dayjs('2022-06-24 21:00:00')

setIsDuringVoteTerm(
dayjsCurrentDateTime.isSameOrAfter(dayjsVoteStartDateTime)
)
}, [])

return (
<div className="bg-white text-black">
<title>{`${t.PAGE_TITLE_HOME} - ${t.WEBSITE_TITLE}`}</title>
Expand Down Expand Up @@ -98,7 +118,7 @@ const Home: NextPage = () => {
</div>

{/* 投票開始とともに開く */}
{false && (
{isDuringVoteTerm && (
<div id="about-check-vote-card" className="-mt-32 pt-32">
<AboutCheckVoteCard />
</div>
Expand Down
Loading

0 comments on commit 77fc299

Please sign in to comment.