Skip to content

Commit

Permalink
Use an EmptyStateComponent in no organization page
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Jan 6, 2025
1 parent ba1fc23 commit b95a1d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def current_organization
else
current_user&.organizations&.first
end
@current_organization if current_user&.organizations&.any?
end

def current_user
Expand Down
12 changes: 4 additions & 8 deletions app/views/shared/no_organization.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<div class="flex items-center justify-center mt-36">
<div class="text-center max-w-2xl px-8">
<h1 class="text-3xl font-semibold text-gray-700 mb-2">Oops! Looks like you don't have access to any organization.</h1>
<div class="bg-gray-50 rounded-lg">
<p class="text-gray-600 text-lg">Please contact your administrator to create a new organization to continue.</p>
</div>
</div>
</div>
<%= render V2::EmptyStateComponent.new(title: "Oops! Looks like you don't belong to any organization",
text: "Please contact your admin to add you to an organization.",
type: :subdued,
banner_image: "v2/building.svg") %>

0 comments on commit b95a1d5

Please sign in to comment.