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 { NextApiRequest, NextApiResponse } from 'next'; | |
| import NextAuth, { InitOptions } from 'next-auth'; | |
| import Providers from 'next-auth/providers'; | |
| import { SessionUser } from 'lib/data-types'; | |
| import { getUserFromId, updateUser } from 'db/user-dao'; | |
| const options: InitOptions = { | |
| providers: [ | |
| Providers.GitHub({ | |
| clientId: process.env.GITHUB_ID || '', |
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 React from "react"; | |
| import { Helmet } from "react-helmet-async"; | |
| import { useForm } from "react-hook-form"; | |
| import { Link } from "react-router-dom"; | |
| import { authTokenVar, isLoginVar } from "../Hocks/useApollo"; | |
| import { Button } from "../components/button"; | |
| import {MessageError}from'../components/Form/errorrMessage' | |
| import { Input } from "../components/Form/input"; | |
| import { LOCALSTORAGE_TOKEN } from "../cosntatns"; | |
| import { useLoginMutationMutation as useLoginMutation } from "../generated/graphql"; |
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 React, { useState } from 'react'; | |
| import Link from 'next/link'; | |
| import { Divider } from './devider'; | |
| import { AllArticles } from './Articales'; | |
| import { AllProject } from './AllProject'; | |
| import { Projects } from './syg'; | |
| interface Props { | |
| color: string; | |
| } |
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
Show hidden characters
| { | |
| "compilerOptions": { | |
| "outDir": "./lib", | |
| "target": "es5", | |
| "module": "esnext", | |
| "baseUrl": ".", | |
| "paths": { | |
| "*": ["src/*"], | |
| "@layout":["src/layout/*"], |
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
| generator client { | |
| provider = "prisma-client-js" | |
| previewFeatures = ["orderByRelation", "referentialActions", "nApi"] | |
| } | |
| datasource postgresql { | |
| provider = "postgresql" | |
| url = env("PG_CONNECTIONSTRING") | |
| } |
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
| // This is your Prisma schema file, | |
| // learn more about it in the docs: https://pris.ly/d/prisma-schema | |
| datasource db { | |
| provider = "postgresql" | |
| url = env("PG_CONNECTIONSTRING") | |
| } |
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 RedisStore = connectRedis(session); | |
| const redis = new Redis(process.env.REDIS_URL); | |
| app.set("trust proxy", 1); | |
| app.use( | |
| cors({ | |
| origin: process.env.CORS_ORIGIN, | |
| credentials: true, | |
| }) | |
| ); | |
| app.use( |
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 { gql, useMutation, useQuery, useSubscription } from "@apollo/client"; | |
| import React, { useEffect } from "react"; | |
| import { Helmet } from "react-helmet-async"; | |
| import { Link, useHistory, useParams } from "react-router-dom"; | |
| import { Dish } from "../../components/dish"; | |
| import { | |
| VictoryAxis, | |
| VictoryChart, | |
| VictoryLabel, | |
| VictoryLine, |
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
| /* eslint-disable @typescript-eslint/no-empty-function */ | |
| import React, { createContext, useEffect, useReducer } from 'react' | |
| // third-party | |
| import firebase from 'firebase/app' | |
| import 'firebase/auth' | |
| // action - state management | |
| import { FIREBASE_STATE_CHANGED } from '../store/actions' |
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
| var result = [] | |
| function permutation(arr, currentSize) { | |
| if (currentSize == 1) { | |
| result.push(arr.join("")); | |
| return; | |
| } | |
| for (let i = 0; i < currentSize; i++){ | |
| permutation(arr, currentSize - 1); |