denispaluca / frontend

Home Page:https://milou.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Milou Frontend

Deploy to Amazon ECS Lint Code Base Test code

This project was bootstrapped with Create React App.

For all the frontend teams:

  • You need yarn! To install dependencies and work on the project make sure you have yarn installed and set up.
  • This is a TypeScript project, please make sure to type all your variables and don't use any.
  • The code style here is governed by prettier and is enforced via a pre commit hook, that formats your code when committing. Look up you editor integrations here.
  • This project uses eslint to catch common mistakes, look up how to enable reporting of the results in your editor.
  • We are using the @reach/router to handle navigation in the app, check their documentation to get familiar.
  • Please make yourself familiar with writing tests and supply them in your code if you want to get it merged. There's some good starting points here.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn format

Formats all the staged code with prettier.
Make sure that the code you want to format is staged on git before running.

yarn lint

Runs eslint on source and test files.

yarn prettier-check

Runs prettier to check for code style violations.

yarn prettier-fix

Runs prettier to fix code style.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Styles

The project uses Material-UI's styling solution for components (see the documentation).

For example, a functional component can be styled using hooks:

import React from 'react';
import { makeStyles } from '@material-ui/core';

const useStyles = makeStyles({
  root: { 'font-weight': 'bold' },
});

const Example: React.FC = () => {
  const classes = useStyles();
  return <div className={classes.root}>Hello world!</div>;
};

export default Example;

i18n

Locales are defined in src/locales/en.json like this:

{
  "helloworld": "Hello world!"
}

Using translations:

import React from 'react';
import { useTranslation } from 'react-i18next';

const Example: React.FC = () => {
  const { t } = useTranslation();
  return <div>{t('helloworld')}</div>;
};

export default Example;

Also see the react-18next documentation.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

About

https://milou.io


Languages

Language:TypeScript 99.6%Language:HTML 0.3%Language:Dockerfile 0.1%Language:CSS 0.0%