Big chat improvements, adjusted mobile ui.
This commit is contained in:
parent
80114d1d66
commit
7a922a5978
15 changed files with 201 additions and 101 deletions
|
|
@ -1,25 +1,16 @@
|
|||
import { isTauri } from "@tauri-apps/api/core";
|
||||
import { createContext, useEffect } from "react";
|
||||
import { createContext } from "react";
|
||||
|
||||
type contextType = {
|
||||
isTauri: boolean;
|
||||
nothing: undefined;
|
||||
};
|
||||
|
||||
export const context = createContext<contextType | undefined>(undefined);
|
||||
|
||||
export default function Provider({ children }: { children: React.ReactNode }) {
|
||||
const isTauriVar = isTauri();
|
||||
|
||||
useEffect(() => {
|
||||
if (!isTauriVar) return;
|
||||
|
||||
document.body.classList.add("");
|
||||
}, [isTauriVar]);
|
||||
|
||||
return (
|
||||
<context.Provider
|
||||
value={{
|
||||
isTauri: isTauriVar,
|
||||
nothing: undefined,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
|
|
|||
Loading…
Reference in a new issue