- Enhanced ESLint configuration by adding new rules for import consistency and type imports. - Refactored multiple files to replace regular imports with type imports for better clarity and performance. - Ensured consistent use of type imports across the application to align with TypeScript best practices. Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
19 lines
447 B
TypeScript
19 lines
447 B
TypeScript
"use client";
|
|
|
|
import type { ReactNode } from "react";
|
|
import { useTheme } from "next-themes";
|
|
// plane imports
|
|
import { Toast } from "@plane/propel/toast";
|
|
import { resolveGeneralTheme } from "@plane/utils";
|
|
|
|
export const ToastProvider = ({ children }: { children: ReactNode }) => {
|
|
// themes
|
|
const { resolvedTheme } = useTheme();
|
|
|
|
return (
|
|
<>
|
|
<Toast theme={resolveGeneralTheme(resolvedTheme)} />
|
|
{children}
|
|
</>
|
|
);
|
|
};
|