mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[WEB-1597] fix: toast themes. (#4781)
This commit is contained in:
parent
a0152cab55
commit
d64cc44225
@ -1,4 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { FC, ReactNode } from "react";
|
||||
import dynamic from "next/dynamic";
|
||||
import { AppProgressBar } from "next-nprogress-bar";
|
||||
@ -23,16 +24,20 @@ export interface IAppProvider {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
const ToastWithTheme = () => {
|
||||
const { resolvedTheme } = useTheme();
|
||||
return <Toast theme={resolveGeneralTheme(resolvedTheme)} />;
|
||||
};
|
||||
|
||||
export const AppProvider: FC<IAppProvider> = (props) => {
|
||||
const { children } = props;
|
||||
// themes
|
||||
const { resolvedTheme } = useTheme();
|
||||
return (
|
||||
<>
|
||||
<AppProgressBar height="4px" color="#3F76FF" options={{ showSpinner: false }} shallowRouting />
|
||||
<Toast theme={resolveGeneralTheme(resolvedTheme)} />
|
||||
<StoreProvider>
|
||||
<ThemeProvider themes={["light", "dark", "light-contrast", "dark-contrast", "custom"]} defaultTheme="system">
|
||||
<ToastWithTheme />
|
||||
<InstanceWrapper>
|
||||
<StoreWrapper>
|
||||
<CrispWrapper>
|
||||
|
Loading…
Reference in New Issue
Block a user