wip
This commit is contained in:
parent
a77a4008e6
commit
2301fe5eff
32 changed files with 547 additions and 400 deletions
|
@ -6,6 +6,7 @@ import { IAnnouncement } from '../../common/types/announcement';
|
|||
import { Skeleton } from '../components/Skeleton';
|
||||
import { $get } from '../misc/api';
|
||||
import { useSelector } from '../store';
|
||||
import { useTitle } from '../hooks/useTitle';
|
||||
|
||||
export const AnnouncementPage: React.VFC = () => {
|
||||
const { id } = useParams<{id: string}>();
|
||||
|
@ -15,6 +16,8 @@ export const AnnouncementPage: React.VFC = () => {
|
|||
|
||||
const lang = useSelector(state => state.screen.language);
|
||||
|
||||
useTitle('announcements');
|
||||
|
||||
useEffect(() => {
|
||||
$get<IAnnouncement>('announcements/' + id).then(setAnnouncement);
|
||||
}, [setAnnouncement]);
|
||||
|
@ -25,7 +28,7 @@ export const AnnouncementPage: React.VFC = () => {
|
|||
<h2>
|
||||
{announcement.title}
|
||||
<aside className="inline ml-1 text-dimmed text-100">
|
||||
<i className="bi bi-clock" />
|
||||
<i className="fas fa-clock" />
|
||||
{dayjs(announcement.createdAt).locale(lang.split('_')[0]).fromNow()}
|
||||
</aside>
|
||||
</h2>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue