fix: ProfilePage - remove recently watched Card if no watched present

This commit is contained in:
Kentai Radiquum 2024-08-04 16:32:26 +05:00
parent 8afa3ef664
commit c95e9da17f
Signed by: Radiquum
GPG key ID: 858E8EE696525EED

View file

@ -216,13 +216,15 @@ export const ProfilePage = (props: any) => {
Время просмотра Время просмотра
</Table.Cell> </Table.Cell>
<Table.Cell className="font-medium text-gray-900 whitespace-pre sm:whitespace-nowrap dark:text-white"> <Table.Cell className="font-medium text-gray-900 whitespace-pre sm:whitespace-nowrap dark:text-white">
{minutesToTime(user.watched_time)} {minutesToTime(user.watched_time) ||
"Нет просмотренных серий."}
</Table.Cell> </Table.Cell>
</Table.Row> </Table.Row>
<Table.Row className="table-row sm:hidden"> <Table.Row className="table-row sm:hidden">
<Table.Cell className="flex items-center px-0 font-medium text-gray-900 whitespace-pre sm:whitespace-nowrap dark:text-white"> <Table.Cell className="flex items-center px-0 font-medium text-gray-900 whitespace-pre sm:whitespace-nowrap dark:text-white">
<span className="w-4 h-4 mr-2 iconify mdi--clock "></span> <span className="w-4 h-4 mr-2 iconify mdi--clock "></span>
{minutesToTime(user.watched_time)} {minutesToTime(user.watched_time) ||
"Нет просмотренных серий."}
</Table.Cell> </Table.Cell>
</Table.Row> </Table.Row>
<Table.Row> <Table.Row>
@ -275,12 +277,14 @@ export const ProfilePage = (props: any) => {
</Card> </Card>
</div> </div>
</div> </div>
<div className="px-4 py-2 bg-white border border-gray-200 rounded-lg shadow-md dark:border-gray-700 dark:bg-gray-800"> {user.history.length > 0 && (
<ReleaseCourusel <div className="px-4 py-2 bg-white border border-gray-200 rounded-lg shadow-md dark:border-gray-700 dark:bg-gray-800">
sectionTitle="Недавно просмотренные" <ReleaseCourusel
content={user.history} sectionTitle="Недавно просмотренные"
/> content={user.history}
</div> />
</div>
)}
</main> </main>
); );
}; };