blob: 93e6be0efa9d44caaa287cb3cd908f11ef9b21d9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import React, { useEffect, useRef, useState } from 'react';
import { useLocation, Link } from "react-router-dom";
import "./news.css"
export default function News({newsInfo}) {
// const { token } = prop
const [news, setNews] = React.useState(null);
const location = useLocation();
return (
<div className='news-container'>
<div className='news-title-header'>
<span className='news-title'>{newsInfo.title}</span>
</div>
<div className='news-description-div'>
<span className='description'>{newsInfo.short_description}</span>
</div>
</div>
)
}
|