Skip to content

Commit

Permalink
refactor(ui-frontpage): rename components for consistency and clarity
Browse files Browse the repository at this point in the history
The components DictyNewsTitle and AuthorizedEmptyNewsList have been renamed to AuthorizedDictyNewsTitle and EmptyNewsList respectively for better consistency and clarity in the codebase. This change improves readability and maintainability of the code.
  • Loading branch information
ktun95 committed Aug 27, 2024
1 parent e88bc17 commit 1eb6cde
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/ui-frontpage/src/news/AuthorizedDictyNews.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Container, Grid, makeStyles } from "@material-ui/core"
import { match, P } from "ts-pattern"
import { useListContentByNamespaceQuery } from "dicty-graphql-schema"
import { DictyNewsTitle } from "./DictyNewsTitle"
import { AuthorizedEmptyNewsList } from "./AuthorizedEmptyNewsList"
import { AuthorizedDictyNewsTitle } from "./AuthorizedDictyNewsTitle"
import { EmptyNewsList } from "./EmptyNewsList"
import { AuthorizedNewsList } from "./AuthorizedNewsList"
import { AuthorizedMoreNewsLink } from "./AuthorizedMoreNewsLink"
import { NewsLoader } from "./NewsLoader"
Expand Down Expand Up @@ -48,7 +48,7 @@ const AuthorizedDictyNews = () => {
wrap="nowrap"
className={main}>
<Grid item>
<DictyNewsTitle />
<AuthorizedDictyNewsTitle />
</Grid>
<Grid item className={newsListItem}>
{match(fetchState)
Expand All @@ -58,7 +58,7 @@ const AuthorizedDictyNews = () => {
listContentByNamespace: [],
},
},
() => <AuthorizedEmptyNewsList />,
() => <EmptyNewsList />,
)
.with(
{
Expand All @@ -72,7 +72,7 @@ const AuthorizedDictyNews = () => {
)
.with({ loading: true }, () => <NewsLoader />)
.with({ error: P.select(P.not(undefined)) }, () => (
<AuthorizedEmptyNewsList />
<EmptyNewsList />
))
.otherwise(() => (
<> This message should not appear. </>
Expand Down

0 comments on commit 1eb6cde

Please sign in to comment.