refactor: migrate TermsOfServiceLink from MUI to shadcn/ui (#20260)

## Summary

Migrate the `TermsOfServiceLink` component from MUI to shadcn/ui

## Changes

- **Replaced** `@mui/material/Link` with the custom `Link` component
from `components/Link/Link` (shadcn/ui)
- **Migrated** Emotion `css` prop to Tailwind utility classes
- **Preserved** external link icon functionality (automatically provided
by shadcn Link component)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jaayden Halko
2025-10-15 12:16:18 +01:00
committed by GitHub
co-authored by Claude
parent e0b1536075
commit 3699ff6b48
2 changed files with 6 additions and 15 deletions
+1 -4
View File
@@ -68,10 +68,7 @@ export const LoginPageView: FC<LoginPageViewProps> = ({
</div>
<div>{buildInfo?.version}</div>
{tosAccepted && (
<TermsOfServiceLink
url={authMethods?.terms_of_service_url}
css={{ fontSize: 12 }}
/>
<TermsOfServiceLink url={authMethods?.terms_of_service_url} />
)}
</footer>
</div>
@@ -1,27 +1,21 @@
import Link from "@mui/material/Link";
import { SquareArrowOutUpRightIcon } from "lucide-react";
import { Link } from "components/Link/Link";
import type { FC } from "react";
interface TermsOfServiceLinkProps {
className?: string;
url?: string;
}
export const TermsOfServiceLink: FC<TermsOfServiceLinkProps> = ({
className,
url,
}) => {
export const TermsOfServiceLink: FC<TermsOfServiceLinkProps> = ({ url }) => {
return (
<div css={{ paddingTop: 12, fontSize: 16 }} className={className}>
<div className="pt-3 text-base">
By continuing, you agree to the{" "}
<Link
css={{ fontWeight: 500, textWrap: "nowrap" }}
className="font-medium whitespace-nowrap"
href={url}
target="_blank"
rel="noreferrer"
>
Terms of Service&nbsp;
<SquareArrowOutUpRightIcon className="size-icon-xs" />
Terms of Service
</Link>
</div>
);