Skip to content

Commit 3699ff6

Browse files
jaaydenhclaude
andauthored
refactor: migrate TermsOfServiceLink from MUI to shadcn/ui (coder#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>
1 parent e0b1536 commit 3699ff6

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

site/src/pages/LoginPage/LoginPageView.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ export const LoginPageView: FC<LoginPageViewProps> = ({
6868
</div>
6969
<div>{buildInfo?.version}</div>
7070
{tosAccepted && (
71-
<TermsOfServiceLink
72-
url={authMethods?.terms_of_service_url}
73-
css={{ fontSize: 12 }}
74-
/>
71+
<TermsOfServiceLink url={authMethods?.terms_of_service_url} />
7572
)}
7673
</footer>
7774
</div>

site/src/pages/LoginPage/TermsOfServiceLink.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
1-
import Link from "@mui/material/Link";
2-
import { SquareArrowOutUpRightIcon } from "lucide-react";
1+
import { Link } from "components/Link/Link";
32
import type { FC } from "react";
43

54
interface TermsOfServiceLinkProps {
6-
className?: string;
75
url?: string;
86
}
97

10-
export const TermsOfServiceLink: FC<TermsOfServiceLinkProps> = ({
11-
className,
12-
url,
13-
}) => {
8+
export const TermsOfServiceLink: FC<TermsOfServiceLinkProps> = ({ url }) => {
149
return (
15-
<div css={{ paddingTop: 12, fontSize: 16 }} className={className}>
10+
<div className="pt-3 text-base">
1611
By continuing, you agree to the{" "}
1712
<Link
18-
css={{ fontWeight: 500, textWrap: "nowrap" }}
13+
className="font-medium whitespace-nowrap"
1914
href={url}
2015
target="_blank"
2116
rel="noreferrer"
2217
>
23-
Terms of Service&nbsp;
24-
<SquareArrowOutUpRightIcon className="size-icon-xs" />
18+
Terms of Service
2519
</Link>
2620
</div>
2721
);

0 commit comments

Comments
 (0)