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 fs from 'fs'; | |
import path from 'path'; | |
function mapFiles(dir, excludedPaths = [], prefix = '', isLast = true) { | |
const items = fs.readdirSync(dir); | |
items.forEach((item, index) => { | |
const fullPath = path.join(dir, item); | |
const isExcludedPath = excludedPaths.includes(fullPath); | |
const isDirectory = fs.statSync(fullPath).isDirectory(); |
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 { execSync } = require("child_process"); | |
var XLSX = require("xlsx"); | |
const startTime = new Date(); | |
// Function to calculate and format elapsed time | |
const getElapsedTime = () => { | |
const elapsed = new Date() - startTime; | |
const minutes = Math.floor(elapsed / 60000).toString().padStart(2, "0"); | |
const seconds = Math.floor((elapsed % 60000) / 1000).toString().padStart(2, "0"); |
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
'use client'; | |
import React, { ReactNode } from 'react'; | |
import { useEffect } from 'react'; | |
function useScrollHighlight() { | |
useEffect(() => { | |
const runHighlight = () => { | |
const params = new URLSearchParams(window.location.search); | |
const section = params.get('highlight'); | |
if (!section) return; |