- Adobe
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
commit | |
branch : 하나의 커밋과 그 부모 커밋들을 포함하는 작업 내역 | |
checkout | |
cherry-pick <commit> <commit2> <...> | |
reset HEAD~1 | |
revert HEAD | |
rebase | |
merge | |
< Git 리베이스(Rebase) > |
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
// styles/index.js | |
const styles = { | |
innerWidth: '2xl:max-w-[1280px] w-full', | |
interWidth: 'lg:w-[80%] w-[100%]', | |
paddings: 'sm:p-16 xs:p-8 px-6 py-12', | |
yPaddings: 'sm:py-16 xs:py-8 py-12', | |
xPaddings: 'sm:px-16 px-6', | |
topPaddings: 'sm:pt-16 xs:pt-8 pt-12', | |
bottomPaddings: 'sm:pb-16 xs:pb-8 pb-12', |
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
type Post = { | |
userId: number | |
id: number | |
title: string | |
body: string | |
} | |
export default async function sitemap() { | |
const res = await fetch( "https://jsonplaceholder.typicode.com/posts") | |
const allPosts = (await res.json()) as Post[] |
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 { FC } from 'react'; | |
interface PageProps { | |
} | |
const page: FC<PageProps> = ({}) => { | |
return (<div>page</div> ); | |
} | |
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
body, ul, li { | |
margin:0; | |
padding:0; | |
list-style:none; | |
} | |
a { | |
color:inherit; | |
text-decoration:none; | |
} |
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 { Formik, Form, Field } from 'formik'; | |
function validateEmail(value) { | |
let error; | |
if (!value) { | |
error = 'Required'; | |
} else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value)) { | |
error = 'Invalid email address'; |
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 { useState } from 'react'; | |
const useInput = (validateValue) => { | |
const [enteredValue, setEnteredValue] = useState(''); | |
const [isTouched, setIsTouched] = useState(false); | |
const valueIsValid = validateValue(enteredValue); | |
const hasError = !valueIsValid && isTouched; | |
const valueChangeHandler = (event) => { |
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, { useState, useRef } from "react"; | |
import Card from "../UI/Card"; | |
import Button from "../UI/Button"; | |
import ErrorModal from "../UI/ErrorModal"; | |
import Wrapper from "../Helpers/Wrapper"; | |
import styles from "./UserInput.module.css"; | |
const UserInput = (props) => { | |
const nameInputRef = useRef(); |
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, { useRef, useImperativeHandle } from 'react'; | |
import classes from './Input.module.css'; | |
const Input = React.forwardRef((props, ref) => { | |
const inputRef = useRef(); | |
const activate = () => { | |
inputRef.current.focus(); | |
}; |
NewerOlder