Skip to content

Commit b87e2d8

Browse files
committed
fix: lint and action
1 parent 973aaf9 commit b87e2d8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/routes/_index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const HeroOne = () => {
2323
)
2424
};
2525

26-
const HeroTwo = () => {
26+
export const HeroTwo = () => {
2727
return (
2828
<section className="w-full border-b py-12 md:py-24 lg:py-32">
2929
<div className="container grid gap-6 px-4 md:px-6 lg:grid-cols-2 lg:gap-12 xl:gap-20">

app/routes/resources+/theme-switch.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function ThemeSwitch({
7070
}
7171

7272
return (
73-
<fetcher.Form method="POST" {...getFormProps(form)} action='/resources/theme'>
73+
<fetcher.Form method="POST" {...getFormProps(form)} action='/resources/theme-switch'>
7474
<input type="hidden" name="theme" value={nextMode} />
7575
<div className="flex gap-2">
7676
<button
@@ -90,7 +90,7 @@ export function ThemeSwitch({
9090
*/
9191
export function useOptimisticThemeMode() {
9292
const fetchers = useFetchers()
93-
const themeFetcher = fetchers.find(f => f.formAction === '/')
93+
const themeFetcher = fetchers.find(f => f.formAction === '/resources/theme-switch')
9494

9595
if (themeFetcher && themeFetcher.formData) {
9696
const submission = parseWithZod(themeFetcher.formData, {

app/utils/misc.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useFormAction, useNavigation } from '@remix-run/react'
2-
import { useHydrated } from 'remix-utils/use-hydrated'
32
import { clsx, type ClassValue } from 'clsx'
43
import { useEffect, useMemo, useRef, useState } from 'react'
4+
import { useHydrated } from 'remix-utils/use-hydrated'
55
import { useSpinDelay } from 'spin-delay'
66
import { extendTailwindMerge } from 'tailwind-merge'
77
import { extendedTheme } from './extended-theme.ts'

0 commit comments

Comments
 (0)