Files
lucent-laravel/front/js/svelte/home/Index.svelte
T

36 lines
951 B
Svelte
Raw Normal View History

2023-10-02 23:10:49 +03:00
<script>
2026-04-20 21:07:35 +03:00
import { getContext, onMount } from "svelte";
import RecordRow from "./RecordRow.svelte";
2026-05-06 23:16:09 +03:00
import { apiGet } from "../../helpers";
2023-10-02 23:10:49 +03:00
const channel = getContext("channel");
let records = [];
let graph = null;
let users = [];
onMount(() => {
2026-05-06 23:16:09 +03:00
apiGet(channel.lucentUrl + "/home/records")
.then((data) => {
records = data.records;
users = data.users;
2023-10-02 23:10:49 +03:00
})
.catch((error) => {
console.log(error);
});
});
</script>
2024-08-15 14:44:53 +03:00
<h3 class="header-small mb-4 mt-5">Latest Content changes</h3>
{#if records.length > 0}
<div class="table">
<table class="">
<tbody>
2026-04-20 21:07:35 +03:00
{#each records as record (record.id)}
<tr>
2026-05-06 23:16:09 +03:00
<RecordRow {record} {users} />
2026-04-20 21:07:35 +03:00
</tr>
{/each}
2024-08-15 14:44:53 +03:00
</tbody>
</table>
</div>
{/if}