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 #538 from true-runes/development
Browse files Browse the repository at this point in the history
v19.1.0
  • Loading branch information
nikukyugamer authored Jun 25, 2022
2 parents 9232e41 + 7e0861e commit 42b2d2a
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import type { NextPage } from 'next'
import Image from 'next/image'
import useTranslation from 'next-translate/useTranslation'

export const InstructionForEnglishWithImages: NextPage = () => {
const { lang } = useTranslation('votes_to_unite_attacks')

return (
<>
{lang === 'en' && (
<>
<div className="pb-0">
<h2 className="w-full text-2xl font-bold pb-8 text-center underline underline-offset-4">
How to vote
</h2>
</div>

<h2 className="w-full text-2xl font-bold pb-8 text-center underline underline-offset-4">
①~②
</h2>

<Image
src="/images/unite_attack_voting_en_01.png"
alt="unite_attack_voting_en_01"
width="750"
height="1477"
/>

<div className="my-6" />
<div className="divider" />
<div className="my-6" />

<h2 className="w-full text-2xl font-bold pb-8 text-center underline underline-offset-4">
③~④
</h2>

<Image
src="/images/unite_attack_voting_en_02.png"
alt="unite_attack_voting_en_02"
width="750"
height="1477"
/>

<div className="my-6" />
<div className="divider" />
<div className="my-6" />

<h2 className="w-full text-2xl font-bold pb-8 text-center underline underline-offset-4">
</h2>

<Image
src="/images/unite_attack_voting_en_03.png"
alt="unite_attack_voting_en_03"
width="750"
height="1477"
/>

<div className="divider" />
<div className="my-6" />
</>
)}
</>
)
}
23 changes: 20 additions & 3 deletions components/vote-to-unite-attacks/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import uniteAttacksSuikodenTk from '@/lib/uniteAttacksSuikodenTk.json'
import uniteAttacksSuikodenTsumutoki from '@/lib/uniteAttacksSuikodenTsumutoki.json'
import uniteAttacksRhapsodia from '@/lib/uniteAttacksRhapsodia.json'

import { InstructionForEnglishWithImages } from '@/components/vote-to-unite-attacks/InstructionForEnglishWithImages'

type CharacterName = string

type UniteAttack = {
Expand Down Expand Up @@ -74,6 +76,7 @@ export const Main: NextPage = () => {
.then((response) => {
setApiResponse(response.data)

console.log('apiResponse', response.data)
setNowLoading(false)
})
.catch((error) => {
Expand Down Expand Up @@ -114,7 +117,11 @@ export const Main: NextPage = () => {
// TODO: ハッシュタグは変数にしたい
// TODO: キャラ名入れたほうがいい場合は入れる (uniteCharacterNames)
useEffect(() => {
console.log(uniteCharacterNames)
// setUniteCharacterNames(
// uniteAttack.characterNames
// )
// console.log(apiResponse)
// console.log(uniteCharacterNames)

const updatedTweetText = `${titleName}
${uniteAttackName}
Expand All @@ -137,6 +144,8 @@ ${uniteAttackName}
「協力攻撃部門」投票ページ
</h1>

{lang === 'en' && <InstructionForEnglishWithImages />}

<div className="pb-0">
<ul className="list-disc text-left pl-6 pr-2">
<li className="pb-2">
Expand Down Expand Up @@ -211,8 +220,16 @@ ${uniteAttackName}
id={`${uniteAttack.id}`}
data-theme="light"
key={uniteAttack.id}
value={uniteAttack.name}
checked={uniteAttackName === uniteAttack.name}
value={
lang === 'ja'
? uniteAttack.name
: uniteAttack.name_en
}
checked={
lang === 'ja'
? uniteAttackName === uniteAttack.name
: uniteAttackName === uniteAttack.name_en
}
type="radio"
name="radio-4"
className="radio radio-accent mr-4 checked:bg-blue-500"
Expand Down
Binary file added public/images/unite_attack_voting_en_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/unite_attack_voting_en_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/unite_attack_voting_en_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 42b2d2a

Please sign in to comment.