diff options
| author | Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com> | 2024-07-10 21:51:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-10 22:51:25 +0300 |
| commit | cfac59282da55f4791d6352f15887a15e9ff6ec5 (patch) | |
| tree | bf8cea62f60f9239073a9cf82648d69d1e6b6a1c /frontend/src/components/news.js | |
| parent | feat: return portal counts for each cat in chapter select (#175) (diff) | |
| download | lphub-cfac59282da55f4791d6352f15887a15e9ff6ec5.tar.gz lphub-cfac59282da55f4791d6352f15887a15e9ff6ec5.tar.bz2 lphub-cfac59282da55f4791d6352f15887a15e9ff6ec5.zip | |
Games page, maplist page (#153)
Co-authored-by: Wolfboy248 <105884620+Wolfboy248@users.noreply.github.com>
Diffstat (limited to '')
| -rw-r--r-- | frontend/src/components/news.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/frontend/src/components/news.js b/frontend/src/components/news.js new file mode 100644 index 0000000..93e6be0 --- /dev/null +++ b/frontend/src/components/news.js | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | import React, { useEffect, useRef, useState } from 'react'; | ||
| 2 | import { useLocation, Link } from "react-router-dom"; | ||
| 3 | |||
| 4 | import "./news.css" | ||
| 5 | |||
| 6 | export default function News({newsInfo}) { | ||
| 7 | // const { token } = prop | ||
| 8 | const [news, setNews] = React.useState(null); | ||
| 9 | const location = useLocation(); | ||
| 10 | |||
| 11 | return ( | ||
| 12 | <div className='news-container'> | ||
| 13 | <div className='news-title-header'> | ||
| 14 | <span className='news-title'>{newsInfo.title}</span> | ||
| 15 | </div> | ||
| 16 | <div className='news-description-div'> | ||
| 17 | <span className='description'>{newsInfo.short_description}</span> | ||
| 18 | </div> | ||
| 19 | </div> | ||
| 20 | ) | ||
| 21 | } \ No newline at end of file | ||