mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-07-22 21:55:57 -04:00
refactor more hooks
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import HCaptcha from "@hcaptcha/react-hcaptcha";
|
||||
import { useHasMounted } from "../../hooks/use-has-mounted";
|
||||
import { useTheme } from "../../hooks/use-theme";
|
||||
import useHasMounted from "../../hooks/useHasMounted";
|
||||
import useTheme from "../../hooks/useTheme";
|
||||
|
||||
export type CaptchaProps = {
|
||||
size?: "normal" | "compact" | "invisible";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import IFrame from "../IFrame";
|
||||
import { useHasMounted } from "../../hooks/use-has-mounted";
|
||||
import { useTheme } from "../../hooks/use-theme";
|
||||
import useHasMounted from "../../hooks/useHasMounted";
|
||||
import useTheme from "../../hooks/useTheme";
|
||||
import { styled } from "../../lib/styles/stitches.config";
|
||||
|
||||
const Wrapper = styled("div", {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Giscus from "@giscus/react";
|
||||
import { useTheme } from "../../hooks/use-theme";
|
||||
import useTheme from "../../hooks/useTheme";
|
||||
import { styled, theme } from "../../lib/styles/stitches.config";
|
||||
import { giscusConfig } from "../../lib/config";
|
||||
import type { ComponentProps } from "react";
|
||||
|
||||
@@ -2,7 +2,7 @@ import Head from "next/head";
|
||||
import Header from "../Header";
|
||||
import Footer from "../Footer";
|
||||
import { SkipToContentLink, SkipToContentTarget } from "../SkipToContent";
|
||||
import { useTheme } from "../../hooks/use-theme";
|
||||
import useTheme from "../../hooks/useTheme";
|
||||
import { styled, theme, darkTheme } from "../../lib/styles/stitches.config";
|
||||
import type { ComponentProps } from "react";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useHasMounted } from "../../hooks/use-has-mounted";
|
||||
import useHasMounted from "../../hooks/useHasMounted";
|
||||
import { formatDate, formatTimeAgo } from "../../lib/helpers/format-date";
|
||||
|
||||
export type RelativeTimeProps = {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useEffect, useId } from "react";
|
||||
import { useSpring, animated, Globals } from "@react-spring/web";
|
||||
import { useMedia } from "../../hooks/use-media";
|
||||
import { useFirstMountState } from "../../hooks/use-first-mount-state";
|
||||
import { useTheme } from "../../hooks/use-theme";
|
||||
import { useHasMounted } from "../../hooks/use-has-mounted";
|
||||
import useMedia from "../../hooks/useMedia";
|
||||
import useFirstMountState from "../../hooks/useFirstMountState";
|
||||
import useTheme from "../../hooks/useTheme";
|
||||
import useHasMounted from "../../hooks/useHasMounted";
|
||||
import { styled, theme } from "../../lib/styles/stitches.config";
|
||||
|
||||
const Button = styled("button", {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState } from "react";
|
||||
import { TwitterTweetEmbed } from "react-twitter-embed";
|
||||
import { useUpdateEffect } from "../../hooks/use-update-effect";
|
||||
import { useTheme } from "../../hooks/use-theme";
|
||||
import useUpdateEffect from "../../hooks/useUpdateEffect";
|
||||
import useTheme from "../../hooks/useTheme";
|
||||
import { styled } from "../../lib/styles/stitches.config";
|
||||
|
||||
const Wrapper = styled("div", {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import ReactPlayer from "react-player/file";
|
||||
import { useHasMounted } from "../../hooks/use-has-mounted";
|
||||
import useHasMounted from "../../hooks/useHasMounted";
|
||||
import { styled, theme } from "../../lib/styles/stitches.config";
|
||||
import type { FilePlayerProps } from "react-player/file";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import ReactPlayer from "react-player/youtube";
|
||||
import { useHasMounted } from "../../hooks/use-has-mounted";
|
||||
import useHasMounted from "../../hooks/useHasMounted";
|
||||
import { styled, theme } from "../../lib/styles/stitches.config";
|
||||
import type { YouTubePlayerProps } from "react-player/youtube";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user