mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
de6c1735d9
* linear settings and oauth * unfurl * unfurl impl fix for recent merge from main * fetch labels * state icon * linear icon * uninstall hook * lint * i18n * cleanup * use workspace key, reduce icon size * determine completion percentage * extract completionPercentage to separate method
24 lines
633 B
TypeScript
24 lines
633 B
TypeScript
import * as React from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import Button, { type Props } from "~/components/Button";
|
|
import useCurrentTeam from "~/hooks/useCurrentTeam";
|
|
import { redirectTo } from "~/utils/urls";
|
|
import { LinearUtils } from "../../shared/LinearUtils";
|
|
|
|
export function LinearConnectButton(props: Props<HTMLButtonElement>) {
|
|
const { t } = useTranslation();
|
|
const team = useCurrentTeam();
|
|
|
|
return (
|
|
<Button
|
|
onClick={() =>
|
|
redirectTo(LinearUtils.authUrl({ state: { teamId: team.id } }))
|
|
}
|
|
neutral
|
|
{...props}
|
|
>
|
|
{t("Connect")}
|
|
</Button>
|
|
);
|
|
}
|