mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -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
|
||||
<SquareArrowOutUpRightIcon className="size-icon-xs" />
|
||||
Terms of Service
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user