Module

News

Represents the News page component

View Source pages/Dashboard/News/News.jsx, line 7

Members

Array

# static filterDropdown

React state that stores the filter dropdown state

Default Value:
  • useState(false)

View Source pages/Dashboard/News/News.jsx, line 21

Array

# static getNewsData

React hook that memoizes the news data

View Source pages/Dashboard/News/News.jsx, line 52

Array

# static gridView

React state that stores the view type of the news page

Default Value:
  • useState(true)

View Source pages/Dashboard/News/News.jsx, line 13

Array

# static searchInput

React state that stores the search input value

Default Value:
  • useState("")

View Source pages/Dashboard/News/News.jsx, line 29

Array

# static sortBy

React state that stores the sort by value

Default Value:
  • useState("")

View Source pages/Dashboard/News/News.jsx, line 37

function

# static useGetNews

React query hook that fetches the news data

View Source pages/Dashboard/News/News.jsx, line 45

Methods

# inner getSelectedView(view) → {JSX.Element}

Function to get the selected view

Parameters:
Name Type Description
view String

The view type

View Source pages/Dashboard/News/News.jsx, line 92

JSX.Element

# inner stripHTML(htmlString) → {*}

Function to strip HTML tags from a string

Parameters:
Name Type Description
htmlString String

The string to strip HTML tags from

View Source pages/Dashboard/News/News.jsx, line 81

*