Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Prettier fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zmillman committed May 5, 2024
1 parent ce182cf commit 5fb39f3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/components/AppShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface AppShellProps {
* Wraps content with a topbar for signing in / out
*/
export default function AppShell(
props: React.PropsWithChildren<AppShellProps>
props: React.PropsWithChildren<AppShellProps>,
) {
return (
<Box>
Expand Down
14 changes: 11 additions & 3 deletions app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { json, Links, Meta, type MetaFunction, Outlet, Scripts, useLoaderData, } from "@remix-run/react";
import {
json,
Links,
Meta,
type MetaFunction,
Outlet,
Scripts,
useLoaderData,
} from "@remix-run/react";
import type { LinksFunction, LoaderFunctionArgs } from "@remix-run/node";
import "@radix-ui/themes/styles.css";
import { Container, Theme } from "@radix-ui/themes";
Expand All @@ -13,10 +21,10 @@ export const meta: MetaFunction = () => {
return [{ title: "Remix Enterprise" }];
};

export const loader = async ({request}: LoaderFunctionArgs) => {
export const loader = async ({ request }: LoaderFunctionArgs) => {
const session = await getSession(request.headers.get("Cookie"));
return json({ user: session.data.user });
}
};

export default function App() {
const data = useLoaderData<typeof loader>();
Expand Down
4 changes: 3 additions & 1 deletion app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export default function HomePage() {
the <Link to="/dashboard">Dashboard</Link> if you're signed in.
</Text>
<Heading size="3">Session</Heading>
<pre><Code>{JSON.stringify(data.session, null, 2)}</Code></pre>
<pre>
<Code>{JSON.stringify(data.session, null, 2)}</Code>
</pre>
</>
);
}
1 change: 0 additions & 1 deletion app/routes/auth.google.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ export const loader = () => redirect("/login");
export const action = ({ request }: ActionFunctionArgs) => {
return authenticator.authenticate("google", request);
};

2 changes: 1 addition & 1 deletion app/routes/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
headers: {
"Set-Cookie": await commitSession(session), // clear flash message from the cookie
},
}
},
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/services/auth.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const googleStrategy = new GoogleStrategy(
// return User.findOrCreate({ email: profile.emails[0].value })

return { name: profile.displayName, email: profile.emails[0].value };
}
},
);

authenticator.use(googleStrategy);
Expand Down

0 comments on commit 5fb39f3

Please sign in to comment.