-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove unnecessary prop lifting
- Loading branch information
Showing
13 changed files
with
54 additions
and
57 deletions.
There are no files selected for viewing
26 changes: 13 additions & 13 deletions
26
src/application/dto/tag/utils/getArticlesByTag/getArticlesByTag.ts
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,13 +1,13 @@ | ||
import type { ArticleDTO } from "@application/dto/article/types.ts"; | ||
import type { RawTag } from "@application/dto/tag/types.ts"; | ||
|
||
interface GetArticlesProps { | ||
tag: RawTag; | ||
articles: ArticleDTO[]; | ||
} | ||
|
||
export function getArticlesByTag({ tag, articles }: GetArticlesProps) { | ||
return articles.filter((article) => | ||
article.tags.map((tag) => tag.slug).includes(tag.fields.slug as unknown as string), | ||
); | ||
} | ||
import type { ArticleDTO } from "@application/dto/article/types.ts"; | ||
import type { RawTag } from "@application/dto/tag/types.ts"; | ||
|
||
interface GetArticlesProps { | ||
tag: RawTag; | ||
articles: ArticleDTO[]; | ||
} | ||
|
||
export function getArticlesByTag({ tag, articles }: GetArticlesProps) { | ||
return articles.filter((article) => | ||
article.tags.map((tag) => tag.slug).includes(tag.fields.slug as unknown as string), | ||
); | ||
} |
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 +1 @@ | ||
export * from "./getArticlesByTag.ts"; | ||
export * from "./getArticlesByTag.ts"; |
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
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
2 changes: 2 additions & 0 deletions
2
src/shared/ui/components/articleCard/utils/getLocation/getLocation.ts
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
6 changes: 3 additions & 3 deletions
6
src/ui/modules/projects/components/projectsIntro/ProjectsIntro.astro
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,8 +1,8 @@ | ||
--- | ||
import Breadcrumbs from "@shared/ui/components/breadcrumbs/Breadcrumbs.astro"; | ||
import "./projects-intro.css"; | ||
import Breadcrumbs from "@shared/ui/components/breadcrumbs/Breadcrumbs.astro"; | ||
import "./projects-intro.css"; | ||
--- | ||
<section class="projects-intro__wrapper"> | ||
<h1 class="articles__title section-title">Projects</h1> | ||
<Breadcrumbs classNames="projects-page" /> | ||
<Breadcrumbs /> | ||
</section> |