Skip to content

Commit 3a05451

Browse files
authored
Merge pull request #992 from dacadeorg/fix/feedback-form-visibility
fix: feedback form visibility
2 parents 45bb402 + 31a4ff0 commit 3a05451

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/components/list/Objectives.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface ObjectiveProps {
2323
*/
2424
export default function ObjectiveList({ iconcolor = "", crossmark = false, objectives = [] }: ObjectiveProps): ReactElement {
2525
return (
26-
<div className="flex flex-col gap-y-3 md:grid md:w-99 md:gap-x-3 md:items-stretch pt-6 md:pb-2 md:mb-2">
26+
<div className="flex flex-col gap-y-3 md:grid md:w-fit md:gap-x-3 md:items-stretch pt-6 md:pb-2 md:mb-2">
2727
{objectives.map((objective, index) => (
2828
<Objective key={`objective-list-${index}`} crossmark={crossmark} objective={objective} iconcolor={iconcolor} />
2929
))}

src/pages/communities/[slug]/challenges/[challenge_id]/submissions/[submission_id].tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ import { useRouter } from "next/router";
1717
import Loader from "@/components/ui/Loader";
1818
import Section from "@/components/ui/Section";
1919
import { useSelector } from "@/hooks/useTypedSelector";
20+
import { fetchChallenge } from "@/store/services/communities/challenges";
2021

2122
export default function SubmissionPage() {
2223
const dispatch = useDispatch();
2324
const { t } = useTranslation();
2425
const navigation = useNavigation();
2526
const router = useRouter();
26-
const { slug, locale, submission_id } = router.query;
27+
const { slug, locale, submission_id, challenge_id } = router.query;
2728
const [loading, setLoading] = useState(true);
2829
const { current } = useSelector((state) => state.submissions);
2930

@@ -33,7 +34,11 @@ export default function SubmissionPage() {
3334
locale: locale as string,
3435
};
3536
setLoading(true);
36-
await Promise.all([dispatch(fetchCurrentCommunity(fetchCurrentCommunityPayload)), dispatch(findSubmssionById({ id: submission_id as string }))]);
37+
await Promise.all([
38+
dispatch(fetchChallenge({ id: challenge_id as string, relations: ["rubric"] })),
39+
dispatch(fetchCurrentCommunity(fetchCurrentCommunityPayload)),
40+
dispatch(findSubmssionById({ id: submission_id as string })),
41+
]);
3742
dispatch(initChallengeNavigationMenu(navigation.community));
3843
setLoading(false);
3944
}, [slug, submission_id]);

0 commit comments

Comments
 (0)