Skip to content

Commit

Permalink
get hostname from .env
Browse files Browse the repository at this point in the history
  • Loading branch information
myuto7 committed Dec 16, 2022
1 parent ca9c578 commit 41f35df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
NEXT_PUBLIC_SPOTIFY_API_CLIENT_ID=
NEXT_PUBLIC_SPOTIFY_API_CLIENT_SECRET=
NEXT_PUBLIC_BACKEND_API_KEY=
HOSTNAME=
2 changes: 1 addition & 1 deletion src/common/LinkShare.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { styled } from "../stitches.config";

export const LinkShare: React.FC = () => {
const router = useRouter();
const hostName = "https://hacku-kosen-2022-frontend.vercel.app";
const hostName = process.env.HOSTNAME;
const url = `${hostName}${router.asPath}`;
const copyLink = () => {
navigator.clipboard.writeText(url);
Expand Down

0 comments on commit 41f35df

Please sign in to comment.