forked from simrail/simrail.pro
feat(frontend, backend): Show profile created date
This commit is contained in:
parent
67e12b8179
commit
01c5fe21c2
@ -58,7 +58,8 @@ export class ProfilesRoute
|
||||
new SuccessResponseBuilder()
|
||||
.setCode(200)
|
||||
.setData({
|
||||
player
|
||||
player,
|
||||
createdAt: player._id.getTimestamp().getTime()
|
||||
})
|
||||
.toJSON(),
|
||||
);
|
||||
|
@ -24,7 +24,7 @@ import { useAuth } from "../../../hooks/useAuth.tsx";
|
||||
import { ConfirmModal } from "../../mini/modal/ConfirmModal.tsx";
|
||||
import { post } from "../../../util/fetcher.ts";
|
||||
import { toast } from "react-toastify";
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export const ProfileCard = ({ data }: { data: TProfileData }) =>
|
||||
{
|
||||
@ -244,7 +244,7 @@ export const ProfileCard = ({ data }: { data: TProfileData }) =>
|
||||
|
||||
<div className="shadow-default dark:bg-boxdark items-center justify-center p-2.5 flex flex-col xl:p-5 gap-2">
|
||||
<h1 className="text-sm text-black dark:text-white">
|
||||
{t("profile.info")}
|
||||
{t("profile.info", { date: dayjs(data.createdAt).format('DD/MM/YYYY') })}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
@ -100,7 +100,7 @@
|
||||
"description": "The player's profile could not be displayed due to active moderator actions."
|
||||
}
|
||||
},
|
||||
"info": "Note: We have been collecting statistics since 13/12/2024."
|
||||
"info": "Note: This user's statistics are collected since {{date}}."
|
||||
},
|
||||
"log": {
|
||||
"errors": {
|
||||
|
@ -100,7 +100,7 @@
|
||||
"description": "Profil gracza nie mógł zostać wyświetlony ze względu na aktywne działania moderatora."
|
||||
}
|
||||
},
|
||||
"info": "Uwaga: Gromadzimy statystyki od 13.12.2024 r."
|
||||
"info": "Uwaga: Statystyki tego użytkownika gromadzone są od {{date}} r."
|
||||
},
|
||||
"log": {
|
||||
"errors": {
|
||||
|
@ -33,6 +33,7 @@ export interface TProfileSuccessResponse
|
||||
export interface TProfileData
|
||||
{
|
||||
player: TProfilePlayer;
|
||||
createdAt: number
|
||||
}
|
||||
|
||||
export interface TProfilePlayer
|
||||
|
Loading…
x
Reference in New Issue
Block a user