From bce1c241b12a69d18a2d3a79f7f1010126db9183 Mon Sep 17 00:00:00 2001
From: Glitch
Date: Tue, 18 Jun 2024 10:51:24 -0300
Subject: [PATCH 1/2] add
---
apps/laboratory/src/pages/_app.tsx | 13 +++++++++++++
apps/laboratory/src/pages/_document.tsx | 4 +++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/apps/laboratory/src/pages/_app.tsx b/apps/laboratory/src/pages/_app.tsx
index 8e8805c984..ca38e6a197 100644
--- a/apps/laboratory/src/pages/_app.tsx
+++ b/apps/laboratory/src/pages/_app.tsx
@@ -1,3 +1,4 @@
+import { useEffect } from 'react'
import { ChakraProvider } from '@chakra-ui/react'
import type { AppProps } from 'next/app'
import Layout from '../layout'
@@ -7,12 +8,23 @@ import type { Session } from 'next-auth'
bootstrapSentry()
+declare global {
+ interface Window {
+ Telegram: { WebApp: { ready: () => void } }
+ }
+}
+
export default function App({
Component,
pageProps
}: AppProps<{
session: Session
}>) {
+
+ useEffect(()=>{
+ window.Telegram?.WebApp.ready()
+ },[])
+
return (
@@ -23,3 +35,4 @@ export default function App({
)
}
+
diff --git a/apps/laboratory/src/pages/_document.tsx b/apps/laboratory/src/pages/_document.tsx
index eff2ba5931..23487c79dd 100644
--- a/apps/laboratory/src/pages/_document.tsx
+++ b/apps/laboratory/src/pages/_document.tsx
@@ -4,7 +4,9 @@ import { ColorModeScript } from '@chakra-ui/react'
export default function Document() {
return (
-
+
+
+
From 27ba43844bc5a1bef0af6198eab60e8f451b4f2a Mon Sep 17 00:00:00 2001
From: Glitch
Date: Tue, 18 Jun 2024 11:41:21 -0300
Subject: [PATCH 2/2] prettier
---
apps/laboratory/src/pages/_app.tsx | 6 ++----
apps/laboratory/src/pages/_document.tsx | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/apps/laboratory/src/pages/_app.tsx b/apps/laboratory/src/pages/_app.tsx
index ca38e6a197..f16b3b86ac 100644
--- a/apps/laboratory/src/pages/_app.tsx
+++ b/apps/laboratory/src/pages/_app.tsx
@@ -20,10 +20,9 @@ export default function App({
}: AppProps<{
session: Session
}>) {
-
- useEffect(()=>{
+ useEffect(() => {
window.Telegram?.WebApp.ready()
- },[])
+ }, [])
return (
@@ -35,4 +34,3 @@ export default function App({
)
}
-
diff --git a/apps/laboratory/src/pages/_document.tsx b/apps/laboratory/src/pages/_document.tsx
index 23487c79dd..4f3bbbdc3a 100644
--- a/apps/laboratory/src/pages/_document.tsx
+++ b/apps/laboratory/src/pages/_document.tsx
@@ -5,7 +5,7 @@ export default function Document() {
return (
-
+