diff --git a/app/e-lab/startups/[id]/page.tsx b/app/e-lab/startups/[id]/page.tsx new file mode 100644 index 0000000..f55f9ab --- /dev/null +++ b/app/e-lab/startups/[id]/page.tsx @@ -0,0 +1,18 @@ +import { startups, Startup} from '@data/e-lab-startups'; +import StartupDetails from '@components/StartupDetails'; + +export default function StartupPage({ params }: { params: { id: string } }) { + + const startup: Startup | undefined = startups.find((startup: Startup) => { + if (startup && startup.id === params.id) { + return startup; + } + return undefined; + }); + + if (!startup) { + return
Startup Not Found
; + } + + return ; +} \ No newline at end of file diff --git a/app/hero.tsx b/app/hero.tsx index 3d3fd55..fc162c0 100644 --- a/app/hero.tsx +++ b/app/hero.tsx @@ -27,7 +27,7 @@ export const Hero = () => { distort={0.3} wireframe={true} wireframeLinewidth={5} - color={fullConfig.theme.colors.purple["600"]} + color={(fullConfig.theme?.colors?.purple?.["600"] as string) ?? "#000000"} transparent opacity={0.4} blending={THREE.AdditiveBlending} diff --git a/components/StartupDetails.tsx b/components/StartupDetails.tsx new file mode 100644 index 0000000..cf7a658 --- /dev/null +++ b/components/StartupDetails.tsx @@ -0,0 +1,64 @@ +"use client"; + +import Image from 'next/image'; +import Link from 'next/link'; +import { Startup } from '@data/e-lab'; +import { useState } from 'react'; + +const StartupDetails = ({ startup }: { startup: Startup }) => { + const [imageError, setImageError] = useState(false); + + return ( +
+
+ +
+

{startup.name}

+ {!imageError && ( + {`${startup.name} setImageError(true)} + /> + )} +
+ +

{startup.description}

+ +

Metrics

+
    + {Object.entries(startup.metrics).map(([key, value]) => ( +
  • + {key}: {String(value)} +
  • + ))} +
+ +

About {startup.name}

+

{startup.about}

+ +

Founders

+
    + {startup.founders.map((founder) => ( +
  • + {founder.name} - {founder.role} +
  • + ))} +
+ + + Visit Website + +
+
+ ); +}; + +export default StartupDetails; \ No newline at end of file diff --git a/data/e-lab-startups.tsx b/data/e-lab-startups.tsx new file mode 100644 index 0000000..2697133 --- /dev/null +++ b/data/e-lab-startups.tsx @@ -0,0 +1,48 @@ +export interface Startup { + id: string; + name: string; + description: string; + founders: Founder[]; + metrics: Metrics; + website: string; + logo: string; + about?: string; +} + +export interface Founder { + name: string; + role: string; +} + +export type Metrics = Record; + +export const startups: Startup[] = [ + { + "id": "airbnb", + "name": "Airbnb", + "description": "Airbnb is an online marketplace for short-term homestays and experiences.", + "founders": [ + { + "name": "Brian Chesky", + "role": "CEO, Co-founder" + }, + { + "name": "Joe Gebbia", + "role": "Co-founder" + }, + { + "name": "Nathan Blecharczyk", + "role": "Chief Strategy Officer, Co-founder" + } + ], + "metrics": { + "Year Founded": "2008", + "Valuation": "$113 billion", + "Funding Raised": "$6.4 billion", + "Employees": "6,132" + }, + "about": "Airbnb has revolutionized the travel industry by allowing homeowners to rent out their spaces to travelers. Founded in 2008, the company has grown from a small startup to a global phenomenon, operating in over 220 countries and regions. Airbnb's platform not only provides unique accommodation options for travelers but also empowers hosts to earn extra income. The company's success lies in its ability to create a trusted community marketplace and its continuous innovation in the travel and hospitality sector.", + "website": "https://www.airbnb.com", + "logo": "/assets/e-lab/startups/airbnb-logo.png" + } +]; \ No newline at end of file diff --git a/data/e-lab.tsx b/data/e-lab.tsx index b038b6b..4bd9364 100644 --- a/data/e-lab.tsx +++ b/data/e-lab.tsx @@ -145,3 +145,21 @@ export const faq = [ "The AI E-Lab is a part-time program. Keep in mind that the more you commit, the more you get out of this program.", }, ]; + +export interface Founder { + name: string; + role: string; +} + +export type Metrics = Record; + +export interface Startup { + id: string; + name: string; + description: string; + founders: Founder[]; + metrics: Metrics; + website: string; + logo: string; + about?: string; +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 86430dd..3f72709 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -28,6 +28,9 @@ "@components/*": [ "./components/*" ], + "@data/*": [ + "./data/*" + ], "@ui/*": [ "./components/ui/*" ],