Add GA4 events

This commit is contained in:
Misode
2022-05-09 02:20:56 +02:00
parent 177e32c000
commit e63b4839dc
8 changed files with 210 additions and 37 deletions

View File

@@ -26,6 +26,7 @@ export type ProjectFile = {
}
interface ProjectContext {
projects: Project[],
project: Project,
file?: ProjectFile,
changeProject: (name: string) => unknown,
@@ -35,6 +36,7 @@ interface ProjectContext {
closeFile: () => unknown,
}
const Project = createContext<ProjectContext>({
projects: [DRAFT_PROJECT],
project: DRAFT_PROJECT,
changeProject: () => {},
updateProject: () => {},
@@ -105,6 +107,7 @@ export function ProjectProvider({ children }: { children: ComponentChildren }) {
}, [])
const value: ProjectContext = {
projects,
project,
file,
changeProject: setProjectName,