feat: add s3 localstack, upload api

This commit is contained in:
BennyKok
2023-12-13 17:14:55 +08:00
parent f9ed8145d2
commit 0835d966f1
34 changed files with 1112 additions and 227 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ import { create } from "zustand";
type State = {
data: {
id: string;
timestamp: number;
json: {
event: string;
data: any;
@@ -27,7 +28,7 @@ export const useStore = create<State>((set) => ({
addData: (id, json) =>
set((state) => ({
...state,
data: [...state.data, { id, json }],
data: [...state.data, { id, json, timestamp: Date.now() }],
})),
}));