improve some texts + styles

This commit is contained in:
2025-09-10 07:11:18 +03:00
parent 0c764f82e5
commit 0328e518b6
11 changed files with 32 additions and 11 deletions

View File

@@ -28,9 +28,13 @@ function BookingPage() {
return ( return (
<> <>
<AppBreadcrumbs /> <AppBreadcrumbs />
<h3 className="mt-8"> <HomeLayoutPageHeader
title={<Trans i18nKey={'booking:title'} />}
description={<Trans i18nKey={'booking:description'} />}
/>
<h4 className="mt-8">
<Trans i18nKey="booking:noCategories" /> <Trans i18nKey="booking:noCategories" />
</h3> </h4>
</> </>
); );
} }

View File

@@ -21,6 +21,9 @@ async function OrderHealthAnalysisPage() {
description={<Trans i18nKey={'order-health-analysis:description'} />} description={<Trans i18nKey={'order-health-analysis:description'} />}
/> />
<PageBody> <PageBody>
<h4 className="mt-8">
<Trans i18nKey="booking:noCategories" />
</h4>
</PageBody> </PageBody>
</> </>
); );

View File

@@ -61,6 +61,11 @@ async function OrdersPage() {
</React.Fragment> </React.Fragment>
) )
})} })}
{analysisOrders.length === 0 && (
<h5 className="mt-6">
<Trans i18nKey="orders:noOrders" />
</h5>
)}
</PageBody> </PageBody>
</> </>
); );

View File

@@ -8,7 +8,7 @@ import { Trans } from '@kit/ui/trans';
export default function DashboardCards() { export default function DashboardCards() {
return ( return (
<div className="flex gap-4 lg:px-4"> <div className="flex gap-4">
<Card <Card
variant="gradient-success" variant="gradient-success"
className="xs:w-1/2 sm:w-auto flex w-full flex-col justify-between" className="xs:w-1/2 sm:w-auto flex w-full flex-col justify-between"

View File

@@ -331,7 +331,7 @@ function FactorQrCode({
return ( return (
<div <div
className={ className={
'dark:bg-secondary flex flex-col space-y-4 rounded-lg border p-4' 'dark:bg-secondary flex flex-col space-y-2 rounded-lg border p-4'
} }
> >
<p> <p>

View File

@@ -28,8 +28,8 @@ export function useUser(initialData?: User | null) {
queryFn, queryFn,
queryKey, queryKey,
initialData, initialData,
refetchInterval: false, refetchInterval: 2_000,
refetchOnMount: false, refetchOnMount: true,
refetchOnWindowFocus: false, refetchOnWindowFocus: true,
}); });
} }

View File

@@ -1,6 +1,7 @@
'use client'; 'use client';
import { Fragment } from 'react'; import { Fragment } from 'react';
import clsx from 'clsx';
import { usePathname } from 'next/navigation'; import { usePathname } from 'next/navigation';
@@ -52,9 +53,13 @@ export function AppBreadcrumbs(props: {
/> />
); );
const isLast = index === visiblePaths.length - 1;
return ( return (
<Fragment key={index}> <Fragment key={index}>
<BreadcrumbItem className={'capitalize lg:text-xs'}> <BreadcrumbItem className={clsx('lg:text-xs', {
'font-bold text-black': isLast,
})}>
<If <If
condition={index < visiblePaths.length - 1} condition={index < visiblePaths.length - 1}
fallback={label} fallback={label}
@@ -64,6 +69,7 @@ export function AppBreadcrumbs(props: {
'/' + '/' +
splitPath.slice(0, splitPath.indexOf(path) + 1).join('/') splitPath.slice(0, splitPath.indexOf(path) + 1).join('/')
} }
className='text-muted-foreground'
> >
{label} {label}
</BreadcrumbLink> </BreadcrumbLink>
@@ -77,7 +83,7 @@ export function AppBreadcrumbs(props: {
</> </>
)} )}
<If condition={index !== visiblePaths.length - 1}> <If condition={!isLast}>
<BreadcrumbSeparator /> <BreadcrumbSeparator />
</If> </If>
</Fragment> </Fragment>

View File

@@ -106,7 +106,7 @@ export function PageBody(
}>, }>,
) { ) {
const className = cn( const className = cn(
'flex w-full flex-1 flex-col space-y-6 lg:px-4', 'flex w-full flex-1 flex-col space-y-6',
props.className, props.className,
); );
@@ -158,7 +158,7 @@ export function PageHeader({
return ( return (
<div <div
className={cn( className={cn(
'flex items-center justify-between py-5 lg:px-4', 'flex items-center justify-between py-5',
className, className,
)} )}
> >

View File

@@ -1,6 +1,7 @@
{ {
"title": "Orders", "title": "Orders",
"description": "View your orders", "description": "View your orders",
"noOrders": "No orders found",
"table": { "table": {
"analysisPackage": "Analysis package", "analysisPackage": "Analysis package",
"otherOrders": "Order", "otherOrders": "Order",

View File

@@ -1,6 +1,7 @@
{ {
"title": "Tellimused", "title": "Tellimused",
"description": "Vaata oma tellimusi", "description": "Vaata oma tellimusi",
"noOrders": "Tellimusi ei leitud",
"table": { "table": {
"analysisPackage": "Analüüsi pakett", "analysisPackage": "Analüüsi pakett",
"otherOrders": "Tellimus", "otherOrders": "Tellimus",

View File

@@ -1,6 +1,7 @@
{ {
"title": "Заказы", "title": "Заказы",
"description": "Просмотрите ваши заказы", "description": "Просмотрите ваши заказы",
"noOrders": "Заказы не найдены",
"table": { "table": {
"analysisPackage": "Пакет анализов", "analysisPackage": "Пакет анализов",
"otherOrders": "Заказ", "otherOrders": "Заказ",