quivr/frontend/lib/hooks/useToast.ts
Zineb El Bachiri 9c8e0aa0e4
Feat/multiple brains frontend (#344)
* 🗑️ remove date input from fetch_user_id_from_credentials

* ♻️ refactor backend utils by splitting it into files

* 💡 comments for next actions to update /upload

* 🚚 move SupabaseProvider tp libs

* 🚚 move useAxios to hooks

* ♻️ refacto brain routes

* 🚨 update lintermfor paths

*  new brain context provider

*  new brain component in navbar

* 🚨 fix linter and async

* 🇸🇪 add feature flag for multiple-brains
2023-06-20 16:17:13 +02:00

13 lines
325 B
TypeScript

import { useContext } from "react";
import { ToastContext } from "../components/ui/Toast/domain/ToastContext";
import { ToastPublisher } from "../components/ui/Toast/domain/types";
export const useToast = (): { publish: ToastPublisher } => {
const { publish } = useContext(ToastContext);
return {
publish,
};
};