Skip to content
Snippets Groups Projects
Unverified Commit 2c6f01c5 authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Formatted code

parent bf2e01cd
No related branches found
No related tags found
1 merge request!2Prettier
......@@ -3,16 +3,20 @@
Dashboard of the service which is used by system administrators
## Fase I
Costruire tutti gli elementi della dashboard utlizzando una libreria css. L'idea è di scrivere il meno css possibile nella fase iniziale in modo tale da avere una versione funzionante del sito in breve tempo.
Costruire tutti gli elementi della dashboard utlizzando una libreria css. L'idea è di scrivere il meno css possibile nella fase iniziale in modo tale da avere una versione funzionante del sito in breve tempo.
- Tailwind css
- Bulma
# Used dependencies
## Typescript
Anche se renderà un po' complesso lo sviluppo all'inizio, l'idea è utilizzare typescript perché funziona meglio di JS e abbiamo le competenze per comprenderlo.
## Useful resources
[react calendar app](https://codesandbox.io/s/kkyvoj97pv?from-embed=&file=/src/index.js)
[codesandbox, utile per vedere altri progetti creati con framework)(https://codesandbox.io/)
[awesome css list](https://github.com/awesome-css-group/awesome-css)
......@@ -20,7 +20,8 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"format": "prettier --write ."
},
"eslintConfig": {
"extends": [
......@@ -39,5 +40,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"prettier": "2.2.1"
}
}
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';
import React from "react";
import { render, screen } from "@testing-library/react";
import App from "./App";
test('renders learn react link', () => {
test("renders learn react link", () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
......
import React from 'react';
import logo from './logo.svg';
import './App.css';
import React from "react";
import logo from "./logo.svg";
import "./App.css";
function App() {
return (
......
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
document.getElementById("root")
);
// If you want to start measuring performance in your app, pass a function
......
import { ReportHandler } from 'web-vitals';
import { ReportHandler } from "web-vitals";
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
......
......@@ -2,4 +2,4 @@
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';
import "@testing-library/jest-dom";
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
......@@ -20,7 +16,5 @@
"noEmit": true,
"jsx": "react-jsx"
},
"include": [
"src"
]
"include": ["src"]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment