mirror of
https://github.com/dylanbenzi/yellowbird.git
synced 2026-11-27 01:07:01 +00:00
updates to symbol page
This commit is contained in:
@@ -1,7 +1,48 @@
|
||||
import {
|
||||
DocumentsModule,
|
||||
NewsModule,
|
||||
} from "@/components/modules/HomepageModules";
|
||||
import {
|
||||
AnalysisModule,
|
||||
DescriptionModule,
|
||||
EarningsEventsModule,
|
||||
KPIModule,
|
||||
PeerComparisonModule,
|
||||
PriceModule,
|
||||
} from "@/components/modules/SymbolModules";
|
||||
import React from "react";
|
||||
|
||||
const page = () => {
|
||||
return <div>hello!</div>;
|
||||
return (
|
||||
<main>
|
||||
<div className="px-6 pb-6 grid grid-cols-8 gap-6 flex-1">
|
||||
<div className="h-96 col-span-4">
|
||||
<PriceModule />
|
||||
</div>
|
||||
<div className="h-96 col-span-4">
|
||||
<DescriptionModule />
|
||||
</div>
|
||||
<div className="h-52 col-span-4">
|
||||
<NewsModule />
|
||||
</div>
|
||||
<div className="h-52 col-span-4">
|
||||
<KPIModule />
|
||||
</div>
|
||||
<div className="h-96 col-span-4">
|
||||
<EarningsEventsModule />
|
||||
</div>
|
||||
<div className="h-96 col-span-4">
|
||||
<PeerComparisonModule />
|
||||
</div>
|
||||
<div className="h-96 col-span-8">
|
||||
<AnalysisModule />
|
||||
</div>
|
||||
<div className="h-96 col-span-2">
|
||||
<DocumentsModule />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
|
||||
@@ -0,0 +1,320 @@
|
||||
import { seriesFive } from "@/app/MockData/seriesFive";
|
||||
import Chart, { LineSeriesPartialOptionsWithData } from "../charts/Chart";
|
||||
import { LineType } from "lightweight-charts";
|
||||
import HomepageModule from "./HomepageModuleCard";
|
||||
import { globalColors } from "@/lib/utils";
|
||||
import Image from "next/image";
|
||||
import { Separator } from "../ui/separator";
|
||||
import { seriesOne } from "@/app/MockData/seriesOne";
|
||||
import { seriesTwo } from "@/app/MockData/seriesTwo";
|
||||
import { seriesThree } from "@/app/MockData/seriesThree";
|
||||
import { seriesFour } from "@/app/MockData/seriesFour";
|
||||
|
||||
export const PriceModule = () => {
|
||||
const symbolLine: LineSeriesPartialOptionsWithData = {
|
||||
type: "line",
|
||||
data: seriesOne,
|
||||
color: globalColors.yellow,
|
||||
lineType: LineType.Curved,
|
||||
};
|
||||
|
||||
return (
|
||||
<HomepageModule title="Price Chart">
|
||||
<div className="h-full relative">
|
||||
<Chart
|
||||
series={[symbolLine]}
|
||||
colors={{}}
|
||||
options={{
|
||||
grid: {
|
||||
horzLines: {
|
||||
visible: true,
|
||||
color: "#343434",
|
||||
},
|
||||
vertLines: {
|
||||
visible: true,
|
||||
color: "#343434",
|
||||
},
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</HomepageModule>
|
||||
);
|
||||
};
|
||||
|
||||
export const DescriptionModule = () => {
|
||||
return (
|
||||
<HomepageModule title="Company Description">
|
||||
<div className="space-y-4 px-6">
|
||||
<div className="flex justify-between items-center pt-4">
|
||||
<div className="text-2xl">Apple Inc</div>
|
||||
<Image
|
||||
alt="apple"
|
||||
src={"/Apple_logo_white.svg.png"}
|
||||
width={40}
|
||||
height={40}
|
||||
/>
|
||||
</div>
|
||||
<div className="font-light text-justify">
|
||||
Apple Inc (Apple) designs, manufactures, and markets smartphones,
|
||||
tablets, personal computers, and wearable devices. The company offers
|
||||
software applications and related services, accessories, and
|
||||
third-party digital content. Apple's product portfolio includes
|
||||
iPhone, iPad, Mac, iPod, Apple Watch, and Apple TV. It also provides
|
||||
advertising services, payment services, cloud services, and various
|
||||
consumer and professional software applications such as iOS, macOS,
|
||||
iPadOS, watchOS, iCloud, AppleCare, and Apple Pay. Apple sells and
|
||||
delivers digital content and applications through the App Store, Apple
|
||||
Arcade, Apple News+, Apple Fitness+, Apple Card, Apple TV+, and Apple
|
||||
Music. The company's business operations span the Americas,
|
||||
Europe, the Middle East, Africa, and Asia-Pacific. Apple is
|
||||
headquartered in Cupertino, California, the US.
|
||||
</div>
|
||||
<div className="grid gap-x-6 gap-y-2 grid-cols-2 grid-rows-3 font-light">
|
||||
<div className="border-b border-neutral-700 flex justify-between">
|
||||
<div>Sector</div>
|
||||
<div>Technology</div>
|
||||
</div>
|
||||
<div className="border-b border-neutral-700 flex justify-between">
|
||||
<div>Website</div>
|
||||
<div>https://apple.com</div>
|
||||
</div>
|
||||
<div className="border-b border-neutral-700 flex justify-between">
|
||||
<div>Industry</div>
|
||||
<div>Consumer Electronics</div>
|
||||
</div>
|
||||
<div className="border-b border-neutral-700 flex justify-between">
|
||||
<div>Address</div>
|
||||
<div>One Apple Park Way, Cupertino, California, 95014</div>
|
||||
</div>
|
||||
<div className="border-b border-neutral-700 flex justify-between">
|
||||
<div>CEO</div>
|
||||
<div>Tim Cook</div>
|
||||
</div>
|
||||
<div className="border-b border-neutral-700 flex justify-between">
|
||||
<div>Employees</div>
|
||||
<div>161,000</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</HomepageModule>
|
||||
);
|
||||
};
|
||||
|
||||
export const KPIModule = () => {
|
||||
return (
|
||||
<HomepageModule title="KPIs">
|
||||
{/* <div className="flex justify-between h-full space-x-4 p-4">
|
||||
<div className="flex grow flex-col justify-between">
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Previous Close</div>
|
||||
<div>171.37</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Open</div>
|
||||
<div>171.86</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Bid</div>
|
||||
<div>172.28 x 100</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Ask</div>
|
||||
<div>172.45 x 100</div>
|
||||
</div>
|
||||
</div>
|
||||
<Separator orientation="vertical" />
|
||||
<div className="flex grow flex-col justify-between">
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>24hr Volume</div>
|
||||
<div>70,618,124</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Shares Outstanding</div>
|
||||
<div>15.44 B</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>PE Ratio (TTM)</div>
|
||||
<div>26.79</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>PE Ratio (TTM)</div>
|
||||
<div>26.79</div>
|
||||
</div>
|
||||
</div>
|
||||
<Separator orientation="vertical" />
|
||||
<div className="flex grow flex-col justify-between">
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Market Cap (B)</div>
|
||||
<div>$2,660</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Market Cap (B)</div>
|
||||
<div>$2,660</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Market Cap (B)</div>
|
||||
<div>$2,660</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Market Cap (B)</div>
|
||||
<div>$2,660</div>
|
||||
</div>
|
||||
</div>
|
||||
<Separator orientation="vertical" />
|
||||
<div className="flex grow flex-col justify-between">
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Market Cap (B)</div>
|
||||
<div>$2,660</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Market Cap (B)</div>
|
||||
<div>$2,660</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Market Cap (B)</div>
|
||||
<div>$2,660</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Market Cap (B)</div>
|
||||
<div>$2,660</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
<div className="grid grid-cols-4 grid-rows-4 gap-x-6 gap-y-3 p-4 pt-3 font-light">
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Previous Close</div>
|
||||
<div>171.37</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Day's Range</div>
|
||||
<div>170.06 - 173.05</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Market Cap (intraday)</div>
|
||||
<div>2.66T</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Earnings</div>
|
||||
<div>May 2 - May 6</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Open</div>
|
||||
<div>171.86</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>52 Week Range</div>
|
||||
<div>155.98 - 199.62</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Beta (5Y Monthly)</div>
|
||||
<div>1.29</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Forward Div and Yield</div>
|
||||
<div>0.96 (0.56%)</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Bid</div>
|
||||
<div>172.28 x 100</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Volume</div>
|
||||
<div>70,618,124</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>PE Ratio (TTM)</div>
|
||||
<div>26.79</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Ex-Dividend Date</div>
|
||||
<div>Feb 9</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Ask</div>
|
||||
<div>172.45 x 100</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Avg Volume</div>
|
||||
<div>60,438,506</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>EPS (TTM)</div>
|
||||
<div>6.43</div>
|
||||
</div>
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>1y Target Est</div>
|
||||
<div>201.28</div>
|
||||
</div>
|
||||
</div>
|
||||
</HomepageModule>
|
||||
);
|
||||
};
|
||||
|
||||
export const PeerComparisonModule = () => {
|
||||
const one: LineSeriesPartialOptionsWithData = {
|
||||
type: "line",
|
||||
data: seriesOne,
|
||||
color: globalColors.yellow,
|
||||
lineType: LineType.Curved,
|
||||
priceLineVisible: true,
|
||||
};
|
||||
const two: LineSeriesPartialOptionsWithData = {
|
||||
type: "line",
|
||||
data: seriesTwo,
|
||||
color: "#FF3CC7",
|
||||
lineType: LineType.Curved,
|
||||
priceLineVisible: true,
|
||||
};
|
||||
const three: LineSeriesPartialOptionsWithData = {
|
||||
type: "line",
|
||||
data: seriesThree,
|
||||
color: "#4062BB",
|
||||
lineType: LineType.Curved,
|
||||
priceLineVisible: true,
|
||||
};
|
||||
const four: LineSeriesPartialOptionsWithData = {
|
||||
type: "line",
|
||||
data: seriesFour,
|
||||
color: "#66CED6",
|
||||
lineType: LineType.Curved,
|
||||
priceLineVisible: true,
|
||||
};
|
||||
const five: LineSeriesPartialOptionsWithData = {
|
||||
type: "line",
|
||||
data: seriesFive,
|
||||
color: "#F1E4F3",
|
||||
lineType: LineType.Curved,
|
||||
priceLineVisible: true,
|
||||
};
|
||||
|
||||
return (
|
||||
<HomepageModule title="Peer Comparison">
|
||||
<div className="h-full">
|
||||
<Chart
|
||||
series={[one, two, three, four, five]}
|
||||
options={{
|
||||
grid: {
|
||||
horzLines: {
|
||||
visible: true,
|
||||
color: "#343434",
|
||||
},
|
||||
vertLines: {
|
||||
visible: true,
|
||||
color: "#343434",
|
||||
},
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</HomepageModule>
|
||||
);
|
||||
};
|
||||
|
||||
export const EarningsEventsModule = () => {
|
||||
return <HomepageModule title="Earnings Events"></HomepageModule>;
|
||||
};
|
||||
|
||||
export const AnalysisModule = () => {
|
||||
return <HomepageModule title="Analysis"></HomepageModule>;
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
"use client"
|
||||
|
||||
import * as React from "react"
|
||||
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const Separator = React.forwardRef<
|
||||
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
||||
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
||||
>(
|
||||
(
|
||||
{ className, orientation = "horizontal", decorative = true, ...props },
|
||||
ref
|
||||
) => (
|
||||
<SeparatorPrimitive.Root
|
||||
ref={ref}
|
||||
decorative={decorative}
|
||||
orientation={orientation}
|
||||
className={cn(
|
||||
"shrink-0 bg-border",
|
||||
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
)
|
||||
Separator.displayName = SeparatorPrimitive.Root.displayName
|
||||
|
||||
export { Separator }
|
||||
Reference in New Issue
Block a user