bbuddy-ui/src/app/[locale]/account/(account)/messages/[textId]/page.tsx

70 lines
2.7 KiB
TypeScript

import React from 'react';
import { useTranslations } from 'next-intl';
import { Link } from '../../../../../../navigation';
export function generateStaticParams({
params: { locale },
}: { params: { locale: string } }) {
const result: { locale: string, textId: string }[] = [];
const chats = [{ textId: '1' }, { textId: '2' }, { textId: '3' }];
chats.forEach(({ textId }) => {
result.push({ locale, textId });
});
return result;
}
export default function Message({ params }: { params: { textId: string } }) {
const t = useTranslations('Account.Messages');
return (
<>
<ol className="breadcrumb">
<li className="breadcrumb-item">
<Link href={'/account/messages' as any}>
{t('title')}
</Link>
</li>
<li className="breadcrumb-item active" aria-current="page">{`Person ${params.textId}`}</li>
</ol>
<div className="b-message">
<div className="b-message__inner">
<div className="b-message__list b-message__list--me">
<div className="b-message__item ">
<div className="b-message__avatar">
<img src="/images/person.png" className="" alt="" />
</div>
<div className="b-message__text">
🤩 It all for you!
<span className="date">07.09.2022</span>
</div>
</div>
</div>
<div className="b-message__list">
<div className="b-message__item">
<div className="b-message__avatar">
<img src="/images/person.png" className="" alt="" />
</div>
<div className="b-message__text">
🤩 It all for you!
<span className="date">07.09.2022</span>
</div>
</div>
</div>
</div>
<form className="b-message__form" action="">
<textarea placeholder="Type your message here" name="" id="" />
<label className="b-message__upload-file">
<input type="file" required />
</label>
<div className="b-message__microphone" />
<button className="b-message__btn" type="submit" />
</form>
</div>
</>
);
};