-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [LINKER-120] 지인페이지 관심주제 구현 (#77)
- Loading branch information
Showing
5 changed files
with
61 additions
and
866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,42 @@ | ||
function SubjectPage() { | ||
return <div>관심주제</div>; | ||
import { NewsDTO } from '@/types/news'; | ||
import { TagDTO } from '@/types/tag'; | ||
import { NewsList } from '@features/news-list'; | ||
import { ky } from '@linker/ky'; | ||
|
||
import { getTokens } from '@utils/token/server'; | ||
|
||
export interface FriendNewsListDTO { | ||
recommendations: Array<{ | ||
tags: TagDTO[]; | ||
newsList: { | ||
data: NewsDTO[]; | ||
nextCursor: number | null; | ||
hasNext: boolean; | ||
}; | ||
}>; | ||
} | ||
|
||
function getFriendNewsList(contactId: string, size = 20) { | ||
return ky.get<FriendNewsListDTO>(`/v1/contacts/${contactId}/interest/news?size=${size}`); | ||
} | ||
|
||
async function SubjectPage({ params }: { params: { id: string } }) { | ||
const accessToken = getTokens().accessToken; | ||
|
||
if (accessToken == null) { | ||
return; | ||
} | ||
|
||
const { recommendations } = await getFriendNewsList(params.id); | ||
|
||
return ( | ||
<div> | ||
{/* <Link href=""> | ||
<div className={addSubjectButon}>+ 관심주제 추가하기</div> | ||
</Link> */} | ||
<NewsList recommendations={recommendations} /> | ||
</div> | ||
); | ||
} | ||
|
||
export default SubjectPage; |
39 changes: 21 additions & 18 deletions
39
services/web/src/app/my/feed/trend/components/MoreButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.