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";
|
"use client";
|
||||||
|
|
||||||
import { FC, ReactNode } from "react";
|
import { FC, ReactNode } from "react";
|
||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
import { AppProgressBar } from "next-nprogress-bar";
|
import { AppProgressBar } from "next-nprogress-bar";
|
||||||
@ -23,16 +24,20 @@ export interface IAppProvider {
|
|||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ToastWithTheme = () => {
|
||||||
|
const { resolvedTheme } = useTheme();
|
||||||
|
return <Toast theme={resolveGeneralTheme(resolvedTheme)} />;
|
||||||
|
};
|
||||||
|
|
||||||
export const AppProvider: FC<IAppProvider> = (props) => {
|
export const AppProvider: FC<IAppProvider> = (props) => {
|
||||||
const { children } = props;
|
const { children } = props;
|
||||||
// themes
|
// themes
|
||||||
const { resolvedTheme } = useTheme();
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppProgressBar height="4px" color="#3F76FF" options={{ showSpinner: false }} shallowRouting />
|
<AppProgressBar height="4px" color="#3F76FF" options={{ showSpinner: false }} shallowRouting />
|
||||||
<Toast theme={resolveGeneralTheme(resolvedTheme)} />
|
|
||||||
<StoreProvider>
|
<StoreProvider>
|
||||||
<ThemeProvider themes={["light", "dark", "light-contrast", "dark-contrast", "custom"]} defaultTheme="system">
|
<ThemeProvider themes={["light", "dark", "light-contrast", "dark-contrast", "custom"]} defaultTheme="system">
|
||||||
|
<ToastWithTheme />
|
||||||
<InstanceWrapper>
|
<InstanceWrapper>
|
||||||
<StoreWrapper>
|
<StoreWrapper>
|
||||||
<CrispWrapper>
|
<CrispWrapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user