Skip to content

Commit c986fc4

Browse files
committed
Merge branch 'dev' into stage
2 parents e9e8d47 + 07bba1e commit c986fc4

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [1.2.1](https://github.com/dacadeorg/dacade-frontend-app/compare/v1.2.0...v1.2.1) (2023-12-08)
4+
5+
6+
### Bug Fixes
7+
8+
* remove learning modules list in the challenge header ([bbefe48](https://github.com/dacadeorg/dacade-frontend-app/commit/bbefe48f19b5c71dace8aa2a337aa63432b70cd1))
9+
310
## [1.2.0](https://github.com/dacadeorg/dacade-frontend-app/compare/v1.1.0...v1.2.0) (2023-12-08)
411

512

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dacade",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",

src/components/sections/challenges/Header.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Section from "@/components/sections/communities/_partials/Section";
22
import Header from "@/components/sections/communities/_partials/Header";
3-
import ObjectiveList from "@/components/list/Objectives";
43
import { useSelector } from "@/hooks/useTypedSelector";
54
import { useTranslation } from "next-i18next";
65
import { ReactElement } from "react";
@@ -19,9 +18,7 @@ export default function ChallengeHeader(): ReactElement {
1918
return (
2019
<div>
2120
<Header isTeamChallenge={challenge?.isTeamChallenge} title={challenge?.name} subtitle={t("communities.challenge.title")} isHackathon={challenge?.isHackathon} />
22-
<Section subtitle={challenge?.description}>
23-
{challenge?.learningModules?.length ? <ObjectiveList objectives={challenge?.learningModules?.map((module) => module.title) || []} /> : <></>}
24-
</Section>
21+
<Section subtitle={challenge?.description} />
2522
</div>
2623
);
2724
}

src/components/sections/communities/_partials/Section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface SectionProps {
1515
id?: string;
1616
className?: string;
1717
hideSubtitleOnMobile?: boolean;
18-
children: ReactNode;
18+
children?: ReactNode;
1919
}
2020

2121
/**

src/pages/communities/[slug]/challenges/[challenge_id]/index.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import { getTeamByChallenge, getUserInvitesByChallenge } from "@/store/services/
3232
import { fetchChallenge, fetchChallengeAuthenticated } from "@/store/services/communities/challenges";
3333
import Loader from "@/components/ui/Loader";
3434
import { NotFoundError } from "@/utilities/errors/NotFoundError";
35+
import Hint from "@/components/ui/Hint";
36+
import Link from "next/link";
3537

3638
/**
3739
* interface for ChallengePage multiSelector
@@ -75,7 +77,6 @@ export default function ChallengePage(props: {
7577
isAuthenticated: (state: IRootState) => authCheck(state),
7678
isSubmissionLoading: (state: IRootState) => state.challenges.loading,
7779
});
78-
7980
const title = useMemo(() => getMetadataTitle(t("communities.challenge.title"), challenge?.name || ""), [challenge?.name, t]);
8081

8182
const navigation = useNavigation();
@@ -109,7 +110,7 @@ export default function ChallengePage(props: {
109110
<RatingRubric ratingCriteria={challenge?.ratingCriteria} selected={[]} />
110111
<BestSubmissions />
111112

112-
{isAuthenticated && (
113+
{isAuthenticated ? (
113114
<div>
114115
{isSubmissionLoading ? (
115116
<div className="h-24 sm:h-48 grid place-items-center">
@@ -131,6 +132,15 @@ export default function ChallengePage(props: {
131132
</>
132133
)}
133134
</div>
135+
) : (
136+
<div>
137+
<Hint className="mt-6 flex flex-col md:flex-row">
138+
<p>To be able to submit</p>&nbsp;
139+
<Link className="underline" href="/login">
140+
Login.
141+
</Link>
142+
</Hint>
143+
</div>
134144
)}
135145
</div>
136146
</Wrapper>

0 commit comments

Comments
 (0)