Skip to content
19 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Account settings in the same shape as a workspace's1import { redirect } from "react-router";
2
3import type { Route } from "./+types/logout";
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put4import { assertSameOrigin, endSession, nextPath } from "../lib/session.server";
Account settings in the same shape as a workspace's5
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put6/**
7 * Signs out, then goes home, or to `next` (a path on g1t only): "Switch
8 * account" signs out to the sign-in page, which brings them back.
9 */
Account settings in the same shape as a workspace's10export async function action({ request }: Route.ActionArgs) {
11 assertSameOrigin(request);
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put12 throw redirect(nextPath(request), {
Account settings in the same shape as a workspace's13 headers: { "set-cookie": await endSession(request) },
14 });
15}
16
17export function loader() {
18 throw redirect("/");
19}

This file's history is long; its oldest lines are credited to the oldest commit read.