mirror of https://github.com/buster-so/buster.git
Merge branch 'staging' into big-nate-bus-1883-wrap-dynamic-components-in-wrapper
This commit is contained in:
commit
e962ffa5fa
|
@ -0,0 +1,15 @@
|
|||
import { useMount } from '@/hooks/useMount';
|
||||
import { formatDate } from '@/lib/date';
|
||||
|
||||
export const useWelcomeConsole = () => {
|
||||
useMount(() => {
|
||||
console.log(
|
||||
`%c🚀 Welcome to Buster #${import.meta.env.VITE_BUILD_ID}`,
|
||||
'background: linear-gradient(to right, #a21caf, #8b1cb1, #6b21a8); color: white; font-size: 16px; font-weight: bold; padding: 10px; border-radius: 5px;'
|
||||
);
|
||||
console.log(
|
||||
`%c🐛 Found a bug? The code is open-source! Report it at https://github.com/buster-so/buster or send a PR! 🚀 • This version was deployed at ${formatDate({ date: import.meta.env.VITE_BUILD_AT, format: 'LLLL' })}`,
|
||||
'background: #6b21a8; color: white !important; font-size: 10px; font-weight: 500; padding: 8px 12px; border-radius: 5px; text-decoration: none; --webkit-text-fill-color: white; --webkit-text-stroke-color: white;'
|
||||
);
|
||||
});
|
||||
};
|
|
@ -10,6 +10,7 @@ import {
|
|||
import { ComponentErrorCard } from '@/components/features/global/ComponentErrorCard';
|
||||
import { isDev } from '@/config/dev';
|
||||
import { env } from '@/env';
|
||||
import { useMount } from '@/hooks/useMount';
|
||||
import packageJson from '../../../package.json';
|
||||
|
||||
const version = packageJson.version;
|
||||
|
@ -37,17 +38,6 @@ const options: Partial<PostHogConfig> = {
|
|||
session_recording: {
|
||||
recordBody: true,
|
||||
},
|
||||
|
||||
loaded: () => {
|
||||
console.log(
|
||||
`%c🚀 Welcome to Buster v${version}`,
|
||||
'background: linear-gradient(to right, #a21caf, #8b1cb1, #6b21a8); color: white; font-size: 16px; font-weight: bold; padding: 10px; border-radius: 5px;'
|
||||
);
|
||||
console.log(
|
||||
'%cBuster is your open-source data analytics platform. Found a bug? The code is open-source! Report it at https://github.com/buster-so/buster. Better yet, fix it yourself and send a PR.',
|
||||
'background: #6b21a8; color: white; font-size: 10px; font-weight: normal; padding: 8px; border-radius: 4px;'
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
const PosthogWrapper: React.FC<PropsWithChildren> = ({ children }) => {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import type React from 'react';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import { isDev } from '@/config/dev';
|
||||
import { BusterPosthogProvider } from '@/context/Posthog';
|
||||
import { useAppVersion } from './AppVersion/useAppVersion';
|
||||
import { useWelcomeConsole } from './AppVersion/useWelcomeConsole';
|
||||
import { BusterStyleProvider } from './BusterStyles';
|
||||
import {
|
||||
SupabaseContextProvider,
|
||||
|
@ -16,7 +18,10 @@ export const AppProviders: React.FC<PropsWithChildren<SupabaseContextType>> = ({
|
|||
children,
|
||||
supabaseSession,
|
||||
}) => {
|
||||
if (!isDev) {
|
||||
useAppVersion();
|
||||
useWelcomeConsole();
|
||||
}
|
||||
|
||||
return (
|
||||
<SupabaseContextProvider supabaseSession={supabaseSession}>
|
||||
|
|
Loading…
Reference in New Issue