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, | |
| useContext, | |
| createContext, | |
| type ReactNode, | |
| } from 'react'; | |
| type AccordionContextValue = { | |
| isOpen: boolean; | |
| toggle: () => void; |
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 { | |
| ArgumentMetadata, | |
| Injectable, | |
| PipeTransform, | |
| } from '@nestjs/common'; | |
| import { plainToInstance } from 'class-transformer'; | |
| import { validate } from 'class-validator'; | |
| export class ValidationException extends Error { |
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 { useEffect, useRef } from 'react'; | |
| type SubscriptionStatus = { | |
| isExpired: boolean; | |
| isActive: boolean; | |
| }; | |
| type SubscriptionWatcherOptions = { | |
| isUserVerified: boolean; | |
| pollIntervalMs?: number; |
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
| type CaptionTrack = { | |
| languageCode: string; | |
| kind?: string; // e.g. "asr" for auto-generated | |
| baseUrl: string; | |
| }; | |
| type PlayerResponse = { | |
| videoDetails: { | |
| videoId: string; | |
| title: 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
| import { useCallback, useEffect, useRef, useState } from 'react'; | |
| export const useScreenshot = () => { | |
| const [isScreenshotEnabled, setIsScreenshotEnabled] = useState(false); | |
| const [selection, setSelection] = useState('None'); | |
| const [startX, setStartX] = useState(0); | |
| const [startY, setStartY] = useState(0); | |
| const [dx, setDx] = useState(0); | |
| const [dy, setDy] = useState(0); | |
| const containerRef = useRef(null); |
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 { useEffect, useState } from "react"; | |
| import { debounce } from "lodash"; | |
| import { normalizeString } from "@/utils"; | |
| export default function useScrollTracker(sectionIds: string[]) { | |
| const [activeSection, setActiveSection] = useState(""); | |
| useEffect(() => { | |
| const onScroll = debounce(() => { | |
| let currentId = ""; |