diff --git a/package.json b/package.json index 8ddb874..e389676 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "eslint": "^8", "eslint-config-next": "14.1.0", "postcss": "^8", + "prettier-plugin-tailwindcss": "^0.5.14", "tailwindcss": "^3.3.0", "typescript": "^5" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca4f7f2..29f8d59 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -88,6 +88,9 @@ devDependencies: postcss: specifier: ^8 version: 8.4.35 + prettier-plugin-tailwindcss: + specifier: ^0.5.14 + version: 0.5.14(prettier@3.2.5) tailwindcss: specifier: ^3.3.0 version: 3.4.1 @@ -2852,6 +2855,67 @@ packages: engines: {node: '>= 0.8.0'} dev: true + /prettier-plugin-tailwindcss@0.5.14(prettier@3.2.5): + resolution: {integrity: sha512-Puaz+wPUAhFp8Lo9HuciYKM2Y2XExESjeT+9NQoVFXZsPPnc9VYss2SpxdQ6vbatmt8/4+SN0oe0I1cPDABg9Q==} + engines: {node: '>=14.21.3'} + peerDependencies: + '@ianvs/prettier-plugin-sort-imports': '*' + '@prettier/plugin-pug': '*' + '@shopify/prettier-plugin-liquid': '*' + '@trivago/prettier-plugin-sort-imports': '*' + '@zackad/prettier-plugin-twig-melody': '*' + prettier: ^3.0 + prettier-plugin-astro: '*' + prettier-plugin-css-order: '*' + prettier-plugin-import-sort: '*' + prettier-plugin-jsdoc: '*' + prettier-plugin-marko: '*' + prettier-plugin-organize-attributes: '*' + prettier-plugin-organize-imports: '*' + prettier-plugin-sort-imports: '*' + prettier-plugin-style-order: '*' + prettier-plugin-svelte: '*' + peerDependenciesMeta: + '@ianvs/prettier-plugin-sort-imports': + optional: true + '@prettier/plugin-pug': + optional: true + '@shopify/prettier-plugin-liquid': + optional: true + '@trivago/prettier-plugin-sort-imports': + optional: true + '@zackad/prettier-plugin-twig-melody': + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-import-sort: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-marko: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-sort-imports: + optional: true + prettier-plugin-style-order: + optional: true + prettier-plugin-svelte: + optional: true + dependencies: + prettier: 3.2.5 + dev: true + + /prettier@3.2.5: + resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} + engines: {node: '>=14'} + hasBin: true + dev: true + /prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: diff --git a/src/components/modules/.prettierrc b/src/components/modules/.prettierrc new file mode 100644 index 0000000..c0231e9 --- /dev/null +++ b/src/components/modules/.prettierrc @@ -0,0 +1,5 @@ +{ + "tabWidth": 2, + "useTabs": true, + "plugins": ["prettier-plugin-tailwindcss"] +} diff --git a/src/components/modules/HomepageModuleCard.tsx b/src/components/modules/HomepageModuleCard.tsx index c20ef34..7b09169 100644 --- a/src/components/modules/HomepageModuleCard.tsx +++ b/src/components/modules/HomepageModuleCard.tsx @@ -9,13 +9,13 @@ interface HomepageModuleProps { const HomepageModule = ({ title, children }: HomepageModuleProps) => { return ( -
+
-
+
{title}
-
+
{children}
diff --git a/src/components/modules/HomepageModules.tsx b/src/components/modules/HomepageModules.tsx index 13e462a..533f608 100644 --- a/src/components/modules/HomepageModules.tsx +++ b/src/components/modules/HomepageModules.tsx @@ -107,38 +107,38 @@ export const MoversModule = () => { return (
-
+
Gainers
-
+
{winnerMovers.map((item) => (
{item.symbol}
-
+
{item.stockPrice}
-
+
+{item.percentChange}%
))}
-
+
Losers
-
+
{loserMovers.map((item) => (
{item.symbol}
-
+
{item.stockPrice}
-
+
{item.percentChange}%
@@ -177,18 +177,18 @@ export const MarketsModule = () => { return (
-
+
{markets.map((marketItem) => (
-
+
{marketItem.symbol}
-
-
+
+
{getLastPrice(marketItem.chart)}
{ getPriceDifference(marketItem.chart, 1) > 0 ? "text-green-500" : "text-red-500", - "text-sm w-10 text-right 2xl:w-12" + "w-10 text-right text-sm 2xl:w-12", )} > {getPriceDifference(marketItem.chart, 1)} @@ -215,7 +215,7 @@ export const MarketsModule = () => {
))}
-
+
S&P 500
{ return ( -
+
{ export const DescriptionModule = () => { return ( -
-
+
+
Apple Inc
apple { height={20} />
-
+
Apple Inc (Apple) designs, manufactures, and markets smartphones, tablets, personal computers, and wearable devices. The company offers software applications and related services, accessories, and @@ -68,28 +68,28 @@ export const DescriptionModule = () => { Arcade, Apple News+, Apple Fitness+, Apple Card, Apple TV+, and Apple Music.
-
-
+
+
Sector
Technology
-
+
Website
https://apple.com
-
+
Industry
Consumer Electronics
-
+
Address
One Apple Park Way, Cupertino, California, 95014
-
+
CEO
Tim Cook
-
+
Employees
161,000
@@ -179,7 +179,7 @@ export const KPIModule = () => {
*/} -
+
Previous Close
171.37