보호되어 있는 글입니다.
app>api>auth>[...nextauth]>route.ts import { supabase } from "@/utils/supabase/client"; import NextAuth from "next-auth"; import CredentialsProvider from "next-auth/providers/credentials"; const handler = NextAuth({ providers: [ CredentialsProvider({ id: "id-password-credential", name: "Credentials", type: "credentials", credentials: { id: { label: "아이디", type: "text", placeholder: "아이디를 입력해주세요...
"use client"; import { Button } from "@nextui-org/react"; import React, { useRef } from "react"; interface CustomConfirmProps { text: string; buttonName: string; okFunction: () => void; } // text : 안에 내용 // buttonName: button 이름 지정 // okFunction: ok를 누를때 실행해야하는 함수 const CustomConfirm: React.FC = ({ text, buttonName, okFunction, }) => { const freezeLayerRef = useRef(null); const dialogContRef = u..
문제 설명 점심시간에 도둑이 들어, 일부 학생이 체육복을 도난당했습니다. 다행히 여벌 체육복이 있는 학생이 이들에게 체육복을 빌려주려 합니다. 학생들의 번호는 체격 순으로 매겨져 있어, 바로 앞번호의 학생이나 바로 뒷번호의 학생에게만 체육복을 빌려줄 수 있습니다. 예를 들어, 4번 학생은 3번 학생이나 5번 학생에게만 체육복을 빌려줄 수 있습니다. 체육복이 없으면 수업을 들을 수 없기 때문에 체육복을 적절히 빌려 최대한 많은 학생이 체육수업을 들어야 합니다. 전체 학생의 수 n, 체육복을 도난당한 학생들의 번호가 담긴 배열 lost, 여벌의 체육복을 가져온 학생들의 번호가 담긴 배열 reserve가 매개변수로 주어질 때, 체육수업을 들을 수 있는 학생의 최댓값을 return 하도록 solution 함수를..
superbase의 왼쪽 메뉴들에서 API Docs Click(클릭)! API Docs -> Introduction Click(클릭)! Generate and download types 눌러서 type을 다운로드 받을 수 있어요 import { createClient } from "@supabase/supabase-js"; import type { Database } from "./type/supabase"; const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL as string; const supabaseKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY as string; const supabase = createCli..
