@bbki.ng/site 1.7.10 → 1.7.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 1.7.12
4
+
5
+ ## 1.7.11
6
+
3
7
  ## 1.7.10
4
8
 
5
9
  ## 1.7.9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/site",
3
- "version": "1.7.10",
3
+ "version": "1.7.12",
4
4
  "description": "code behind bbki.ng",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/app.tsx CHANGED
@@ -25,6 +25,7 @@ import { AppCtxMenu } from "@/components/app_ctx_menu";
25
25
  import { Pochacco, PochaccoPose } from "@/components/Pochacco/Pochacco";
26
26
  import { Role, useRole } from "@/hooks/use_role";
27
27
  import { EffectContextProvider } from "@/components/effect-layer/EffectContextProvider";
28
+ import { BotRedirect } from "@/pages/bot";
28
29
 
29
30
  const Layout = () => {
30
31
  const { isLoading, isFontLoading } = useContext(GlobalLoadingContext);
@@ -80,6 +81,7 @@ export const App = () => {
80
81
  <Route path="tags" element={<TagsInMidCol />} />
81
82
  <Route path="tags/:tag" element={<TagsResultInMidCol />} />
82
83
 
84
+ <Route path="bot" element={<BotRedirect />} />
83
85
  <Route path="now" element={<NowInMidCol />} />
84
86
  <Route path="login" element={<LoginInMidCol />} />
85
87
  <Route path="upload" element={<UploadPage />} />
@@ -0,0 +1,14 @@
1
+ import { useEffect } from "react";
2
+ import { useSearchParams } from "react-router-dom";
3
+
4
+ export const BotRedirect = () => {
5
+ const [param] = useSearchParams();
6
+
7
+ const code = param.get("code");
8
+
9
+ useEffect(() => {
10
+ window.location.href = `https://t.me/BBKingsBot?start=${code}`;
11
+ }, [code]);
12
+
13
+ return null;
14
+ };