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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Dialog Example</title> | |
| <style> | |
| dialog { | |
| padding: 1.5rem; | |
| border-radius: 6px; | |
| border: 1px solid #ccc; |
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"; | |
| function ScrollOnLoad() { | |
| const targetRef = useRef(null); | |
| useEffect(() => { | |
| targetRef.current?.scrollIntoView({ | |
| behavior: "smooth", // smooth scrolling effect | |
| block: "start", // aligns the element at the top of the viewport | |
| }); |
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
| # ---------------------------- | |
| # Command Definitions | |
| # ---------------------------- | |
| $commands = @( | |
| @{ | |
| Name = "Hello World - Start Dev" | |
| Dir = "C:\repo\hello-world" | |
| Command = "npm run start" | |
| }, | |
| @{ |
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 path from 'path'; | |
| import { fileURLToPath } from 'url'; | |
| // __dirname is not available in Next.js, so we'll make it ourselves | |
| // More info on what dirname is: | |
| // https://nodejs.org/docs/latest/api/modules.html#__dirname | |
| const dirname = path.dirname(fileURLToPath(import.meta.url)); | |
| /* | |
| This Next.js config sets up SVGR, which allows you to import SVGs as if they were React components. |
| Date Format | Example |
|---|---|
| MM YY | 02 21 |
| MM YYYY | 02 2021 |
| MMM YYYY | Feb 2021 |
| MMMM YYYY | February 2021 |
| YY MM | 21 02 |
| YYYY MM | 2021 02 |
| YYYY MMM | 2021 Feb |
| YYYY MMMM | 2021 February |