add back build time
This commit is contained in:
@@ -14,6 +14,7 @@ import { useClickOutside } from '@/app/hooks/useClickOutside';
|
||||
import { fetchReferralUserStats } from '@/app/actions/referralsActions';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { env } from 'process';
|
||||
import { getBuildData } from '@/app/actions/action';
|
||||
|
||||
export default function NavLinks() {
|
||||
const {
|
||||
@@ -56,7 +57,21 @@ export default function NavLinks() {
|
||||
}
|
||||
return null;
|
||||
},
|
||||
retry: false // Не повторять запрос при ошибке
|
||||
retry: false
|
||||
});
|
||||
|
||||
const {
|
||||
data: backendBuildDate,
|
||||
} = useQuery({
|
||||
queryKey: ['backendBuildDate'],
|
||||
queryFn: () => getBuildData(),
|
||||
select: (data) => {
|
||||
if (data) {
|
||||
return data;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
retry: false
|
||||
});
|
||||
|
||||
const pathname = usePathname().replace('/en/', '/').replace('/ru/', '/');
|
||||
@@ -160,14 +175,16 @@ export default function NavLinks() {
|
||||
</ul>
|
||||
|
||||
<div className="build-versions">
|
||||
{!frontendBuildDate && (
|
||||
{frontendBuildDate && (
|
||||
<div className="">
|
||||
front: {frontendBuildDate}
|
||||
</div>
|
||||
)}
|
||||
{/* <div>
|
||||
back:
|
||||
</div> */}
|
||||
{backendBuildDate && (
|
||||
<div className="">
|
||||
back: {backendBuildDate}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user