-
Notifications
You must be signed in to change notification settings - Fork 0
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 #82 from Quest-Finder/lint/correcoes
Lint/correcoes
- Loading branch information
Showing
12 changed files
with
99 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ export default function PagesPlayerProfile() { | |
/> | ||
</> | ||
) | ||
} | ||
} |
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
13 changes: 9 additions & 4 deletions
13
src/features/register-player/player-profile/components/FormAditionalText.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 |
---|---|---|
@@ -1,16 +1,21 @@ | ||
import { cn } from '@/lib/utils' | ||
|
||
interface FormAditionalTextProps extends React.HTMLAttributes<HTMLHeadingElement> { | ||
interface FormAditionalTextProps | ||
extends React.HTMLAttributes<HTMLHeadingElement> { | ||
children: string | ||
} | ||
|
||
export function FormAditionalText({ className, children, ...props }: FormAditionalTextProps) { | ||
export function FormAditionalText({ | ||
className, | ||
children, | ||
...props | ||
}: FormAditionalTextProps) { | ||
return ( | ||
<h1 | ||
className={cn('mb-4 text-base text-neutral-600 text-center', className)} | ||
className={cn('mb-4 text-center text-base text-neutral-600', className)} | ||
{...props} | ||
> | ||
{children} | ||
</h1> | ||
) | ||
} | ||
} |
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
16 changes: 11 additions & 5 deletions
16
src/features/register-player/player-profile/helpers/getRpgStyle.ts
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,36 +1,42 @@ | ||
import Exploracao from '../assets/Exploracao.svg' | ||
import MatarEPilhar from '../assets/MatarEPilhar.svg' | ||
import Interpretacao from '../assets/Interpretacao.svg' | ||
import MatarEPilhar from '../assets/MatarEPilhar.svg' | ||
|
||
export function getRpgImage(rpgStyle: string) { | ||
switch (rpgStyle) { | ||
case 'Exploração': | ||
return Exploracao | ||
case 'Matar e pilhar': | ||
case 'Matar e pilhar': | ||
return MatarEPilhar | ||
case 'Interpretação': | ||
return Interpretacao | ||
default: | ||
return '' | ||
} | ||
} | ||
|
||
export function getRpgImageColor(rpgStyle: string) { | ||
switch (rpgStyle) { | ||
case 'Exploração': | ||
return 'bg-primary-100' | ||
case 'Matar e pilhar': | ||
case 'Matar e pilhar': | ||
return 'bg-secondary-100' | ||
case 'Interpretação': | ||
return 'bg-accent-100' | ||
default: | ||
return '' | ||
} | ||
} | ||
|
||
export function getRpgStyling(rpgStyle: string) { | ||
switch (rpgStyle) { | ||
case 'Exploração': | ||
return 'border-primary-500 bg-primary-50' | ||
case 'Matar e pilhar': | ||
case 'Matar e pilhar': | ||
return 'border-secondary-500 bg-secondary-50' | ||
case 'Interpretação': | ||
return 'border-accent-500 bg-accent-50' | ||
default: | ||
return '' | ||
} | ||
} | ||
} |
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,23 +1,26 @@ | ||
interface profileType { | ||
id: string, | ||
title: string, | ||
id: string | ||
title: string | ||
description: string | ||
} | ||
|
||
export const mockFormPlayerProfile: profileType[] = [ | ||
{ | ||
id: '9228a9a0-c7e0-4d62-80bb-458dd772c4f9', | ||
title: 'Exploração', | ||
description: 'Você gosta de conhecer o mundo em que está se aventurando, adora encontrar e explorar dungeons.', | ||
description: | ||
'Você gosta de conhecer o mundo em que está se aventurando, adora encontrar e explorar dungeons.', | ||
}, | ||
{ | ||
id: '9228b7a0-c7e0-3d62-86bb-458dd332c4f9', | ||
title: 'Matar e pilhar', | ||
description: 'Para você, a parte mais importante e divertida de uma partida é a hora de rolar dados e distribuir o dano entre seus inimigos.', | ||
description: | ||
'Para você, a parte mais importante e divertida de uma partida é a hora de rolar dados e distribuir o dano entre seus inimigos.', | ||
}, | ||
{ | ||
id: '9988b7c3-c2t0-3d09-43cb-451gd332c0l9', | ||
title: 'Interpretação', | ||
description: 'Para você, a ficha e as regras são apenas uma parte do RPG, você gosta de sentir-se na pele de seu personagem.', | ||
description: | ||
'Para você, a ficha e as regras são apenas uma parte do RPG, você gosta de sentir-se na pele de seu personagem.', | ||
}, | ||
] | ||
] |
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,8 +1,9 @@ | ||
import { z } from "zod" | ||
import { z } from 'zod' | ||
|
||
export const FormPlayerProfileSchema = z.object({ | ||
playerProfileId: z.string() | ||
.min(1, { message: 'Necessário escolher pelo menos uma opção' }) | ||
playerProfileId: z | ||
.string() | ||
.min(1, { message: 'Necessário escolher pelo menos uma opção' }), | ||
}) | ||
|
||
export type FormPlayerProfileType = z.infer<typeof FormPlayerProfileSchema> | ||
export type FormPlayerProfileType = z.infer<typeof FormPlayerProfileSchema> |
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
10 changes: 6 additions & 4 deletions
10
src/features/register-player/player-registration/helper/checkUniqueUsername.ts
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,8 +1,10 @@ | ||
export async function checkUniqueUsername(username: string) { | ||
try { | ||
const response = await fetch(`https://tem-vaga-mestre-api-nnf7bytugq-uc.a.run.app/user/check-username/${username}`) | ||
return response.status === 200 ? true : false | ||
const response = await fetch( | ||
`https://tem-vaga-mestre-api-nnf7bytugq-uc.a.run.app/user/check-username/${username}`, | ||
) | ||
return response.status === 200 | ||
} catch (error) { | ||
console.log(error) | ||
return false | ||
} | ||
} | ||
} |
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