-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
62 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ GOCARDLESS_SECRET_KEY= | |
KV_REST_API_URL= | ||
KV_REST_API_TOKEN= | ||
NOVU_API_KEY= | ||
NEXT_PUBLIC_TRIGGER_API_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use client"; | ||
|
||
import { I18nProviderClient } from "@/locales/client"; | ||
import { TriggerProvider } from "@trigger.dev/react"; | ||
import { ReactNode } from "react"; | ||
|
||
type ProviderProps = { | ||
locale: string; | ||
children: ReactNode; | ||
}; | ||
|
||
export function Providers({ locale, children }: ProviderProps) { | ||
return ( | ||
<I18nProviderClient locale={locale}> | ||
<TriggerProvider | ||
publicApiKey={process.env.NEXT_PUBLIC_TRIGGER_API_KEY!} | ||
apiUrl={process.env.NEXT_PUBLIC_TRIGGER_API_URL} | ||
> | ||
{children} | ||
</TriggerProvider> | ||
</I18nProviderClient> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"use client"; | ||
|
||
import { useToast } from "@midday/ui/use-toast"; | ||
import { useEventRunDetails } from "@trigger.dev/react"; | ||
import { useEffect } from "react"; | ||
|
||
export function ExportStatus() { | ||
const { toast } = useToast(); | ||
const { data, isLoading } = useEventRunDetails(); | ||
|
||
useEffect(() => { | ||
toast({ | ||
variant: "progress", | ||
title: "Exporting...", | ||
description: "Your export is based on 46 transactions.", | ||
}); | ||
}, [isLoading]); | ||
|
||
useEffect(() => { | ||
if (data?.status === "FAILURE") { | ||
toast({ | ||
duration: 3500, | ||
variant: "error", | ||
title: "Something went wrong pleaase try again.", | ||
}); | ||
} | ||
}, [data]); | ||
|
||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters