Skip to content

Commit 3f188a0

Browse files
authored
Merge pull request #287 from boostcampwm-2024/dev-front
[FE] Merge to main
2 parents 61515e1 + bb67b75 commit 3f188a0

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

frontend/src/component/organism/ProjectTrafficChart.tsx

+10-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import DataLayout from '@component/template/DataLayout';
44
import { DATE_OPTIONS } from '@constant/Date';
55
import useProjectTraffic from '@hook/api/useProjectTraffic';
66
import { DateType } from '@type/Date';
7+
import { Link } from 'lucide-react';
78
import { useState } from 'react';
89

910
type Props = {
@@ -134,10 +135,15 @@ export default function ProjectTrafficChart({ id }: Props) {
134135
<DataLayout cssOption='flex flex-col p-[8px] rounded-lg shadow-md w-full h-full'>
135136
<div className='mb-[8px] flex items-center justify-between'>
136137
<div className='flex-1 items-center pl-12 pt-2 text-xl text-gray'>Total: {data.total}</div>
137-
<div className='text-navy items-center text-center text-xl'>
138-
<span className='mr-2 text-2xl font-bold'>{data.projectName}</span>
139-
Traffic Chart
140-
</div>
138+
<a
139+
className='mr-2 inline-flex items-center gap-1 text-2xl font-bold hover:text-blue'
140+
href={`http://${data.domain}`}
141+
target='_blank'
142+
rel='noreferrer'>
143+
<Link className='h-5 w-5' />
144+
{data.projectName}
145+
</a>
146+
<div className='flex justify-center'>Traffic Chart</div>
141147
<div className='flex flex-1 justify-end p-4'>
142148
<Select
143149
cssOption='p-2 border rounded'

frontend/src/type/api.ts

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type ProjectDAU = {
5252
type ProjectTraffic = {
5353
projectName: string;
5454
timeRange: string;
55+
domain: string;
5556
total: number;
5657
trafficData: {
5758
timestamp: string;

0 commit comments

Comments
 (0)