diff --git a/package.json b/package.json index 4f27a72..8ddb874 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@nivo/calendar": "^0.85.0", "@nivo/line": "^0.84.0", "@nivo/treemap": "^0.84.0", + "@radix-ui/react-separator": "^1.0.3", "@radix-ui/react-slot": "^1.0.2", "@tanstack/react-table": "^8.13.2", "class-variance-authority": "^0.7.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 62cfd5b..ca4f7f2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ dependencies: '@nivo/treemap': specifier: ^0.84.0 version: 0.84.0(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-separator': + specifier: ^1.0.3 + version: 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.57)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-slot': specifier: ^1.0.2 version: 1.0.2(@types/react@18.2.57)(react@18.2.0) @@ -662,6 +665,48 @@ packages: react: 18.2.0 dev: false + /@radix-ui/react-primitive@1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.57)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.9 + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.57)(react@18.2.0) + '@types/react': 18.2.57 + '@types/react-dom': 18.2.19 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@radix-ui/react-separator@1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.57)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-itYmTy/kokS21aiV5+Z56MZB54KrhPgn6eHDKkFeOLR34HMN2s8PaN47qZZAGnvupcjxHaFZnW4pQEh0BvvVuw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.9 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.57)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.57 + '@types/react-dom': 18.2.19 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-slot@1.0.2(@types/react@18.2.57)(react@18.2.0): resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} peerDependencies: @@ -829,7 +874,6 @@ packages: resolution: {integrity: sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==} dependencies: '@types/react': 18.2.57 - dev: true /@types/react-lifecycles-compat@3.0.4: resolution: {integrity: sha512-1CM48Y9ztL5S4wjt7DK2izrkgPp/Ql0zCJu/vHzhgl7J+BD4UbSGjHN1M2TlePms472JvOazUtAO1/G3oFZqIQ==} diff --git a/public/Apple_logo_white.svg.png b/public/Apple_logo_white.svg.png new file mode 100644 index 0000000..dfe7d4c Binary files /dev/null and b/public/Apple_logo_white.svg.png differ diff --git a/public/apple-logo-transparent.png b/public/apple-logo-transparent.png new file mode 100644 index 0000000..c898f1b Binary files /dev/null and b/public/apple-logo-transparent.png differ diff --git a/src/app/symbol/[symbolId]/page.tsx b/src/app/symbol/[symbolId]/page.tsx index 22bc12b..563582b 100644 --- a/src/app/symbol/[symbolId]/page.tsx +++ b/src/app/symbol/[symbolId]/page.tsx @@ -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
hello!
; + return ( +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ ); }; export default page; diff --git a/src/components/modules/SymbolModules.tsx b/src/components/modules/SymbolModules.tsx new file mode 100644 index 0000000..90eb07a --- /dev/null +++ b/src/components/modules/SymbolModules.tsx @@ -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 ( + +
+ +
+
+ ); +}; + +export const DescriptionModule = () => { + return ( + +
+
+
Apple Inc
+ apple +
+
+ 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. +
+
+
+
Sector
+
Technology
+
+
+
Website
+
https://apple.com
+
+
+
Industry
+
Consumer Electronics
+
+
+
Address
+
One Apple Park Way, Cupertino, California, 95014
+
+
+
CEO
+
Tim Cook
+
+
+
Employees
+
161,000
+
+
+
+
+ ); +}; + +export const KPIModule = () => { + return ( + + {/*
+
+
+
Previous Close
+
171.37
+
+
+
Open
+
171.86
+
+
+
Bid
+
172.28 x 100
+
+
+
Ask
+
172.45 x 100
+
+
+ +
+
+
24hr Volume
+
70,618,124
+
+
+
Shares Outstanding
+
15.44 B
+
+
+
PE Ratio (TTM)
+
26.79
+
+
+
PE Ratio (TTM)
+
26.79
+
+
+ +
+
+
Market Cap (B)
+
$2,660
+
+
+
Market Cap (B)
+
$2,660
+
+
+
Market Cap (B)
+
$2,660
+
+
+
Market Cap (B)
+
$2,660
+
+
+ +
+
+
Market Cap (B)
+
$2,660
+
+
+
Market Cap (B)
+
$2,660
+
+
+
Market Cap (B)
+
$2,660
+
+
+
Market Cap (B)
+
$2,660
+
+
+
*/} +
+
+
Previous Close
+
171.37
+
+
+
Day's Range
+
170.06 - 173.05
+
+
+
Market Cap (intraday)
+
2.66T
+
+
+
Earnings
+
May 2 - May 6
+
+
+
Open
+
171.86
+
+
+
52 Week Range
+
155.98 - 199.62
+
+
+
Beta (5Y Monthly)
+
1.29
+
+
+
Forward Div and Yield
+
0.96 (0.56%)
+
+
+
Bid
+
172.28 x 100
+
+
+
Volume
+
70,618,124
+
+
+
PE Ratio (TTM)
+
26.79
+
+
+
Ex-Dividend Date
+
Feb 9
+
+
+
Ask
+
172.45 x 100
+
+
+
Avg Volume
+
60,438,506
+
+
+
EPS (TTM)
+
6.43
+
+
+
1y Target Est
+
201.28
+
+
+
+ ); +}; + +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 ( + +
+ +
+
+ ); +}; + +export const EarningsEventsModule = () => { + return ; +}; + +export const AnalysisModule = () => { + return ; +}; diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsx new file mode 100644 index 0000000..12d81c4 --- /dev/null +++ b/src/components/ui/separator.tsx @@ -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, + React.ComponentPropsWithoutRef +>( + ( + { className, orientation = "horizontal", decorative = true, ...props }, + ref + ) => ( + + ) +) +Separator.displayName = SeparatorPrimitive.Root.displayName + +export { Separator }