Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY_DEV }}
port: ${{ secrets.SSH_PORT }}
debug: true
timeout: 60s
script: |
sudo docker rm -f $(docker ps -qa) || true
sudo docker pull ${{ secrets.DOCKER_REPO }}/clubber-front-dev
Expand All @@ -73,8 +75,10 @@ jobs:
with:
host: ${{ secrets.HOST_PROD }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY_RELEASE }}
key: ${{ secrets.SSH_KEY_PROD }}
port: ${{ secrets.SSH_PORT }}
debug: true
timeout: 60s
script: |
sudo docker rm -f $(docker ps -qa) || true
sudo docker pull ${{ secrets.DOCKER_REPO }}/clubber-front-prod
Expand Down
2 changes: 2 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Geist, Geist_Mono } from 'next/font/google';
import './globals.css';
import Header from '@/components/layouts/Header';
import Footer from '@/components/layouts/Footer';
import GoogleAnalytics from '@/components/common/GoogleAnalytics';

const geistSans = Geist({
variable: '--font-geist-sans',
Expand All @@ -27,6 +28,7 @@ export default function RootLayout({
return (
<html lang="en">
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
{process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS && <GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS}/>}
<div className="flex min-h-screen flex-col md:max-w-6xl md:mx-auto">
<Header />
{/* Main 영역 -> flex-1 : 헤더와 푸터는 설정한 영역대로, 나머지 영역은 메인영역으로 */}
Expand Down
31 changes: 31 additions & 0 deletions src/components/common/GoogleAnalytics.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
'use client';

import Script from 'next/script';



export default function GoogleAnalytics({gaId}: {gaId: string}) {
return (
<>
<Script
strategy="afterInteractive"
src={`https://www.googletagmanager.com/gtag/js?id=${gaId}`}
/>
<Script
id="google-analytics"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${gaId}', {
page_title: document.title,
page_location: window.location.href,
});
`,
}}
/>
</>
);
}
3 changes: 2 additions & 1 deletion src/components/features/login/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export default function SignUp() {
setAccessToken(localStorage.getItem('accessToken') || '');
// localStorage 관련 작업 수행
}

}, []);

//
Expand Down Expand Up @@ -124,7 +125,7 @@ export default function SignUp() {
});

if (res.data.success) {
setTotalModalMessage('회원가입을 완료하였습니다.');
setTotalModalMessage(`회원가입이 완료되었습니다.\n 관리자 승인 이후 입력하신 연락수단을 통해 연락드리겠습니다. 감사합니다.`);
setIsTotalModalOpen(true);
setCollege('');
setDepartment('');
Expand Down
12 changes: 3 additions & 9 deletions src/components/features/main/MainRanking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function MainRanking() {
const [rank, setRank] = useState<RankData[]>([]);

useEffect(() => {
// fetchData();
fetchData();
}, []);

const fetchData = async () => {
Expand All @@ -30,13 +30,7 @@ export default function MainRanking() {
<h2 className="font-bold text-[16px] md:text-lg py-3 mt-2 pr-8">조회수</h2>

<Card>
<div className='text-center text-lg font-bold text-gray-500 h-[152px] flex flex-col items-center justify-center'>

D-1 <br/> 조회수 TOP 10 랭킹 공개!<br/>
<p className='text-sm text-primary'> COMING SOON!</p>
</div>

{/* <div className="grid grid-cols-2 px-7 font-medium text-sm pb-1 cursor-pointer gap-6">
<div className="grid grid-cols-2 px-7 font-medium text-sm pb-1 cursor-pointer gap-6">
<div className="space-y-3">
{rank.slice(0, 5).map((club, idx) => (
<p
Expand All @@ -59,7 +53,7 @@ export default function MainRanking() {
</p>
))}
</div>
</div> */}
</div>
</Card>
</>
);
Expand Down