{title || language}
{showCopyButton && (
@@ -49,21 +53,3 @@ export const AppCodeBlockWrapper: React.FC<{
);
});
AppCodeBlockWrapper.displayName = 'CodeBlockWrapper';
-
-const useStyles = createStyles(({ token }) => ({
- container: {
- backgroundColor: token.colorBgBase,
- margin: `0px 0px`,
- border: `0.5px solid ${token.colorBorder}`,
- borderRadius: `${token.borderRadiusLG}px`,
- overflow: 'hidden'
- },
- containerHeader: {
- borderBottom: `0.5px solid ${token.colorBorder}`,
- padding: '4px',
- backgroundColor: token.controlItemBgActive,
- height: '32px',
- minHeight: '32px',
- maxHeight: '32px'
- }
-}));
diff --git a/web/src/components/ui/typography/AppMarkdown/AppMarkdownCommon.tsx b/web/src/components/ui/typography/AppMarkdown/AppMarkdownCommon.tsx
index b7b0841b4..89fe8b414 100644
--- a/web/src/components/ui/typography/AppMarkdown/AppMarkdownCommon.tsx
+++ b/web/src/components/ui/typography/AppMarkdown/AppMarkdownCommon.tsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { JSX } from 'react';
import { ExtraProps } from 'react-markdown';
import { AppCodeBlock } from '../AppCodeBlock/AppCodeBlock';
import { TextPulseLoader } from '@/components/ui/loaders';
@@ -95,7 +95,7 @@ export const CustomHeading: React.FC<
numberOfLineMarkdown: number;
} & ExtraPropsExtra
> = ({ level, children, markdown, ...rest }) => {
- const HeadingTag = `h${level}` as keyof JSX.IntrinsicElements;
+ const HeadingTag = `h${level}` as any;
return (
{children}
diff --git a/web/src/context/BusterReactQuery/getQueryClient.ts b/web/src/context/BusterReactQuery/getQueryClient.ts
index ec15e7bbe..91cb5392d 100644
--- a/web/src/context/BusterReactQuery/getQueryClient.ts
+++ b/web/src/context/BusterReactQuery/getQueryClient.ts
@@ -5,7 +5,8 @@ function makeQueryClient() {
return new QueryClient({
defaultOptions: {
queries: {
- staleTime: PREFETCH_STALE_TIME
+ staleTime: PREFETCH_STALE_TIME,
+ queryFn: () => Promise.resolve()
},
dehydrate: {
// include pending queries in dehydration
diff --git a/web/src/hooks/useBusterSupabaseAuthMethods.ts b/web/src/hooks/useBusterSupabaseAuthMethods.ts
index 10b9e3f23..602aee5f7 100644
--- a/web/src/hooks/useBusterSupabaseAuthMethods.ts
+++ b/web/src/hooks/useBusterSupabaseAuthMethods.ts
@@ -1,3 +1,5 @@
+'use server';
+
import { createClient } from '@/context/Supabase/server';
import { redirect } from 'next/navigation';
import { BusterRoutes, createBusterRoute } from '@/routes/busterRoutes/busterRoutes';
@@ -205,3 +207,27 @@ export const useBusterSupabaseAuthMethods = () => {
resetPasswordEmailSend
};
};
+
+export const signOut = async () => {
+ const supabase = await createClient();
+ const queryClient = new QueryClient();
+
+ const { error } = await supabase.auth.signOut();
+
+ if (error) {
+ return { error: error.message };
+ }
+
+ setTimeout(() => {
+ Object.keys(Cookies.get()).forEach((cookieName) => {
+ Cookies.remove(cookieName);
+ });
+ queryClient.clear();
+ }, 650);
+
+ return redirect(
+ createBusterRoute({
+ route: BusterRoutes.AUTH_LOGIN
+ })
+ );
+};
diff --git a/web/src/routes/externalRoutes.ts b/web/src/routes/externalRoutes.ts
index e4b2a0fc0..2514f5cbc 100644
--- a/web/src/routes/externalRoutes.ts
+++ b/web/src/routes/externalRoutes.ts
@@ -1 +1,2 @@
export const BUSTER_HOME_PAGE = 'https://buster.so';
+export const BUSTER_DOCS_URL = 'https://docs.buster.so';