This file contains hidden or 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
export default function Signup() { | |
const [part, setPart] = useState<"account" | "info">("account"); | |
const isAccountPart = part === "account"; | |
// 임시 핸들러 | |
const onSubmit: SubmitHandler<User.FormValue> = (data) => { | |
console.log(data); | |
}; | |
return ( |
This file contains hidden or 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 { createGlobalTheme } from "@vanilla-extract/css"; | |
// 색상 토큰 | |
export const ColorVar = createGlobalTheme(":root", { | |
white: "#fff", | |
transparent: "transparent", | |
green: "#00CD0E", | |
yellow: "#FFD000", | |
red: "#D90000", | |
grey: { |
This file contains hidden or 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
name: workRoot CI | |
on: | |
push: | |
branches: | |
- main # main 브랜치에 푸시될 때 실행 | |
- dev | |
pull_request: | |
branches: | |
- dev |
This file contains hidden or 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
export default function AddFormPage() { | |
const router = useRouter(); | |
// 리액트 훅폼에서 관리할 데이터 타입 지정 및 메서드 호출 (상위 컴포넌트 = useForm 사용) | |
const methods = useForm<SubmitFormDataType>({ | |
mode: "onChange", | |
shouldUnregister: false, | |
defaultValues: { | |
isPublic: true, | |
hourlyWage: 0, | |
isNegotiableWorkDays: false, |
This file contains hidden or 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
/** | |
* @param name: string - 필수값 | |
* @param type: "text" | "password" | ... - 필수값 | |
* @param variant: "white" | "transparent"; | |
* @param size: "w-[00px] h-[00px] lg:w-[00px] lg:h-[00px]" - 기본값: "w-[327px] h-[54px] lg:w-[640px] lg:h-[64px]" | |
* @param placeholder: string | |
* @param errormessage: string - 에러메시지 + 테두리 색상 변경 | |
* @param feedbackMessage: string - 메시지만 띄우고 색상 변경 X | |
* @param disabled: boolean |
This file contains hidden or 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
const useMovePointByWidth = () => { | |
const containerRef = useRef<HTMLDivElement | null>(null); // 기준이 될 DOM 요소 | |
const [width, setWidth] = useState(0); | |
const [prevWidth, setPrevWidth] = useState(0); | |
const { points, setPoints } = useGraphStore(); | |
useEffect(() => { | |
if (!containerRef.current) return; |
This file contains hidden or 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
const [imageBlob, setImageBlob] = useState<Blob | null>(null); | |
const imageRef = useRef<HTMLDivElement>(null); | |
const image = imageRef.current; | |
const getImage = async (): Promise<Blob | null> => { | |
if (!image) return null; | |
try { | |
const canvas = await html2canvas(image, { scale: 2 }); | |
return new Promise((resolve) => { | |
canvas.toBlob((blob) => { |
This file contains hidden or 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
useEffect(() => { | |
const userAgent = navigator.userAgent.toLowerCase(); | |
const isKakaoInApp = userAgent.includes("kakaotalk"); | |
// 카카오톡 인앱 브라우저일 경우에만 실행 | |
if (isKakaoInApp) { | |
const targetUrl = "https://life-graph.vercel.app/"; | |
window.location.replace( | |
`kakaotalk://web/openExternal?url=${encodeURIComponent(targetUrl)}` |