Add group creation and show current groups
This commit is contained in:
@@ -1,13 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
use Livewire\Component;
|
||||
|
||||
new class extends Component
|
||||
{
|
||||
//
|
||||
new class extends Component {
|
||||
public Collection $crews;
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$this->crews = Auth::user()
|
||||
->crews()
|
||||
->withCount(['users', 'patches'])
|
||||
->get();
|
||||
}
|
||||
};
|
||||
?>
|
||||
|
||||
<div>
|
||||
{{-- Order your soul. Reduce your wants. - Augustine --}}
|
||||
</div>
|
||||
<div class="flex flex-col gap-3 px-4 pt-6 pb-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<h1 class="text-xl font-bold text-foreground">Your Groups</h1>
|
||||
<div class="flex gap-2">
|
||||
<button class="btn-outline w-full text-base bg-background">Join</button>
|
||||
<livewire:groups.create/>
|
||||
</div>
|
||||
</div>
|
||||
@foreach($crews as $crew)
|
||||
<livewire:group-card :crew="$crew" :key="$crew->id"/>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user