feat(studio): enable functions counter on Home for self-hosted environments (#42992)

Feature

## What is the current behavior?

The Functions counter on the Home page is only displayed in platform
environments.
In self-hosted setups, the counter is hidden due to a platform guard,
even though Functions may be available.

## What is the new behavior?

The Functions counter is now also displayed in self-hosted environments.

This is now possible thanks to the following PRs:

- #40690  
- #42322  
- #42349  
- #42350  

These PRs introduce and enable the API required for listing Functions in
Studio, making it feasible to show the Functions count outside of the
platform environment.

## Additional context

Related issues: #36285

This change removes the platform-only restriction around the Functions
card in the Home interface, allowing feature parity between platform and
self-hosted deployments where the Functions API is available.

---------

Co-authored-by: Andrey A. <56412611+aantti@users.noreply.github.com>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-02-18 18:40:15 +00:00
1 parent b9ec8927c4
commit 6d1a064a39
1 file changed
+13 -15
+13 -15
View File
@@ -167,21 +167,19 @@ export const Home = () => {
)}
</div>
{IS_PLATFORM && (
<div className="flex flex-col gap-y-1">
<Link
href={`/project/${ref}/functions`}
className="transition text-foreground-light hover:text-foreground text-sm"
>
Functions
</Link>
{isLoadingFunctions ? (
<ShimmeringLoader className="w-full h-[32px] w-6 p-0" />
) : (
<p className="text-2xl tabular-nums">{functionsCount}</p>
)}
</div>
)}
<div className="flex flex-col gap-y-1">
<Link
href={`/project/${ref}/functions`}
className="transition text-foreground-light hover:text-foreground text-sm"
>
Functions
</Link>
{isLoadingFunctions ? (
<ShimmeringLoader className="w-full h-[32px] w-6 p-0" />
) : (
<p className="text-2xl tabular-nums">{functionsCount}</p>
)}
</div>
{IS_PLATFORM && (
<div className="flex flex-col gap-y-1">