Skip to content

Commit 5d5a95c

Browse files
macmac
mac
authored and
mac
committed
Change views to impressions with the icon
1 parent 156e171 commit 5d5a95c

File tree

5 files changed

+31
-5
lines changed

5 files changed

+31
-5
lines changed

app/tool/[slug]/page.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IconVote, IconChartBar, IconArrowTopRight, IconEye } from '@/components/Icons';
1+
import { IconVote, IconChartBar, IconArrowTopRight, IconFire } from '@/components/Icons';
22
import ButtonUpvote from '@/components/ui/ButtonUpvote';
33
import { Gallery, GalleryImage } from '@/components/ui/Gallery';
44
import LinkShiny from '@/components/ui/LinkShiny';
@@ -106,8 +106,8 @@ export default async function Page({ params: { slug } }: { params: { slug: strin
106106
},
107107
{
108108
count: product.views_count,
109-
icon: <IconEye />,
110-
label: 'Views',
109+
icon: <IconFire />,
110+
label: 'Impressions',
111111
},
112112
// TODO add calculation of rank in week and day
113113
{

components/Icons/IconFire.tsx

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import mergeTW from '@/utils/mergeTW';
2+
3+
export const IconFire = ({ className = '' }: { className?: string }) => (
4+
<svg
5+
xmlns="http://www.w3.org/2000/svg"
6+
fill="none"
7+
viewBox="0 0 24 24"
8+
strokeWidth={1.5}
9+
stroke="currentColor"
10+
className={mergeTW(`w-5 h-5 ${className}`)}
11+
>
12+
<path
13+
strokeLinecap="round"
14+
strokeLinejoin="round"
15+
d="M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z"
16+
/>
17+
<path
18+
strokeLinecap="round"
19+
strokeLinejoin="round"
20+
d="M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z"
21+
/>
22+
</svg>
23+
);

components/Icons/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ export * from './IconTrash';
1616
export * from './IconCalendar';
1717
export * from './IconEye';
1818
export * from './IconInformationCircle';
19+
export * from './IconFire';

components/ui/ToolCard/Tool.views.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default ({ className, count }: { className?: string; count: number }) =>
55
<span className="block flex-none w-1 h-1 bg-slate-500 rounded-full"></span>
66
<div className="flex items-center gap-x-1">
77
{count}
8-
<span>Views</span>
8+
<span>Impressions</span>
99
</div>
1010
</div>
1111
);

middleware.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export async function middleware(req: NextRequest): Promise<NextResponse> {
77
const res = NextResponse.next();
88
const supabase = createMiddlewareClient<Database>({ req, res });
99

10-
const { data: { session } } = await supabase.auth.getSession(); // destructure the data object to obtain the session object
10+
const {
11+
data: { session },
12+
} = await supabase.auth.getSession(); // destructure the data object to obtain the session object
1113
if (session === null) return NextResponse.redirect(new URL('/login', req.nextUrl));
1214
return res;
1315
}

0 commit comments

Comments
 (0)