fixed errors
This commit is contained in:
parent
956109f34a
commit
00ee5788a8
@ -14,6 +14,23 @@ import AspectRatio from "./AspectRatio";
|
|||||||
import Card from "./Card";
|
import Card from "./Card";
|
||||||
import Link from "./typography/Link";
|
import Link from "./typography/Link";
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* Icons */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
import { ReactComponent as SVGArrowRight } from "assets/svg/arrow-right.svg";
|
||||||
|
import { ReactComponent as SVGCaretRight } from "assets/svg/caret-right.svg";
|
||||||
|
import { ReactComponent as SVGArrowLeft } from "assets/svg/arrow-left.svg";
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* Swiper */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
import { Swiper, SwiperSlide } from "swiper/react";
|
||||||
|
import SwiperCore, { Navigation } from "swiper";
|
||||||
|
import { Pagination } from "swiper";
|
||||||
|
import "swiper/css/pagination";
|
||||||
|
import "swiper/css/navigation";
|
||||||
|
// import "./styles.css";
|
||||||
|
import "swiper/css";
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* Article mock data */
|
/* Article mock data */
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
@ -62,25 +79,6 @@ const articles = [
|
|||||||
Link: "http://pinterest.com",
|
Link: "http://pinterest.com",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
/* Icons */
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
import { ReactComponent as SVGArrowRight } from "assets/svg/arrow-right.svg";
|
|
||||||
import { ReactComponent as SVGCaretRight } from "assets/svg/caret-right.svg";
|
|
||||||
import { ReactComponent as SVGArrowLeft } from "assets/svg/arrow-left.svg";
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
/* Swiper */
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
import { Swiper, SwiperSlide } from "swiper/react";
|
|
||||||
import SwiperCore, { Navigation } from "swiper";
|
|
||||||
import { Pagination } from "swiper";
|
|
||||||
import "swiper/css/pagination";
|
|
||||||
import "swiper/css/navigation";
|
|
||||||
import "./styles.css";
|
|
||||||
import "swiper/css";
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* How many Skeleton cards should be added to the design */
|
/* How many Skeleton cards should be added to the design */
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
@ -14,9 +14,20 @@ import { Swiper, SwiperSlide } from "swiper/react";
|
|||||||
import SwiperCore, { Navigation } from "swiper";
|
import SwiperCore, { Navigation } from "swiper";
|
||||||
import "swiper/css/pagination";
|
import "swiper/css/pagination";
|
||||||
import "swiper/css/navigation";
|
import "swiper/css/navigation";
|
||||||
import "./styles.css";
|
// import "./styles.css";
|
||||||
import "swiper/css";
|
import "swiper/css";
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* Icons */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
import { ReactComponent as SVGCaretRight } from "assets/svg/caret-right.svg";
|
||||||
|
import Link from "./typography/Link";
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* Variables */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
SwiperCore.use([Navigation]);
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* Authors data mock */
|
/* Authors data mock */
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
@ -46,17 +57,6 @@ const authors = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
/* Icons */
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
import { ReactComponent as SVGCaretRight } from "assets/svg/caret-right.svg";
|
|
||||||
import Link from "./typography/Link";
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
/* Variables */
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
SwiperCore.use([Navigation]);
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* Number of Cards */
|
/* Number of Cards */
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
@ -52,7 +52,7 @@ export function Footer() {
|
|||||||
const mainLinksPart = useMemo(
|
const mainLinksPart = useMemo(
|
||||||
() =>
|
() =>
|
||||||
mainLinks.map((link) => (
|
mainLinks.map((link) => (
|
||||||
<Link
|
<RouterLink
|
||||||
key={link.url}
|
key={link.url}
|
||||||
className="py-1 md:py-2 text-gray-900 px-4"
|
className="py-1 md:py-2 text-gray-900 px-4"
|
||||||
disabled={link.disabled}
|
disabled={link.disabled}
|
||||||
@ -61,7 +61,7 @@ export function Footer() {
|
|||||||
<Typography className="" fontWeightVariant="semibold" htmlTag="p">
|
<Typography className="" fontWeightVariant="semibold" htmlTag="p">
|
||||||
{link.label.toUpperCase()}
|
{link.label.toUpperCase()}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Link>
|
</RouterLink>
|
||||||
)),
|
)),
|
||||||
mainLinks
|
mainLinks
|
||||||
);
|
);
|
||||||
|
@ -2,15 +2,20 @@ import classNames from "classnames";
|
|||||||
import { NavLink, NavLinkProps } from "react-router-dom";
|
import { NavLink, NavLinkProps } from "react-router-dom";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
enabled?: boolean;
|
disabled?: boolean;
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
} & NavLinkProps;
|
} & NavLinkProps;
|
||||||
|
|
||||||
export function RouterLink({ children, enabled = true, className, to }: Props) {
|
export function RouterLink({
|
||||||
|
children,
|
||||||
|
disabled = false,
|
||||||
|
className,
|
||||||
|
to,
|
||||||
|
}: Props) {
|
||||||
return (
|
return (
|
||||||
<NavLink
|
<NavLink
|
||||||
to={to}
|
to={to}
|
||||||
className={classNames({ "pointer-events-none": !enabled }, className)}
|
className={classNames({ "pointer-events-none": disabled }, className)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</NavLink>
|
</NavLink>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user