-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registation page #8
Conversation
✅ Deploy Preview for brain-code ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@@ -10,5 +10,37 @@ | |||
"date_morning": "Good morning! Today is {{date, DATE_HUGE}} | Have a nice day!", | |||
"date_afternoon": "Good afternoon! It's {{date, DATE_HUGE}}", | |||
"date_evening": "Good evening! Today was the {{date, DATE_HUGE}}" | |||
}, | |||
"registration": { |
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.
wygląda dobrze :D
src/App.tsx
Outdated
|
||
import { RegistrationForm } from "./components/Registration"; | ||
import { ThemeProvider } from "styled-components"; | ||
import { RegistrationForm } from "./components"; | ||
import Footer from "components/Footer"; |
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.
ten footer powinno dać się zaimportować w sposób
import {Footer} from 'componetns'
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.
Footer to testowy komponent, który zrobiła Weronika. Pewnie będzie do usunięcia.
|
||
import { RegistrationForm } from "./components/Registration"; | ||
import { ThemeProvider } from "styled-components"; | ||
import { RegistrationForm } from "./components"; |
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.
./ jest niepotrzebne jeśli tsconfig jest dobrze skonfigurowany
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.
fixed
src/components/Login/LoginForm.tsx
Outdated
autoCapitalize="off" | ||
autoCorrect="off" | ||
autoComplete="email" | ||
placeholder="Type your email" |
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.
placeholder={t("klucz_z_pliku_json")}
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.
Gosia pewnie jeszcze tego nie zrobiła, bo moja jest rejestracja :P zmian Gosi nie było na mainie, stąd tyle dodanych plików itd.
src/services/auth.service.ts
Outdated
email, | ||
password, | ||
}) | ||
.then((res) => { |
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.
async/await?
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.
przekażę Małgosi, bo to ona robiła. Stworzyłam po prostu swój nowy branch z brancha Gosi :)
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.
ok, w takim razie najlepiej poczekać, aż Gosia zmerguje pierwsza swoje zmiany
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.
ok, nie ma problemu :)
src/services/auth.service.ts
Outdated
getCurrentUser, | ||
}; | ||
|
||
export default authService; |
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.
zamiast używać default, dodał bym export przed każdą funkcją
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.
jw.
hmm, może być z tym faktycznie problem |
zobacz jeszcze tutaj |
errory na netlify poprawione. szukam dalej info o i18n + yup - na razie nie działa :/ |
password: '', | ||
confirmPassword: '' | ||
}} | ||
validationSchema={SignupSchema} |
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.
w takim razie musiała by to być funkcja która przyjmuje parametr t
SignupSchema(t)
const uppercaseRegex = /(?=.*[A-Z])/; | ||
const numericRegex = /(?=.*[0-9])/; | ||
|
||
export const SignupSchema = Yup.object().shape({ |
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.
to przerobić na funkcję SignupSchama = (t) => Yup.object()...
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.
przy okazji chyba można też zamiast t("key") napisać t`key`
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.
próbowałam już to przerobić na funkcję, błędów nie ma, ale walidacja yupa całkowicie przestaje działać :(
Poprawiona strona rejestracji ze spójnymi stylami. Teksty zawarłam w pliku json. Nie wiem tylko, jak przenieść teksty walidacji yup do json :( Walidację mam w oddzielnym pliku (validate.ts). Może ktoś z was ma jakiś pomysł? Będę wdzięczna za wskazówki.