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

Commit 74877c1

Browse files
committed
Merge branch 'development' into feat/add_unite-attacks-list_page
2 parents 2578eac + 91c79ac commit 74877c1

File tree

7 files changed

+75
-18
lines changed

7 files changed

+75
-18
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import Link from 'next/link'
2+
3+
export const GeneralInformation = () => {
4+
return (
5+
<>
6+
<div className="collapse collapse-arrow">
7+
<input type="checkbox" className="peer" />
8+
9+
<div className="collapse-title pl-0">
10+
<div>各種情報</div>
11+
</div>
12+
13+
<div className="collapse-content">
14+
<div>
15+
<Link
16+
href="/events-in-event/result-illustration-applications"
17+
passHref
18+
>
19+
<span className="link link-hover">開票イラスト応募状況</span>
20+
</Link>
21+
</div>
22+
<div className="my-4" />
23+
<div>
24+
<Link
25+
href="/events-in-event/novels-on-themes-application-results"
26+
passHref
27+
>
28+
<span className="link link-hover">「お題」募集結果</span>
29+
</Link>
30+
</div>
31+
</div>
32+
</div>
33+
</>
34+
)
35+
}

components/humberger-menu/HumbergerNavigation.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { push as Menu } from 'react-burger-menu'
22
import Link from 'next/link'
3-
import PreviousWebsites from '@/components/humberger-menu/PreviousWebsites'
3+
import { PreviousWebsites } from '@/components/humberger-menu/PreviousWebsites'
4+
import { GeneralInformation } from '@/components/humberger-menu/GeneralInformation'
45
import { useLocale } from '@/hooks/useLocale'
5-
// import useTranslation from 'next-translate/useTranslation'
66

77
const Navigation = () => {
88
const { t, locale } = useLocale()
9-
// const { t } = useTranslation('')
109

1110
return (
1211
<div id="outer-container">
@@ -127,6 +126,9 @@ const Navigation = () => {
127126
</div>
128127
</div>
129128
</div>
129+
<div className="text-lg">
130+
<GeneralInformation />
131+
</div>
130132
<div className="text-lg">
131133
<PreviousWebsites />
132134
</div>

components/humberger-menu/PreviousWebsiteLink.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const PreviousWebsiteLink = (props: any) => {
1+
export const PreviousWebsiteLink = (props: any) => {
22
return (
33
<div className="py-2">
44
<a
@@ -34,5 +34,3 @@ const PreviousWebsiteLink = (props: any) => {
3434
</div>
3535
)
3636
}
37-
38-
export default PreviousWebsiteLink

components/humberger-menu/PreviousWebsites.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import PreviousWebsiteLink from '@/components/humberger-menu/PreviousWebsiteLink'
1+
import { PreviousWebsiteLink } from '@/components/humberger-menu/PreviousWebsiteLink'
22
import { useLocale } from '@/hooks/useLocale'
3-
// import useTranslation from 'next-translate/useTranslation'
43

5-
const PreviousWebsites = () => {
4+
export const PreviousWebsites = () => {
65
const { t, locale } = useLocale()
7-
// const { t } = useTranslation('')
86

97
const previousWebsiteNamesAndUrls = [
108
{
@@ -58,5 +56,3 @@ const PreviousWebsites = () => {
5856
</>
5957
)
6058
}
61-
62-
export default PreviousWebsites

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"axios": "^0.27.2",
2121
"cypress": "10.2.0",
2222
"daisyui": "2.17.0",
23+
"dayjs": "^1.11.3",
2324
"eslint": "8.18.0",
2425
"eslint-config-next": "12.1.6",
2526
"eslint-config-prettier": "^8.5.0",
@@ -33,7 +34,7 @@
3334
"prettier": "2.7.1",
3435
"react-burger-menu": "3.0.8",
3536
"react-twitter-embed": "^4.0.4",
36-
"sass": "1.52.3",
37+
"sass": "1.53.0",
3738
"sharp": "0.30.7",
3839
"styled-components": "^5.3.5",
3940
"stylelint": "14.9.1",

pages/index.tsx

+21-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import React from 'react'
22
import Image from 'next/image'
33
import type { NextPage } from 'next'
4+
import { useState, useEffect } from 'react'
5+
import dayjs from 'dayjs'
6+
import ja from 'dayjs/locale/ja'
7+
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'
48

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

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

2832
const Home: NextPage = () => {
33+
dayjs.locale(ja)
34+
dayjs.extend(isSameOrAfter)
35+
2936
const { t } = useLocale()
3037
const { lang } = useTranslation()
3138

39+
const [isDuringVoteTerm, setIsDuringVoteTerm] = useState(false)
40+
41+
useEffect(() => {
42+
const dayjsCurrentDateTime = dayjs(
43+
new Date().toLocaleString('ja-JP', { timeZone: 'Asia/Tokyo' })
44+
)
45+
const dayjsVoteStartDateTime = dayjs('2022-06-24 21:00:00')
46+
47+
setIsDuringVoteTerm(
48+
dayjsCurrentDateTime.isSameOrAfter(dayjsVoteStartDateTime)
49+
)
50+
}, [])
51+
3252
return (
3353
<div className="bg-white text-black">
3454
<title>{`${t.PAGE_TITLE_HOME} - ${t.WEBSITE_TITLE}`}</title>
@@ -98,7 +118,7 @@ const Home: NextPage = () => {
98118
</div>
99119

100120
{/* 投票開始とともに開く */}
101-
{false && (
121+
{isDuringVoteTerm && (
102122
<div id="about-check-vote-card" className="-mt-32 pt-32">
103123
<AboutCheckVoteCard />
104124
</div>

yarn.lock

+9-4
Original file line numberDiff line numberDiff line change
@@ -2194,6 +2194,11 @@ dayjs@^1.10.4:
21942194
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.0.tgz#009bf7ef2e2ea2d5db2e6583d2d39a4b5061e805"
21952195
integrity sha512-JLC809s6Y948/FuCZPm5IX8rRhQwOiyMb2TfVVQEixG7P8Lm/gt5S7yoQZmC8x1UehI9Pb7sksEt4xx14m+7Ug==
21962196

2197+
dayjs@^1.11.3:
2198+
version "1.11.3"
2199+
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.3.tgz#4754eb694a624057b9ad2224b67b15d552589258"
2200+
integrity sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A==
2201+
21972202
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4:
21982203
version "4.3.4"
21992204
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
@@ -5346,10 +5351,10 @@ safe-buffer@~5.1.1:
53465351
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
53475352
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
53485353

5349-
sass@1.52.3:
5350-
version "1.52.3"
5351-
resolved "https://registry.yarnpkg.com/sass/-/sass-1.52.3.tgz#b7cc7ffea2341ccc9a0c4fd372bf1b3f9be1b6cb"
5352-
integrity sha512-LNNPJ9lafx+j1ArtA7GyEJm9eawXN8KlA1+5dF6IZyoONg1Tyo/g+muOsENWJH/2Q1FHbbV4UwliU0cXMa/VIA==
5354+
sass@1.53.0:
5355+
version "1.53.0"
5356+
resolved "https://registry.yarnpkg.com/sass/-/sass-1.53.0.tgz#eab73a7baac045cc57ddc1d1ff501ad2659952eb"
5357+
integrity sha512-zb/oMirbKhUgRQ0/GFz8TSAwRq2IlR29vOUJZOx0l8sV+CkHUfHa4u5nqrG+1VceZp7Jfj59SVW9ogdhTvJDcQ==
53535358
dependencies:
53545359
chokidar ">=3.0.0 <4.0.0"
53555360
immutable "^4.0.0"

0 commit comments

Comments
 (0)