-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from aceleradora-TW/38/pagina-detalhe-topico
38/pagina detalhe topico
- Loading branch information
Showing
20 changed files
with
272 additions
and
1,215 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions
11
src/app/Autoestudo/[detailingTheme]/[detailingTopic]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use client' | ||
|
||
import { RenderDetailingTopicPage } from "@/components/PageElements/Renders/RenderDetailingTopicPage"; | ||
|
||
export default function DetailingTopic({ | ||
params, | ||
}: { | ||
params: { DetailingTopic: string }; | ||
}) { | ||
return RenderDetailingTopicPage(params.DetailingTopic) | ||
} |
11 changes: 11 additions & 0 deletions
11
src/app/Nivelamento/[detailingTheme]/[detailingTopic]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use client' | ||
|
||
import { RenderDetailingTopicPage } from "@/components/PageElements/Renders/RenderDetailingTopicPage"; | ||
|
||
export default function DetailingTopic({ | ||
params, | ||
}: { | ||
params: { detailingTopic: string }; | ||
}) { | ||
return RenderDetailingTopicPage(params.detailingTopic) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Box, Link, Typography } from "@mui/material" | ||
import svgBadRequest from "../../../public/assets/503-bad-request.svg" | ||
import Image from "next/image" | ||
|
||
export const BadRequest = () => { | ||
return ( | ||
<Box sx={{ display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", height: "calc(100vh - 80px)", boxSizing: "border-box" }}> | ||
<Image src={svgBadRequest} alt="Ilustração de um gato brincando com um novelo de lã, com os números 503 indicando erro de serviço indisponível."/> | ||
<Typography variant="caption">Estamos passando por dificuldades para carregar o conteúdo. Por favor, tente novamente em instantes.</Typography> | ||
<Link target="_blank" rel="noferrer" href="https://storyset.com/internet">Internet illustrations by Storyset</Link> | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/components/PageElements/Container/ContainerCardsExercises/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { Grid, useMediaQuery } from "@mui/material"; | ||
import React from "react"; | ||
import { usePathname } from 'next/navigation'; | ||
import { ButtonCard } from "@/components/ButtonCard"; | ||
import { DescriptionFull } from "@/components/Description/DescriptionFull"; | ||
interface ContainerCardsExercisesProps { | ||
exercises: string; | ||
exercisesDescription: string; | ||
exercisesInfo: string; | ||
} | ||
|
||
export const ContainerCardsExercises: React.FC<ContainerCardsExercisesProps> = ({ exercises, exercisesDescription, exercisesInfo }) => { | ||
const between = useMediaQuery('(min-width: 800px) and (max-width: 899px)') | ||
const between2 = useMediaQuery('(min-width: 445px) and (max-width: 599px)') | ||
const pathname = usePathname() | ||
const currentPath = pathname.slice(1) | ||
|
||
const splitValues = (value: string):string[] => value.split(","); | ||
const exercisesArray = splitValues(exercises); | ||
const descriptionsArray = splitValues(exercisesDescription); | ||
const infoArray = splitValues(exercisesInfo); | ||
|
||
const isInvalidData = exercises.trim() == "Untitle"|| !exercises.trim() || !exercisesDescription.trim() || !exercisesInfo.trim(); | ||
|
||
if(isInvalidData) { | ||
return <DescriptionFull text="## Nenhum exercício encontrado"/> | ||
} | ||
|
||
|
||
return ( | ||
<Grid container spacing={2} columnSpacing={1} > | ||
{exercisesArray.map((exercise, index) => ( | ||
<Grid | ||
item | ||
xl={3} | ||
lg={3} | ||
md={4} | ||
sm={between ? 4 : 6} | ||
xs={between2 ? 6 : 12} | ||
key={index} | ||
spacing={3} | ||
> | ||
<ButtonCard | ||
title={exercise} | ||
description={descriptionsArray[index]} | ||
route={`${currentPath}/${infoArray[index]}-${exercise}`} /> | ||
</Grid> | ||
)) | ||
} | ||
</Grid> | ||
) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.