Skip to content

Commit

Permalink
fix optimistic theme
Browse files Browse the repository at this point in the history
forgot to change the action route path, oops
  • Loading branch information
nichtsam committed Jun 28, 2024
1 parent 2b8eb72 commit 280f1c8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/utils/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export const useTheme = () => {

export function useOptimisticThemeMode() {
const fetchers = useFetchers();
const themeFetcher = fetchers.find(
(f) => f.formAction === "/action/set-theme",
);
const themeFetcher = fetchers.find((f) => f.formAction === "/");

if (themeFetcher && themeFetcher.formData) {
const submission = parseWithZod(themeFetcher.formData, {
Expand Down

0 comments on commit 280f1c8

Please sign in to comment.