Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
remix-run-bot committed Nov 15, 2023
1 parent 12d43f9 commit 5ea4724
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/discussion/state-management.md
Expand Up @@ -276,8 +276,7 @@ export async function loader({
request,
}: LoaderFunctionArgs) {
const cookieHeader = request.headers.get("Cookie");
const cookie =
(await prefs.parse(cookieHeader)) || {};
const cookie = (await prefs.parse(cookieHeader)) || {};
return json({ sidebarIsOpen: cookie.sidebarIsOpen });
}

Expand All @@ -286,8 +285,7 @@ export async function action({
request,
}: ActionFunctionArgs) {
const cookieHeader = request.headers.get("Cookie");
const cookie =
(await prefs.parse(cookieHeader)) || {};
const cookie = (await prefs.parse(cookieHeader)) || {};
const formData = await request.formData();

const isOpen = formData.get("sidebar") === "open";
Expand Down

0 comments on commit 5ea4724

Please sign in to comment.