This file contains hidden or 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
| input[name="dob"]:before { | |
| content: "Date of Birth"; | |
| color: #aaa; | |
| margin-right: 0.5em; | |
| } | |
| input[name="dob"]:focus:before, | |
| input[name="dob"]:valid:before { | |
| content: ""; | |
| } |
This file contains hidden or 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
| import React, { lazy, Suspense } from "react"; | |
| import { Route, Switch } from "react-router-dom"; | |
| import Header from "./components/Header/Header"; | |
| import { registerForm, loginForm } from "./UI/Form/formElements"; | |
| const Fruits = lazy(() => import("./components/Fruits/Fruits")); | |
| const AuthenticationForm = lazy(() => | |
| import("./components/AuthenticationForm/AuthenticationForm") | |
| ); |
This file contains hidden or 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
| import React, { useState } from "react"; | |
| import { connect } from "react-redux"; | |
| import { withRouter } from "react-router-dom"; | |
| import Form from "../../UI/Form/Form"; | |
| import { | |
| registerUser, | |
| signInUser | |
| } from "../../store/config/redux-token-auth-config"; |
This file contains hidden or 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
| import React from "react"; | |
| import Input from "../Input/Input"; | |
| import Button from "../Button/Button"; | |
| import classes from "./Form.module.css"; | |
| const Form = ({ | |
| formStructure, | |
| formData, | |
| setFormData, |
This file contains hidden or 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
| const fields = { | |
| firstName: { type: "text", name: "firstName", text: "First Name", placeholder: 'Jack', required: true }, | |
| lastName: { type: "text", name: "lastName", text: "Last Name", placeholder: 'Doe', required: true }, | |
| email: { type: "email", name: "email", text: "Email", placeholder: '[email protected]', required: true }, | |
| addressLine: { type: "text", name: "addressLine", text: "Address Line", placeholder: 'Awesome str 9', required: true }, | |
| postalCode: { type: "text", name: "postalCode", text: "Postal Code", placeholder: '12345', required: true }, | |
| city: { type: "text", name: "city", text: "City", placeholder: 'Gothenburg', required: true }, | |
| state: { type: "text", name: "state", text: "State", placeholder: 'Gotaland', required: true }, | |
| dob: { type: "date", name: "dob", text: "Date of Birth", required: true }, | |
| password: { type: "password", name: "password", text: "Password", required: true }, |
This file contains hidden or 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
| import React from "react"; | |
| import classes from "./Input.module.css"; | |
| const Input = ({ | |
| text, | |
| type, | |
| placeholder = text, | |
| handleChange, | |
| name, |
This file contains hidden or 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
| /// <reference types="Cypress" /> | |
| import sessionpage from "../fixtures/sessionpage.js"; | |
| describe("User can access videocalls", () => { | |
| it("Coach can start only his own session", () => { | |
| cy.route({ | |
| method: "GET", | |
| url: "http://localhost:3000/sessions?page=1", | |
| response: sessionpage({ status: true }) |
This file contains hidden or 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
| let today = new Date(); | |
| const defaults = { | |
| started: true | |
| }; | |
| const sessionpage = (payload = defaults) => { | |
| return { | |
| sessions: [ | |
| { |
This file contains hidden or 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
| /// <reference types="Cypress" /> | |
| import sessionpage from "../fixtures/sessionpage.js"; | |
| describe("User can access videocalls", () => { | |
| it("Coach can start only his own session", () => { | |
| cy.route({ | |
| method: "GET", | |
| url: "http://localhost:3000/sessions?page=1", | |
| response: sessionpage |