Skip to content
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

Merged
merged 8 commits into from
Apr 7, 2022
Merged

Registation page #8

merged 8 commits into from
Apr 7, 2022

Conversation

marta-probierz
Copy link
Member

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.

@marta-probierz marta-probierz self-assigned this Apr 5, 2022
@netlify
Copy link

netlify bot commented Apr 5, 2022

Deploy Preview for brain-code ready!

Name Link
🔨 Latest commit bc7f0a1
🔍 Latest deploy log https://app.netlify.com/sites/brain-code/deploys/624f4d2fabe3a8000bb98f95
😎 Deploy Preview https://deploy-preview-8--brain-code.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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": {
Copy link
Member

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";
Copy link
Member

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'

Copy link
Member Author

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";
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

autoCapitalize="off"
autoCorrect="off"
autoComplete="email"
placeholder="Type your email"
Copy link
Member

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")}

Copy link
Member Author

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.

email,
password,
})
.then((res) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async/await?

Copy link
Member Author

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 :)

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, nie ma problemu :)

getCurrentUser,
};

export default authService;
Copy link
Member

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ą

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jw.

@TenGosc007
Copy link
Member

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.

hmm, może być z tym faktycznie problem
https://stackoverflow.com/questions/57864069/how-to-use-react-i18next-inside-basic-function-not-component

@TenGosc007
Copy link
Member

TenGosc007 commented Apr 6, 2022

errory na netlfy
obraz

@TenGosc007
Copy link
Member

zobacz jeszcze tutaj
i18next/react-i18next#909

@marta-probierz
Copy link
Member Author

errory na netlify poprawione. szukam dalej info o i18n + yup - na razie nie działa :/

password: '',
confirmPassword: ''
}}
validationSchema={SignupSchema}
Copy link
Member

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({
Copy link
Member

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()...

Copy link
Member

@TenGosc007 TenGosc007 Apr 6, 2022

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`

Copy link
Member Author

@marta-probierz marta-probierz Apr 6, 2022

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ć :(

@marta-probierz marta-probierz merged commit a5c1058 into main Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants