commit
1e3a4e35c1
|
@ -4,6 +4,7 @@
|
|||
"notifications": "Notifications",
|
||||
"local": "Local",
|
||||
"public": "Public",
|
||||
"favourites": "Favourites",
|
||||
"bookmarks": "Bookmarks",
|
||||
"search": "Search",
|
||||
"status": {
|
||||
|
|
|
@ -4,7 +4,7 @@ import generator, { Entity } from 'megalodon'
|
|||
import { useRouter } from 'next/router'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useHotkeys } from 'react-hotkeys-hook'
|
||||
import { FaBell, FaBookmark, FaGlobe, FaHouse, FaList, FaUsers } from 'react-icons/fa6'
|
||||
import { FaBell, FaBookmark, FaGlobe, FaHouse, FaList, FaStar, FaUsers } from 'react-icons/fa6'
|
||||
import { useIntl } from 'react-intl'
|
||||
import Jump from '../Jump'
|
||||
import { useUnreads } from '@/provider/unreads'
|
||||
|
@ -77,6 +77,12 @@ export default function Layout({ children }: LayoutProps) {
|
|||
icon: <FaGlobe />,
|
||||
path: `/accounts/${router.query.id}/public`
|
||||
},
|
||||
{
|
||||
id: 'favourites',
|
||||
title: formatMessage({ id: 'timeline.favourites' }),
|
||||
icon: <FaStar />,
|
||||
path: `/accounts/${router.query.id}/favourites`
|
||||
},
|
||||
{
|
||||
id: 'bookmarks',
|
||||
title: formatMessage({ id: 'timeline.bookmarks' }),
|
||||
|
|
|
@ -145,6 +145,11 @@ export default function Timeline(props: Props) {
|
|||
const res = await client.getPublicTimeline(options)
|
||||
return res.data
|
||||
}
|
||||
case 'favourites': {
|
||||
const res = await client.getFavourites(options)
|
||||
// TODO: handle next_id in link header to get more posts
|
||||
return res.data
|
||||
}
|
||||
case 'bookmarks': {
|
||||
const res = await client.getBookmarks(options)
|
||||
return res.data
|
||||
|
|
Loading…
Reference in New Issue