From 5d923003fb47ab8349f79f9c0972794226936783 Mon Sep 17 00:00:00 2001 From: Fahad Ahmad Date: Thu, 16 Nov 2023 20:51:58 +0530 Subject: [PATCH] these are deprecated stuff but can be useful --- src/components/AiInCLI.tsx | 103 ----------------- src/components/Globe.tsx | 176 ------------------------------ src/components/LandingHero.tsx | 4 +- src/components/NoGlobeLanding.tsx | 97 ++++++++++++++++ 4 files changed, 99 insertions(+), 281 deletions(-) delete mode 100644 src/components/AiInCLI.tsx delete mode 100644 src/components/Globe.tsx create mode 100644 src/components/NoGlobeLanding.tsx diff --git a/src/components/AiInCLI.tsx b/src/components/AiInCLI.tsx deleted file mode 100644 index bd75bd8..0000000 --- a/src/components/AiInCLI.tsx +++ /dev/null @@ -1,103 +0,0 @@ -"use client"; - -import React from "react"; -import CodeTabs from "./showcase/CodeTabs"; -import { useMediaQuery } from "@mantine/hooks"; - -function AiInCli() { - const isMobile = useMediaQuery("(max-width: 768px)"); - - return ( -
-

- See. - THE AI - in - Action -

-
-

- - {"-> "} - Get your Auth. project perfectly running
- with as Low-Code as 3 lines. -
- - That’s is folks! - -

-
- -

- 1 - pip install - trustauthx -

- -

- - 2 - - trustauthx - login - - {" "} - me -k - {" -s -o "}{" "} - -

- -

- - 3 - - trustauthx - neuroform - fastapi -

- -

- - 4 - - trustauthx - start - fastapi -

-
- } - jsFileName="js (cli)" - goFileName="go (cli)" - /> - -
-
- - ); -} - -export default AiInCli; diff --git a/src/components/Globe.tsx b/src/components/Globe.tsx deleted file mode 100644 index 5884e5a..0000000 --- a/src/components/Globe.tsx +++ /dev/null @@ -1,176 +0,0 @@ -import React, { Suspense, useEffect, useRef } from "react"; -import createGlobe from "cobe"; -import { useSpring } from "react-spring"; -import Link from "next/link"; -import appDemo from "@/public/images/AppDemo.webp"; -import { Button } from "@/components/ui/button"; - -export function Globe() { - const canvasRef = useRef(null); - - const [{ r }, api] = useSpring(() => ({ - r: 0, - config: { - mass: 1, - tension: 280, - friction: 40, - precision: 0.001, - }, - })); - useEffect(() => { - let phi = 0; - let width = 0; - const size = Math.min(window.innerHeight, window.innerWidth, 800); - const onResize = () => - canvasRef.current && (width = canvasRef.current.offsetWidth); - window.addEventListener("resize", onResize); - onResize(); - if (canvasRef.current) { - const globe = createGlobe(canvasRef.current, { - devicePixelRatio: 2, - width: width * 2, - height: width, - scale: 0.9, - phi: 0, - theta: 0.2, - dark: 1.1, - offset: [2100.66, 1800.0], - diffuse: 3, - mapSamples: 16000, - mapBrightness: 1.8, - mapBaseBrightness: 0.05, - baseColor: [1.1, 1.1, 1.1], - markerColor: [251 / 255, 100 / 255, 21 / 255], - glowColor: [1.1, 1.1, 1.1], - markers: [], - opacity: 0.7, - onRender: (state) => { - // Called on every animation frame. - // `state` will be an empty object, return updated params. - state.phi = phi + r.get(); - phi += 0.005; - state.width = width * 2; - state.height = width * 2; - }, - }); - setTimeout(() => { - if (canvasRef.current) { - canvasRef.current.style.opacity = "1"; - } - }); - return () => globe.destroy(); - } - }, []); - return ( -
-
-
-

- TrustAuthX
- Low-Code Auth
- Infra for the Web.{" "} -

-
- - - - -
-
-
-
- Preview of TrustAuthX app -
-
- - - -

- Low-Code Is The New
- Source Code -

-

- TrustAuthx Serverless Ai Based Authentication & Authorization{" "} -
- infrastructure, manage everything from Auth to Sessions. -

-
-
-
-
- -
-
- ); -} diff --git a/src/components/LandingHero.tsx b/src/components/LandingHero.tsx index 6ab8a4c..3fd2225 100644 --- a/src/components/LandingHero.tsx +++ b/src/components/LandingHero.tsx @@ -1,7 +1,7 @@ "use client"; import React from "react"; -import { Globe } from "./Globe"; -import { Landing } from "./Landing"; +import { Globe } from "./Landing"; +import { Landing } from "./NoGlobeLanding"; // export default function LandingHero() { diff --git a/src/components/NoGlobeLanding.tsx b/src/components/NoGlobeLanding.tsx new file mode 100644 index 0000000..8977f00 --- /dev/null +++ b/src/components/NoGlobeLanding.tsx @@ -0,0 +1,97 @@ +import React from "react"; + +import Link from "next/link"; + +export function NoGlobeLanding() { + return ( + <> +
+
+
+
+ +
+
+
+ TrusthAuthx: Low-Code Auth Infra for the web{" "} + _ +
+
+

+ {"Appwrite's"} open-source platform lets you add Auth, DBs, + Functions and Storage to your product and build any + application at any scale, own your data, and use your + preferred coding languages and tools. +

+ + + +
+
+ +
+
+
+ + ); +}