Hey guys, I've been trying to follow the dark mode example and also tutorial provided here (https://www.mattstobbs.com/remix-dark-mode/#3-persisting-the-users-choice) to implement into an app based off of the remix indie stack. I've been struggling with an error where I get a 404 response upon calling this line of code which is inside of theme-provider.tsx:
persistThemeRef.current.submit({ theme }, { action: 'action/set-theme', method: 'post' });
where persistThemeRef is a mutable ref object of persistTheme which is set equal to useFetcher().
It seems the error is regarding not being able to find action/set-theme route, which I'm not sure why as I think I'm doing routing correctly. I have a routes folder which contains subdirectories and index.tsx files, with one _index.tsx file at the root level of routes, as well as a utils folder for theme-provider.tsx (image attached).
Am I doing something wrong with my routing here? should I be providing a different path to action/set-theme?