Skip to content

Commit 0fd0084

Browse files
feat(user): update existing links to use InlineLink component (#1353)
* feat: use InlineLink component * feat: remove unwanted imports * feat: remove unnecessary classname * feat: update key value
1 parent 419c8fe commit 0fd0084

6 files changed

Lines changed: 4 additions & 31 deletions

File tree

packages/ui/src/assets/css/general.css

Lines changed: 0 additions & 13 deletions
This file was deleted.

packages/ui/src/assets/css/index.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,3 @@
4343
/* Theme CSS */
4444
@import "./accordion-theme.css";
4545
@import "./tab-theme.css";
46-
47-
@import "./general.css";

packages/user/src/components/AuthLinks.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Fragment } from "react";
2-
import { Link } from "react-router-dom";
1+
import { InlineLink } from "@dzangolab/react-ui";
32

43
import { LinkType } from "@/types/types";
54

@@ -18,15 +17,9 @@ export const AuthLinks = ({ className, links }: ILinkProperties) => {
1817
return (
1918
<div className={linksClassName}>
2019
{links.map((link) => {
21-
return (
22-
<Fragment key={link.label}>
23-
{link.display ? (
24-
<Link to={link.to} className={link.className}>
25-
{link.label}
26-
</Link>
27-
) : null}
28-
</Fragment>
29-
);
20+
return link.display ? (
21+
<InlineLink key={link.to} label={link.label} to={link.to} />
22+
) : null;
3023
})}
3124
</div>
3225
);

packages/user/src/components/Login/LoginWrapper.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ export const LoginWrapper: FC<IProperties> = ({
3737

3838
const links: Array<LinkType> = [
3939
{
40-
className: "native-link",
4140
display: config.features?.signup !== false && showSignupLink,
4241
label: t("login.links.signup"),
4342
to: config.customPaths?.signup || DEFAULT_PATHS.SIGNUP,
4443
},
4544
{
46-
className: "native-link",
4745
display:
4846
config.features?.forgotPassword !== false && showForgotPasswordLink,
4947
label: t("login.links.forgotPassword"),

packages/user/src/components/SignupWrapper.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ export const SignupWrapper: React.FC<IProperties> = ({
4040

4141
const links: Array<LinkType> = [
4242
{
43-
className: "native-link",
4443
display: showLoginLink,
4544
label: t("signup.links.login"),
4645
to: loginPath,
4746
},
4847
{
49-
className: "native-link",
5048
display:
5149
showForgotPasswordLink && config.features?.forgotPassword !== false,
5250
label: t("signup.links.forgotPassword"),

packages/user/src/views/ForgotPassword.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export const ForgotPassword = ({ centered = true }: { centered?: boolean }) => {
1919

2020
const links: Array<LinkType> = [
2121
{
22-
className: "native-link",
2322
display: true,
2423
label: t("forgotPassword.links.login"),
2524
to: config.customPaths?.login || DEFAULT_PATHS.LOGIN,

0 commit comments

Comments
 (0)