Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 7a84a6d5

Přidáno uživatelem Dominik Poch před více než 2 roky(ů)

Added documentation comments

Added documentation comments to the login screen and its layout

Zobrazit rozdíly:

webapp/layouts/loginLayout.tsx
4 4
import Props from '../components/props';
5 5
import { Col, Container, Row, Stack } from 'react-bootstrap';
6 6

  
7
/**
8
 * Creates layout of a login screen.
9
 * @param props Html structure of a login form.
10
 * @returns The login screen.
11
 */
7 12
function LoginLayout(props: Props) {
8 13
    return (
9 14
        <Container>
webapp/pages/authentication/login.tsx
3 3
import 'antd/dist/antd.css';
4 4
import LoginLayout from '../../layouts/loginLayout';
5 5

  
6
/**
7
 * Creates a login screen.
8
 * @returns Html structure of the login screen.
9
 */
6 10
function Login() {
11
    /**
12
     * Handles submission a form when its fields were successfully validated.
13
     * @param values Fields of the login form.
14
     */
7 15
    const onFinish = (values: any) => {
8 16
        /**
9 17
         @todo: delete login form log when login API is implemented
......
11 19
        console.log('Values of the login form: ', values);
12 20
    };
13 21

  
22
    /**
23
     * Handles submission a form when its validation failed.
24
     * @param errorInfo Validation errors.
25
     */
14 26
    const onFinishFailed = (errorInfo: any) => {
15 27
        /**
16 28
         @todo: delete log when error handling is implemented

Také k dispozici: Unified diff