Skip to content

Commit

Permalink
Merge pull request #488 from EscolaLMS/SPRAW-118
Browse files Browse the repository at this point in the history
SPRAW-119 && SPRAW-118 && SPRAW-117
  • Loading branch information
mtmotyka authored Apr 26, 2024
2 parents 6fa6a73 + f5ee7a3 commit 6ac9427
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const CoursesDetailsSidebar: React.FC<Props> = ({
course,
onRequestAccess,
}) => {
const { user, courseAccess, settings } = useContext(EscolaLMSContext);
const { user, courseAccess } = useContext(EscolaLMSContext);
const { t } = useTranslation();
const { id } = useParams<{ id: string }>();
const { progress } = useCourseProgress(Number(id));
Expand Down Expand Up @@ -123,7 +123,7 @@ const CoursesDetailsSidebar: React.FC<Props> = ({
) : (
<ContentLoader />
)}
<Text>{settings?.value?.mobile?.infotext}</Text>
{/* <Text>{settings?.value?.mobile?.infotext}</Text> */}
<div className="pricing-card-features">
{course.duration && (
<IconText
Expand Down Expand Up @@ -165,7 +165,7 @@ const CoursesDetailsSidebar: React.FC<Props> = ({
}
/>
)}
{course.users_count ? (
{/* {course.users_count ? (
<IconText
text={
<IconTextWrapper>
Expand All @@ -176,7 +176,7 @@ const CoursesDetailsSidebar: React.FC<Props> = ({
/>
) : (
""
)}
)} */}
</div>
{!user.value ? (
<></>
Expand Down
27 changes: 14 additions & 13 deletions src/components/_App/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { EscolaLMSContext } from "@escolalms/sdk/lib/react";
import { isMobile } from "react-device-detect";
import { useTranslation } from "react-i18next";
import { PageListItem, PaginatedMetaList } from "@escolalms/sdk/lib/types/api";
import { Link } from "@escolalms/components/lib/components/atoms/Link/Link";
import { Link as LmsLink } from "@escolalms/components/lib/components/atoms/Link/Link";
import { Link } from "react-router-dom";
import Container from "@/components/Common/Container";
import routeRoutes from "@/components/Routes/routes";
import { WellmsLogo } from "@/icons/index";
Expand Down Expand Up @@ -184,42 +185,42 @@ const Footer = () => {
{footerFromApi.map((link: LinkObject) => {
return (
!!link.link && (
<Link
<LmsLink
key={link.link.toString()}
className="single-link"
href={link.link}
>
{typeof link.label === "object" && (
<Text size="14">{link.label[i18n.language]}</Text>
)}
</Link>
</LmsLink>
)
);
})}
</>
) : (
<>
<Link className="single-link" href={routeRoutes.home}>
<Link className="single-link" to={routeRoutes.home}>
<Text size="16">{t<string>("Footer.HomePage")}</Text>
</Link>
<Link className="single-link" href={routeRoutes.courses}>
<Link className="single-link" to={routeRoutes.courses}>
<Text size="16">{t<string>("Footer.Courses")}</Text>
</Link>
{user.value ? (
<Link className="single-link" href={routeRoutes.myProfile}>
<Link className="single-link" to={routeRoutes.myProfile}>
<Text size="16">{t<string>("Footer.UserProfile")}</Text>
</Link>
) : (
<>
<Link className="single-link" href={routeRoutes.login}>
<Link className="single-link" to={routeRoutes.login}>
<Text size="16">{t<string>("Header.Login")}</Text>
</Link>
<Link className="single-link" href={routeRoutes.register}>
<Link className="single-link" to={routeRoutes.register}>
<Text size="16">{t<string>("Header.Register")}</Text>
</Link>
</>
)}
<Link className="single-link" href={routeRoutes.cart}>
<Link className="single-link" to={routeRoutes.cart}>
<Text size="16">{t<string>("Footer.Cart")}</Text>
</Link>
</>
Expand All @@ -232,13 +233,13 @@ const Footer = () => {
{chunkArray(pages.list, 4).map((chunk: PageListItem[]) => (
<div className="chunk-pages" key={chunk.toString()}>
{chunk.map((page: PageListItem) => (
<Link
<LmsLink
key={page.id}
className="single-link"
href={`/#/${page.slug}`}
>
<Text size="14">{page.title}</Text>
</Link>
</LmsLink>
))}
</div>
))}
Expand All @@ -252,9 +253,9 @@ const Footer = () => {

<div className="copyrights">
<Text size="14">{t<string>("Footer.PoweredBy")}</Text>
<Link href="https://www.wellms.io">
<LmsLink href="https://www.wellms.io">
<WellmsLogo />
</Link>
</LmsLink>
</div>
</Container>
<GoTop />
Expand Down

0 comments on commit 6ac9427

Please sign in to comment.