Skip to content

Commit 7796683

Browse files
committed
2 parents c8b5554 + 9d5a179 commit 7796683

File tree

3 files changed

+33
-43
lines changed

3 files changed

+33
-43
lines changed

app/globals.css

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@
152152

153153
@layer components {
154154
.container {
155-
@apply px-4 sm:px-6 mx-auto max-w-[1440px];
155+
@apply px-4 sm:px-6 mx-auto max-w-360;
156156
}
157157

158158
.main-container {
159-
@apply py-6 md:py-12 mx-auto px-4 sm:px-6 max-w-[1440px] w-full space-y-6 md:space-y-6;
159+
@apply py-6 md:py-12 mx-auto px-4 sm:px-6 max-w-360 w-full space-y-6 md:space-y-6;
160160
}
161161

162162
.badge {
@@ -223,7 +223,7 @@
223223
}
224224

225225
.chart {
226-
@apply w-full min-h-[200px];
226+
@apply w-full min-h-50;
227227
}
228228
}
229229

@@ -439,7 +439,7 @@
439439
}
440440

441441
.chart {
442-
@apply h-[360px];
442+
@apply h-90;
443443
}
444444

445445
.chart-skeleton {
@@ -500,7 +500,7 @@
500500
}
501501

502502
#coin-details-page {
503-
@apply py-12 px-4 sm:px-6 mx-auto max-w-[1440px] size-full grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 items-center gap-6 xl:gap-10 justify-center;
503+
@apply py-12 px-4 sm:px-6 mx-auto max-w-360 size-full grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 items-center gap-6 xl:gap-10 justify-center;
504504

505505
.primary {
506506
@apply size-full xl:col-span-2;
@@ -533,7 +533,7 @@
533533
@apply font-medium h-full flex py-4 pr-5 space-x-2;
534534

535535
p {
536-
@apply truncate max-w-[100px] h-full;
536+
@apply truncate max-w-full h-full;
537537
}
538538
}
539539

@@ -572,7 +572,7 @@
572572
}
573573

574574
#coins-page {
575-
@apply py-12 px-4 sm:px-6 mx-auto max-w-[1440px] size-full items-center gap-10 justify-center;
575+
@apply py-12 px-4 sm:px-6 mx-auto max-w-360 size-full items-center gap-10 justify-center;
576576

577577
.content {
578578
@apply flex flex-col w-full space-y-5;
@@ -586,7 +586,7 @@
586586
@apply bg-dark-500 rounded-xl max-h-fit overflow-hidden;
587587

588588
.rank-cell {
589-
@apply pl-5 max-w-[80px]! py-5 font-medium text-purple-100;
589+
@apply pl-5 max-w-20! py-5 font-medium text-purple-100;
590590

591591
a {
592592
@apply absolute inset-0 z-10;
@@ -644,7 +644,7 @@
644644
}
645645

646646
.list {
647-
@apply bg-dark-500 max-h-[400px];
647+
@apply bg-dark-500 max-h-100;
648648
}
649649

650650
.empty {
@@ -744,7 +744,7 @@
744744
}
745745

746746
.select-content[data-converter] {
747-
@apply bg-dark-400 max-h-[500px];
747+
@apply bg-dark-400 max-h-125;
748748

749749
.select-item {
750750
@apply cursor-pointer hover:bg-dark-500!;
@@ -780,7 +780,7 @@
780780
@apply flex gap-3 items-center;
781781

782782
img {
783-
@apply size-[45px] sm:size-[50px] xl:size-[77px];
783+
@apply size-11.25 sm:size-12.5 xl:size-19.25;
784784
}
785785
}
786786

components/DataTable.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ export const DataTable = <T,>({
2727
<TableHead
2828
key={columnIndex}
2929
className={cn(
30-
'bg-dark-400 text-purple-100 py-4',
30+
'bg-dark-400 text-purple-100 py-4 first:pl-5 last:pr-5',
3131
headerCellClassName,
32-
column.headClassName,
33-
columnIndex === 0 && 'pl-5',
34-
columnIndex === columns.length - 1 && 'pr-5'
32+
column.headClassName
3533
)}
3634
>
3735
{column.header}
@@ -52,11 +50,9 @@ export const DataTable = <T,>({
5250
<TableCell
5351
key={columnIndex}
5452
className={cn(
55-
'py-4',
53+
'py-4 first:pl-5 last:pr-5',
5654
bodyCellClassName,
57-
column.cellClassName,
58-
columnIndex === 0 && 'pl-5',
59-
columnIndex === columns.length - 1 && 'pr-5'
55+
column.cellClassName
6056
)}
6157
>
6258
{column.cell(row, rowIndex)}

components/Header.tsx

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Image from 'next/image';
44
import Link from 'next/link';
55
import { usePathname } from 'next/navigation';
66
import { cn } from '@/lib/utils';
7-
import { navItems } from '@/lib/constants';
87
import { SearchModal } from './SearchModal';
98

109
export const Header = ({ trendingCoins = [] }: HeaderProps) => {
@@ -23,31 +22,26 @@ export const Header = ({ trendingCoins = [] }: HeaderProps) => {
2322
</Link>
2423

2524
<nav>
26-
{navItems.map((item) => {
27-
const isActive = pathname === item.href;
25+
<Link
26+
href='/'
27+
className={cn('nav-link', {
28+
'is-active': pathname === '/',
29+
'is-home': true,
30+
})}
31+
>
32+
Home
33+
</Link>
2834

29-
if (item.label === 'Search') {
30-
return (
31-
<SearchModal
32-
key={item.label}
33-
initialTrendingCoins={trendingCoins}
34-
/>
35-
);
36-
}
35+
<SearchModal initialTrendingCoins={trendingCoins} />
3736

38-
return (
39-
<Link
40-
key={item.label}
41-
href={item.href}
42-
className={cn('nav-link', {
43-
'is-active': isActive,
44-
'is-home': item.label === 'Home',
45-
})}
46-
>
47-
{item.label}
48-
</Link>
49-
);
50-
})}
37+
<Link
38+
href='/coins'
39+
className={cn('nav-link', {
40+
'is-active': pathname === '/coins',
41+
})}
42+
>
43+
All Coins
44+
</Link>
5145
</nav>
5246
</div>
5347
</header>

0 commit comments

Comments
 (0)