mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-18 02:31:56 +10:00
remove caching from resumes
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { type Dispatch, type SetStateAction, useEffect, useState } from "react";
|
||||
import { useLocalStorage, useMediaQuery, useUpdateEffect } from "usehooks-ts";
|
||||
import { useLocalStorage, useMediaQuery } from "usehooks-ts";
|
||||
|
||||
const COLOR_SCHEME_QUERY = "(prefers-color-scheme: dark)";
|
||||
|
||||
@ -17,9 +17,9 @@ export const useTheme = (): UseThemeOutput => {
|
||||
const [isDarkMode, setDarkMode] = useState<boolean>(isDarkOS);
|
||||
const [theme, setTheme] = useLocalStorage<Theme>("theme", "system");
|
||||
|
||||
useUpdateEffect(() => {
|
||||
if (theme === "system") setDarkMode(isDarkOS);
|
||||
}, [isDarkOS]);
|
||||
useEffect(() => {
|
||||
if (theme === "system") setDarkMode((prev) => !prev);
|
||||
}, [theme]);
|
||||
|
||||
useEffect(() => {
|
||||
switch (theme) {
|
||||
|
||||
@ -34,7 +34,7 @@ import { Link } from "@tiptap/extension-link";
|
||||
import { TextAlign } from "@tiptap/extension-text-align";
|
||||
import { Underline } from "@tiptap/extension-underline";
|
||||
import { Editor, EditorContent, EditorContentProps, useEditor } from "@tiptap/react";
|
||||
import { StarterKit } from "@tiptap/starter-kit";
|
||||
import StarterKit from "@tiptap/starter-kit";
|
||||
import { forwardRef, useCallback } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { z } from "zod";
|
||||
|
||||
Reference in New Issue
Block a user