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

v14.3.1 #395

Merged
merged 2 commits into from
Jun 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions pages/events-in-event/bonus-votes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@ const BonusVotes: NextPage = () => {

<div className="divider" />

<h2 className="text-xl font-bold pb-4">ボーナス票が入る部門</h2>
<div className="text-base text-center pb-0">
<div className="pb-0">
<div className="text-base text-center pb-4">
ボーナス票は
<span className="text-red-500">
「オールキャラ部門」の票数
</span>
に反映されます。
</div>
</div>
</div>

<div className="divider" />

<h2 className="text-xl font-bold pb-4">ボーナス票が入る条件</h2>
<div className="text-base text-left pb-4">
<div className="pb-4">
Expand Down Expand Up @@ -189,21 +204,6 @@ const BonusVotes: NextPage = () => {

<div className="divider" />

<h2 className="text-xl font-bold pb-4">ボーナス票が入る部門</h2>
<div className="text-base text-center pb-0">
<div className="pb-4">
<div className="text-base text-center pb-4">
ボーナス票は
<span className="text-red-500">
「オールキャラ部門」の票数
</span>
に反映されます。
</div>
</div>
</div>

<div className="divider" />

<h2 className="text-xl font-bold pb-4">ボーナス票の例</h2>
<div className="text-base text-center pb-0">
<div className="pb-4">
Expand Down
45 changes: 23 additions & 22 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,33 @@ import SiteFooter from '../components/SiteFooter'

import { useLocale } from '../hooks/useLocale'

const nowSecond = () => {
const time = new Date()
const hour = time.getHours()
const minute = time.getMinutes()
const second = time.getSeconds()
// const nowSecond = () => {
// const time = new Date()
// const hour = time.getHours()
// const minute = time.getMinutes()
// const second = time.getSeconds()

return second
}
// return second
// }

const Home: NextPage = () => {
// TODO: "now" ではなく、開催日からの差分を出し、減らしていく
const [now, setNow] = useState(new Date())

useEffect(
function () {
const intervalId = setInterval(function () {
setNow(new Date())
}, 1000)

return function () {
clearInterval(intervalId)
}
},

[now]
)
// const [now, setNow] = useState(new Date())

// TODO: 子コンポーネントへの影響にも注意する(コンポーネント切り出すべき)
// useEffect(
// function () {
// const intervalId = setInterval(function () {
// setNow(new Date())
// }, 1000)

// return function () {
// clearInterval(intervalId)
// }
// },

// [now]
// )

const { t } = useLocale()

Expand Down