This file contains 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
/** | |
* Returns the origin URL (protocol, hostname, and port) of the current location. | |
* | |
* @returns {string} The origin URL. | |
*/ | |
export function getLocationOrigin() { | |
const { protocol, hostname, port } = window.location; | |
return `${protocol}//${hostname}${port ? ':' + port : ''}`; | |
} |
This file contains 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 { useEffect, useState } from 'react' | |
import Head from 'next/head' | |
import { Box, Typography } from '@mui/material' | |
const getReturnValues = (countDown: number) => { | |
const days = Math.floor(countDown / (1000 * 60 * 60 * 24)) | |
const hours = Math.floor((countDown % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) | |
const minutes = Math.floor((countDown % (1000 * 60 * 60)) / (1000 * 60)) | |
const seconds = Math.floor((countDown % (1000 * 60)) / 1000) |
This file contains 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
.next | |
public | |
node_modules | |
yarn.lock | |
package-lock.json | |
**/*.test.js | |
coverage |
This file contains 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
{ | |
"editor.fontFamily": "Fira Code", | |
"editor.fontLigatures": true, | |
"editor.fontWeight": "300", | |
"editor.fontSize": 12, | |
"editor.tabSize": 2, | |
"editor.codeActionsOnSave": { | |
"source.fixAll": true | |
}, | |
"workbench.editor.highlightModifiedTabs": true, |
title | components | githubLabel | materialDesign |
---|---|---|---|
React Chip component |
Chip |
component: Chip |
Chips are compact elements that represent an input, attribute, or action.
Si estás leyendo esto, ¡eres increíble! Gracias por ayudarnos a hacer que este proyecto sea excelente y por ser parte de la comunidad DPACL. Queremos que la contribución sea lo más fácil y transparente posible, aquí hay algunas pautas que lo ayudarán en el camino.
¿Estás trabajando en tu primer Pull Request? Puede aprender cómo en esta serie de videos gratuitos.
This file contains 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 { Divider, Button, TextField } from "@material-ui/core"; | |
import { makeStyles } from "@material-ui/core/styles"; | |
import { FieldArray, Form, Formik, getIn } from "formik"; | |
import * as Yup from "yup"; | |
const validationSchema = Yup.object().shape({ | |
people: Yup.array().of( | |
Yup.object().shape({ | |
firstName: Yup.string().required("First name is required"), |