Skip to content

Commit

Permalink
refactor: base url 상수 값으로 관리하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ghdtjgus76 committed Aug 14, 2024
1 parent 29104ad commit 7821867
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import { baseUrl } from "constants/environment";
import Image from "next/image";
import { useRouter } from "next/navigation";
import { color } from "wowds-tokens";
Expand All @@ -9,11 +10,6 @@ const LoginButton = () => {
const router = useRouter();

const handleClickLogin = () => {
const baseUrl =
process.env.NODE_ENV === "production"
? process.env.NEXT_PUBLIC_PROD_BASE_URL
: process.env.NEXT_PUBLIC_DEV_BASE_URL;

router.push(`${baseUrl}/oauth2/authorization/github`);
};

Expand Down
4 changes: 4 additions & 0 deletions apps/client/constants/environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const baseUrl =
process.env.NODE_ENV === "production"
? process.env.NEXT_PUBLIC_PROD_BASE_URL
: process.env.NEXT_PUBLIC_DEV_BASE_URL;

0 comments on commit 7821867

Please sign in to comment.