mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-07 00:34:41 +00:00
feat: add user profile link to comment
This commit is contained in:
parent
fc1d3d26f6
commit
8f6319ab0d
2 changed files with 10 additions and 5 deletions
5
TODO.md
5
TODO.md
|
@ -57,7 +57,7 @@
|
||||||
- [ ] Просмотр комментариев и комментирование
|
- [ ] Просмотр комментариев и комментирование
|
||||||
- [X] Просмотр популярных комментариев
|
- [X] Просмотр популярных комментариев
|
||||||
- [ ] Просмотр всех комментариев (как Modal)
|
- [ ] Просмотр всех комментариев (как Modal)
|
||||||
- [ ] Переход на страницу пользователя оставившего комментарий
|
- [X] Переход на страницу пользователя оставившего комментарий
|
||||||
- [ ] Отправление комментариев
|
- [ ] Отправление комментариев
|
||||||
- [ ] Отправление ответов
|
- [ ] Отправление ответов
|
||||||
- [X] Оценка комментариев
|
- [X] Оценка комментариев
|
||||||
|
@ -77,7 +77,8 @@
|
||||||
|
|
||||||
## Баги
|
## Баги
|
||||||
|
|
||||||
- ...
|
- в статусе профиля нет переноса на новые линии
|
||||||
|
- лишний отступ на последнем ответе на комментарий
|
||||||
|
|
||||||
## Другое
|
## Другое
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { unixToDate } from "#/api/utils";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { ENDPOINTS } from "#/api/config";
|
import { ENDPOINTS } from "#/api/config";
|
||||||
import { Button } from "flowbite-react";
|
import { Button } from "flowbite-react";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
export const CommentsComment = (props: {
|
export const CommentsComment = (props: {
|
||||||
profile: { login: string; avatar: string; id: number };
|
profile: { login: string; avatar: string; id: number };
|
||||||
|
@ -79,14 +80,17 @@ export const CommentsComment = (props: {
|
||||||
<article className="p-6 text-sm bg-white rounded-lg sm:text-base dark:bg-gray-900">
|
<article className="p-6 text-sm bg-white rounded-lg sm:text-base dark:bg-gray-900">
|
||||||
<footer className="flex items-center justify-between mb-2">
|
<footer className="flex items-center justify-between mb-2">
|
||||||
<div className="flex flex-col items-start gap-1 sm:items-center sm:flex-row">
|
<div className="flex flex-col items-start gap-1 sm:items-center sm:flex-row">
|
||||||
<p className="inline-flex items-center mr-3 text-sm font-semibold text-gray-900 dark:text-white">
|
<Link
|
||||||
|
href={`/profile/${props.profile.id}`}
|
||||||
|
className="inline-flex items-center mr-3 text-sm font-semibold text-gray-900 dark:text-white hover:underline"
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
className="w-6 h-6 mr-2 rounded-full"
|
className="w-6 h-6 mr-2 rounded-full"
|
||||||
src={props.profile.avatar}
|
src={props.profile.avatar}
|
||||||
alt={props.profile.login}
|
alt=""
|
||||||
/>
|
/>
|
||||||
{props.profile.login}
|
{props.profile.login}
|
||||||
</p>
|
</Link>
|
||||||
<p className="text-sm text-gray-600 dark:text-gray-400">
|
<p className="text-sm text-gray-600 dark:text-gray-400">
|
||||||
<time
|
<time
|
||||||
dateTime={props.comment.timestamp.toString()}
|
dateTime={props.comment.timestamp.toString()}
|
||||||
|
|
Loading…
Add table
Reference in a new issue