impress-2020/pages/outfits/new.tsx
Matchu eb602556bf [WIP] Migrate outfit page, with known bug
Okay so there's a bug here where navigating directly to /outfits/new?species=X&color=Y will reset to a Blue Acara, because Next.js statically renders the Blue Acara on build, and then rehydrates a Blue Acara on load, and then updates the real page query in—and our state management for outfits doesn't *listen* to URL changes, it only *emits* them.

It'd be good to consider like… changing that? It's tricky because our state model is… not simple, when you consider that we have both local state and URL state and saved-outfit state in play. But it could be done! But there might be another option too. I'll take a look at this after moving the home page, which will give me the chance to see what the experience navigating in from there is like!
2022-09-15 00:27:49 -07:00

10 lines
294 B
TypeScript

import WardrobePage from "../../src/app/WardrobePage";
import type { NextPageWithLayout } from "../_app";
const WardrobePageWrapper: NextPageWithLayout = () => {
return <WardrobePage />;
};
WardrobePageWrapper.renderWithLayout = (children) => children;
export default WardrobePageWrapper;