Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix project selection

ayntk-aief40b79a5f98
diff --git a/resources/views/livewire/project/index.blade.php b/resources/views/livewire/project/index.blade.php
index 92d4a63f98..88b2e12e93 100644
--- a/resources/views/livewire/project/index.blade.php
+++ b/resources/views/livewire/project/index.blade.php
@@ -11,9 +11,8 @@
<div class="subtitle">All your projects are here.</div>
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($projects as $project)
- <div class="box group" x-data x-on:click="goto('{{ $project->uuid }}')">
- <div class="flex flex-col justify-center flex-1 mx-6"
- onclick="gotoProject('{{ $project->uuid }}','{{ $project->default_environment() }}')">
+ <div class="box group" onclick="gotoProject('{{ $project->uuid }}', '{{ $project->default_environment() }}')">
+ <div class="flex flex-col justify-center flex-1 mx-6">
<div class="box-title">{{ $project->name }}</div>
<div class="box-description ">
{{ $project->description }}</div>
@@ -33,15 +32,8 @@
</div>
<script>
- function goto(uuid) {
- window.location.href = '/project/' + uuid;
- }
-
- function gotoProject(uuid, environment) {
- if (!environment) {
- window.location.href = '/project/' + uuid;
- }
- window.location.href = '/project/' + uuid + '/' + environment;
- }
- </script>
+ function gotoProject(uuid, defaultEnvironment) {
+ window.location.href = '/project/' + uuid + '/' + defaultEnvironment;
+ }
+</script>
</div>