Skip to content

Commit

Permalink
Add NewsCarousel component to page
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbcapps committed Aug 4, 2022
1 parent 543356c commit 289771f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pages/news-announcements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import { client } from '../lib/keystoneClient'
import { withPageLayout } from 'layout/DefaultLayout/PageLayout'
import Announcement from 'components/Announcement/Announcement'
import NewsCarousel from 'components/NewsCarousel/NewsCarousel'
import Loader from 'components/Loader/Loader'
import LoadingWidget from 'components/LoadingWidget/LoadingWidget'
import { useUser } from 'hooks/useUser'
Expand All @@ -27,6 +28,7 @@ const RSS_URL = `${SPACEFORCE_NEWS_RSS_URL}&max=12`

const NewsAnnouncements = ({
announcements,
articles,
}: InferGetServerSidePropsType<typeof getServerSideProps>) => {
const { user } = useUser()
const { items, fetchItems } = useRSSFeed(RSS_URL)
Expand All @@ -47,6 +49,12 @@ const NewsAnnouncements = ({
</section>
)}

{articles.length > 0 && (
<section>
<NewsCarousel articles={articles} />
</section>
)}

<div className={styles.pageTitle}>
<h2>All USSF news</h2>
<h3>
Expand Down

0 comments on commit 289771f

Please sign in to comment.