"use client";
import { useRef } from "react";
import { Cloudinary } from "@cloudinary/url-gen";
import {
AdvancedVideo,
AdvancedImage,
lazyload,
accessibility,
} from "@cloudinary/react";
This file contains 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 } from "react"; | |
export default function ProgressBar() { | |
const scheme = "#BD2546"; // hardcode progress bar theme or make it dynamic | |
const progress = 78; // progress value | |
function handleProgress(value: number, circle: "track" | "progress") { | |
const track = 2 * 3.14 * 90; | |
const progress = track * ((100 - value) / 100); | |
return circle === "track" ? track : progress; |
This file contains 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
// Custom hook | |
import { useState, useEffect } from "react"; | |
export function useOnlineStatus() { | |
const [isOnline, setIsOnline] = useState<boolean>(true); | |
useEffect(() => { | |
function handleOnline() { | |
setIsOnline(true); | |
} |
First install the iconify library or follow this [guide][iconify]
npm install --save-dev @iconify/react
// using yarn
yarn add --dev @iconify/react
Next import the component from the iconify library
This file contains 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 domains = [ | |
"gmail.com", | |
"yahoo.com", | |
"hotmail.com", | |
"aol.com", | |
"hotmail.co.uk", | |
"hotmail.fr", | |
"msn.com", | |
"yahoo.fr", | |
"wanadoo.fr", |
{
"workbench.colorTheme": "Darker than One Dark Pro",
"editor.minimap.enabled": false,
"liveServer.settings.donotShowInfoMsg": true,
"liveServer.settings.donotVerifyTags": true,
"vsicons.dontShowNewVersionMessage": true,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"workbench.startupEditor": "newUntitledFile",
import React, { useEffect } from "react";
export default function Buymeacoffee() {
useEffect(() => {
const script = document.createElement("script");
const div = document.getElementById("supportByBMC");
script.setAttribute("data-name", "BMC-Widget");
script.src = "https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js";
script.setAttribute("data-id", "evavic44");
NewerOlder