{
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 arr = document.getElementById('followers') | |
| const followers = []; | |
| arr.querySelectorAll('a[href^="/"]').forEach(a => { | |
| followers.push(a.href) | |
| }); | |
| const following = []; | |
| const arr2 = document.getElementById('following') | |
| arr2.querySelectorAll('a[href^="/"]').forEach(a => { | |
| following.push(a.href) |
Setting up new yarn nextjs project
yarn create next-app my-app # Create new project my-app
yarn install # Install all dependencies
yarn dev # Run development server
yarn add lodash # Add new package
yarn remove lodash # Remove a packageDepends on what version your on. For 12 next/future/image and 13 here's a fun trick:
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 Image from "next/image"; | |
| import toast from "react-hot-toast"; | |
| import { X } from "lucide-react"; // Assuming the X icon from lucide-react is available | |
| import { Card, CardContent, CardFooter } from "./card"; | |
| import { useState, useCallback, Dispatch, SetStateAction } from "react"; | |
| import { useDropzone, FileRejection } from "react-dropzone"; | |
| type ImageDropzoneHook = { |