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 LearningPathDetailsPage = () => { | |
return ( | |
<CoachLayout> | |
<Container maxW="7xl"> | |
<Flex align="center" justify="space-between"> | |
<Heading>Learning Path Name</Heading> | |
<Button mt="4" bg="green.400" _hover={{bgColor: "green.600"}} leftIcon={<Icon as={FiEdit}/>}>Edit Path</Button> | |
</Flex> | |
{/* <Heading size="lg" color="gray.500">Student Name</Heading> */} | |
<Grid |
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 = "postgres" | |
url = env("DATABASE_URL") | |
} | |
generator client { | |
provider = "prisma-client-js" |
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 * as React from 'react'; | |
import { HiTrash } from 'react-icons/hi'; | |
import { useLongPress } from '../lib/hooks'; | |
import ChatHeadshot from './ChatHeadshot'; | |
import DeleteConversationModal from './DeleteConversationModal'; | |
import { useDeviceDetect } from '../lib/hooks'; | |
import { killEvent } from '../lib/utils'; | |
type ConversationPreviewProps = { | |
conversation: any; |
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, useEffect, useContext, createContext } from 'react'; | |
import Router from 'next/router'; | |
import nookies from 'nookies'; | |
import firebase from './firebase'; | |
import { createOrUpdateUser, deleteUser, setUserStatus } from './db'; | |
import { useCometChat } from './cometChat'; | |
const rtdb = firebase.database(); | |
const formatUser = async (user: firebase.User) => { |
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 { TRPCError } from "@trpc/server"; | |
import { z } from "zod"; | |
import { createProtectedRouter } from "./context"; | |
export const stripeRouter = createProtectedRouter() | |
.middleware(async ({ ctx, next }) => { | |
// Any queries or mutations after this middleware will | |
// raise an error unless there is a current session | |
if (!ctx.session) { | |
throw new TRPCError({ code: "UNAUTHORIZED" }); |
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 * as React from "react"; | |
import { GetServerSidePropsContext } from "next"; | |
import { unstable_getServerSession } from "next-auth"; | |
import AppLayout from "../../layouts/AppLayout"; | |
import { trpc } from "../../utils/trpc"; | |
import { authOptions } from "../api/auth/[...nextauth]"; | |
import { | |
Button, | |
CopyButton, | |
Tooltip, |
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 { useState, useCallback, useEffect } from 'react'; | |
import useEmblaCarousel from 'embla-carousel-react'; | |
import { EmblaOptionsType } from 'embla-carousel-react'; | |
export const useSlider = (options?: EmblaOptionsType) => { | |
const [isPrevButtonEnabled, setIsPrevButtonEnabled] = useState<boolean>(false); | |
const [isNextButtonEnabled, setIsNextButtonEnabled] = useState<boolean>(false); | |
const [activeSlideIndex, setActiveSlideIndex] = useState<number>(0); | |
const [scrollSnaps, setScrollSnaps] = useState<Array<number>>([]); |
OlderNewer