Skip to content

Commit

Permalink
refactor: env => url constants
Browse files Browse the repository at this point in the history
  • Loading branch information
KimCookieYa committed Jun 30, 2024
1 parent 5f8b17a commit a56e42b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .env

This file was deleted.

3 changes: 2 additions & 1 deletion src/components/sugang/SugangHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Link from "next/link";
import TitleLogo from "../TitleLogo";
import { usePathname } from "next/navigation";
import { SlStar } from "react-icons/sl";
import {URL_DATA} from '@/constants/url';

export default function SugangHeader() {
const pathname = usePathname();
Expand Down Expand Up @@ -45,7 +46,7 @@ export default function SugangHeader() {
</ul>
</nav>
<div className="ml-auto overflow-hidden w-500 relative animate-sparkling">
<a href={process.env.NEXT_PUBLIC_MAILBADARA_URL} target="_blank">
<a href={URL_DATA.APP_URL} target="_blank">
<p className="animate-slide-infinite text-white text-nowrap font-mono flex items-center gap-x-2">
<SlStar />
학과 홈페이지 소식을 뉴스레터로! MailBadara 구독 ㄱㄱ!
Expand Down
7 changes: 5 additions & 2 deletions src/datas/notice-data.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import {MY_DATA} from '@/constants/url';


export const noticeData = [
{
title: "수강신청 안내",
Expand All @@ -18,8 +21,8 @@ export const noticeData = [
title: "기타",
content: [
"제일 위에 '희망과목담기' 탭에서 담은 교과목은 '수강신청' 탭에서 확인하실 수 있습니다.",
`버그나 건의사항은 제 이메일(${process.env.NEXT_PUBLIC_MY_EMAIL})로 연락주시면 감사하겠습니다:)`,
`개발 코드가 궁금하신 분은 레포(${process.env.NEXT_PUBLIC_GITHUB_REPO})를 참고해주시길 바랍니다!`,
`버그나 건의사항은 제 이메일(${MY_DATA.MY_EMAIL})로 연락주시면 감사하겠습니다:)`,
`개발 코드가 궁금하신 분은 레포(${MY_DATA.GITHUB_REPO})를 참고해주시길 바랍니다!`,
],
},
];
3 changes: 2 additions & 1 deletion src/utils/excel.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { ExcelSubjectType, SubjectType } from "@/types/subject";
import axios from "axios";
import * as XLSX from "xlsx";
import {URL_DATA} from '@/constants/url';

const DEFAULT_URL = process.env.NEXT_PUBLIC_DEFAULT_URL;
const DEFAULT_URL = URL_DATA.DEFAULT_URL

async function fetchExcelFile(url: string) {
console.log(DEFAULT_URL);
Expand Down

0 comments on commit a56e42b

Please sign in to comment.