-
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 #105 from AnaSerg/feature/charts_and_main
Feature/charts and main
- Loading branch information
Showing
45 changed files
with
419 additions
and
365 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
@@ -1,31 +1,30 @@ | ||
import {FC} from "react"; | ||
import {ReactElement} from "react"; | ||
import styles from "./articles.module.css"; | ||
import {Article} from "./Article/Article.tsx"; | ||
import {ArticleInterface} from "@/types.ts"; | ||
import vector from "@/assets/Vector.svg" | ||
import {Card} from "@/types.ts"; | ||
import {useNavigate} from "react-router"; | ||
|
||
interface ArticlesListProps { | ||
articles: ArticleInterface[]; | ||
articles: Card[]; | ||
title: string; | ||
} | ||
|
||
export const Articles: FC<ArticlesListProps> = ({articles, title}) => { | ||
return ( | ||
<div className={styles.container}> | ||
<h3 className={styles.title}>{title}</h3> | ||
<div className={styles.articles}> | ||
{articles.map((article, index) => ( | ||
<Article key={index} article={article}/> | ||
))} | ||
<Article | ||
article={{ | ||
type: "", | ||
title: "Смотреть все статьи и видео", | ||
banner: vector, | ||
length: "", | ||
}} | ||
/> | ||
export const Articles = ({articles, title}: ArticlesListProps): ReactElement | null => { | ||
const navigate = useNavigate(); | ||
|
||
if(articles && articles.length !== 0) { | ||
return ( | ||
<div className={styles.container}> | ||
<h3 className={styles.title}>{title}</h3> | ||
<div className={styles.articles}> | ||
{articles.slice(0, 3).map((article, index) => ( | ||
<Article key={index} article={article}/> | ||
))} | ||
<button onClick={() => navigate('/entries')} className={styles.button}>Смотреть все статьи и видео</button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
); | ||
} else { | ||
return null; | ||
} | ||
}; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -37,10 +37,6 @@ | |
} | ||
} | ||
|
||
.date-till { | ||
font: var(--font-body); | ||
} | ||
|
||
.image { | ||
width: 100%; | ||
&-container { | ||
|
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
15 changes: 8 additions & 7 deletions
15
src/components/EventsMain/EventsMainPopup/eventsMainPopup.module.css
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.