Skip to content

Commit

Permalink
improve no data message
Browse files Browse the repository at this point in the history
  • Loading branch information
AmonDeShir committed Aug 8, 2024
1 parent fd506fd commit fea22e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/js/Components/SortableTable.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts" generic="T extends { id: number }">
import { defineProps } from 'vue'
import { withSort } from '@/Utils/sort'
import { Link } from '@inertiajs/vue3'
const props = defineProps<{
data: T[]
Expand Down Expand Up @@ -42,6 +43,9 @@ const {sorted, sortBy} = withSort(props.data, 'id')
</tr>
</tbody>
</table>
<h1 v-else>No logs loaded</h1>
<div v-else>
No data loaded. Go to the organization page to fetch them.
<Link class="cursor-pointer px-5 py-3 text-xs font-bold rounded-md bg-blue-500 hover:bg-blue-500/75 text-white ml-2" href="/organization">Navigate</Link>
</div>
</template>

0 comments on commit fea22e5

Please sign in to comment.