-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #223 from 3I-shikosai32/fix/205-new_user_refactoring
refactor: ♻ new-userの要件漏れ・設計からの逸脱を修正
- Loading branch information
Showing
28 changed files
with
593 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
query FindAllUsersName { | ||
findUsers { | ||
name | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
import type { NextPage } from 'next'; | ||
import { Layout } from '../../presentation/layout/layout.container'; | ||
import NewUser from '@/presentation/relevant/new-user/new-user.page'; | ||
|
||
const NewUserPage: NextPage = () => <NewUser />; | ||
const NewUserPage: NextPage = () => ( | ||
<Layout title="サインアップ | OZ"> | ||
<NewUser /> | ||
</Layout> | ||
); | ||
|
||
export default NewUserPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...sentation/relevant/new-user/component/character-selector/character-selector.container.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { FC } from 'react'; | ||
import type { Form } from '../../hook/use-form.hook'; | ||
import { CharacterSelectorPresenter } from './character-selector.presenter'; | ||
import type { Character } from '@/model/character/character.model'; | ||
|
||
type CharacterSelectorContainerProps = { | ||
formValue: Form; | ||
setFormValue: (character: Character) => void; | ||
}; | ||
|
||
export const CharacterSelector: FC<CharacterSelectorContainerProps> = ({ formValue, setFormValue }) => ( | ||
<CharacterSelectorPresenter | ||
selectedCharacter={formValue.character} | ||
onChecked={(character) => { | ||
setFormValue(character); | ||
}} | ||
/> | ||
); |
36 changes: 36 additions & 0 deletions
36
...sentation/relevant/new-user/component/character-selector/character-selector.presenter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { FC } from 'react'; | ||
import { Character, CharacterNameDictionary } from '@/model/character/character.model'; | ||
import { LiveCharacter } from '@/presentation/primitive/component/live-character/live-character.presenter'; | ||
|
||
type CharacterSelectorPresenterProps = { | ||
selectedCharacter: Character | undefined; | ||
onChecked: (character: Character) => void; | ||
}; | ||
|
||
export const CharacterSelectorPresenter: FC<CharacterSelectorPresenterProps> = ({ selectedCharacter, onChecked }) => ( | ||
<div className="grid grid-cols-3 px-5"> | ||
{Object.values(Character).map((character) => ( | ||
<div key={character} className="my-5 mx-3 h-[110px] w-[90px] rounded-2xl bg-white shadow-2xl md:mx-10 md:h-[200px] md:w-[200px]"> | ||
<div className="top-5 m-1 md:m-3"> | ||
<input | ||
id={character} | ||
type="checkbox" | ||
className="h-5 w-5" | ||
checked={selectedCharacter === character} | ||
onChange={() => { | ||
onChecked(character); | ||
}} | ||
/> | ||
</div> | ||
<div className="flex items-center justify-center"> | ||
<LiveCharacter | ||
name={CharacterNameDictionary[character]} | ||
images={[`/characters/${character.toLowerCase()}.svg`]} | ||
displayName={false} | ||
className="w-2/3 p-3 md:w-1/2" | ||
/> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
); |
28 changes: 0 additions & 28 deletions
28
src/presentation/relevant/new-user/component/character/character.presenter.tsx
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
src/presentation/relevant/new-user/component/email-input/email-input.container.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { FC } from 'react'; | ||
import type { Form } from '../../hook/use-form.hook'; | ||
import { EmailInputPresenter } from './email-input.presenter'; | ||
|
||
export type EmailInputProps = { | ||
formValue: Form; | ||
setFormValue: (value: string) => void; | ||
}; | ||
|
||
export const EmailInput: FC<EmailInputProps> = ({ formValue, setFormValue }) => ( | ||
<EmailInputPresenter | ||
isValueMissing={!formValue.email} | ||
value={formValue.email} | ||
onChange={(event) => { | ||
setFormValue(event.target.value); | ||
}} | ||
/> | ||
); |
Oops, something went wrong.
08296cc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
shikosai32 – ./
shikosai32-git-main-3-i-shikosai32.vercel.app
shikosai32-3-i-shikosai32.vercel.app
3i-shikosai32.vercel.app
3i.shikosai.net