1- import useDocusaurusContext from "@docusaurus/useDocusaurusContext" ;
2- import Layout from "@theme/Layout" ;
3- import { useLocation } from "react-router-dom" ;
4- // There should be a line here that says
5- // import React from "react";
6- // VSCode might try to delete it, but that will break the site.
7- import { useEffect , useState } from "react" ;
1+ import { useState } from "react" ;
82import baseStyles from '../css/style.module.css' ;
9- import "../css/styles.css" ;
103
114function HomepageHeader ( ) {
12- const { siteConfig } = useDocusaurusContext ( ) ;
135 const [ isActive , setIsActive ] = useState ( false ) ;
146 const toggleMenu = ( ) => {
157 setIsActive ( ( prevState ) => ! prevState ) ;
@@ -40,26 +32,6 @@ function HomepageHeader() {
4032}
4133
4234export default function Home ( ) : JSX . Element {
43- const { siteConfig } = useDocusaurusContext ( ) ;
44-
45- const location = useLocation ( ) ;
46- const isBasePath = location . pathname === "/python-sdk/" ;
47-
48- useEffect ( ( ) => {
49- // Add or remove the class on the <body> tag
50- const mainWrapper = document . querySelector ( '#__docusaurus' )
51-
52- if ( isBasePath ) {
53- mainWrapper . classList . add ( "remove-default-components" , "landing-page-container" , "custom-head" , "custom-a" , "custom-img" ) ;
54- } else {
55- mainWrapper . classList . remove ( "remove-default-components" , "landing-page-container" , "custom-head" , "custom-a" , "custom-img" ) ;
56- }
57-
58- // Cleanup on component unmount
59- return ( ) => {
60- mainWrapper . classList . remove ( "remove-default-components" , "landing-page-container" , "custom-head" , "custom-a" , "custom-img" ) ;
61- } ;
62- } , [ isBasePath ] ) ;
6335
6436const code = `import groundlight
6537from framegrab import FrameGrabber
@@ -79,10 +51,7 @@ print(image_query)`;
7951 const codeLines = code . split ( "\n" ) ;
8052
8153 return (
82- < Layout
83- title = { `${ siteConfig . title } ` }
84- description = "Computer Vision powered by Natural Language"
85- >
54+ < div className = { baseStyles [ "landing-page-container" ] } >
8655 < HomepageHeader />
8756 < main >
8857 < section className = { baseStyles . bannersection } >
@@ -94,7 +63,7 @@ print(image_query)`;
9463 computer vision application. Groundlight’s fully managed computer vision solution takes care of the ML so
9564 you can focus on building.</ p >
9665 < div className = { baseStyles . buttonwrapper } >
97- < a href = "https://dashboard .groundlight.ai" className = { baseStyles . cmnButton } > Start building</ a >
66+ < a href = "https://login .groundlight.ai/oauth2/register?tenantId=aad3d06b-ef57-454e-b952-91e9d3d347b1 & client_id = ac8aac5d - c278-4c14-a549-e039f5ac54bb & nonce = & redirect_uri = https % 3 A % 2 F % 2 Fdashboard . groundlight . ai % 2 Fdevice-api % 2 Fauthz % 2 Fcallback & response_type = code & scope = openid % 20 profile % 20 email % 20 offline_access " className = { baseStyles . cmnButton } > Start building</ a >
9867 < a href = "/python-sdk/docs/getting-started" className = { `${ baseStyles . cmnButton } ${ baseStyles . outline } ` } > See the docs</ a >
9968 </ div >
10069 </ div >
@@ -286,10 +255,10 @@ print(image_query)`;
286255 </ ul >
287256 </ div >
288257 </ div >
289- < div className = { baseStyles . copyright } > Copyright © { new Date ( ) . getFullYear ( ) } Groundlight AI.</ div >
258+ < div className = { baseStyles . copyright } > Copyright © { new Date ( ) . getFullYear ( ) } Groundlight AI.</ div >
290259 </ div >
291260 </ footer >
292261 </ main >
293- </ Layout >
262+ </ div >
294263 ) ;
295264}
0 commit comments