fix style and ahoy configure

This commit is contained in:
an-lee
2024-03-29 09:19:52 +08:00
parent c55f05f721
commit ad5d4a6c37
2 changed files with 9 additions and 8 deletions

View File

@@ -243,7 +243,7 @@ export const Sidebar = () => {
</Button>
</DialogTrigger>
<DialogContent className="max-w-full max-w-screen-md xl:max-w-screen-lg h-5/6 p-0">
<DialogContent className="max-w-screen-md xl:max-w-screen-lg h-5/6 p-0">
<Preferences />
</DialogContent>
</Dialog>

View File

@@ -73,15 +73,16 @@ export const AppSettingsProvider = ({
locale: language,
})
);
if (user) {
ahoy.configure({
urlPrefix: apiUrl,
});
ahoy.track("logged in", { user: user.id });
}
}, [user, apiUrl, language]);
useEffect(() => {
if (!apiUrl) return;
ahoy.configure({
urlPrefix: apiUrl,
});
}, [apiUrl]);
const prepareFfmpeg = async () => {
try {
const valid = await EnjoyApp.ffmpeg.check();