Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: env react 규칙 #33

Merged
merged 1 commit into from
Nov 4, 2022
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
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PUBLIC_URL=/tempfiles-frontend
BACKEND_BASEURL= https://tfb.minpeter.cf
REACT_APP_BACKEND_BASEURL= https://tfb.minpeter.cf
2 changes: 1 addition & 1 deletion src/pages/api/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const ApiPage: React.FC = () => {
const getApiInfo = async () => {
await axios({
method: 'get',
url: `${process.env.BACKEND_BASEURL}/info`,
url: `${process.env.REACT_APP_BACKEND_BASEURL}/info`,
})
.then((res) => {
setApiInfo(res.data);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/delete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const DeletePage: React.FC = () => {
const deleteFile = async () => {
await axios({
method: 'delete',
url: `${process.env.BACKEND_BASEURL}/del/${DeleteFileName}`,
url: `${process.env.REACT_APP_BACKEND_BASEURL}/del/${DeleteFileName}`,
})
.then((res) => {
console.log(res);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/download/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const DownloadPage: React.FC = () => {
{year}-{month}-{day}
</S.DonwloadFileBox>
<S.DownloadPageButtonSection>
<a href={`${process.env.BACKEND_BASEURL}/dl/${downloadFileProps.Name}`}>
<a href={`${process.env.REACT_APP_BACKEND_BASEURL}/dl/${downloadFileProps.Name}`}>
<Button click={() => {}} bgColor="var(--color-button-primary)" label="다운로드" />
</a>
<Button
Expand Down
2 changes: 1 addition & 1 deletion src/pages/filelist/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const FileListPage: React.FC = () => {
const getFileList = async () => {
await axios({
method: 'get',
url: `${process.env.BACKEND_BASEURL}/list`,
url: `${process.env.REACT_APP_BACKEND_BASEURL}/list`,
})
.then((res) => {
setFileList(res.data.list); //파일리스트 요소 갯수에 따른 핸들링 추가예정
Expand Down
2 changes: 1 addition & 1 deletion src/pages/main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const MainPage: React.FC = () => {
formdata.append('file', fileProps.fileData);
await axios({
method: 'post',
url: `${process.env.BACKEND_BASEURL}/upload${
url: `${process.env.REACT_APP_BACKEND_BASEURL}/upload${
passwordBoolean && password != '' && password != undefined ? `?pw=${password}` : ''
}`,
data: formdata,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/postApi/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ApiPostPage: React.FC = () => {
const getUrlApiInfo = async () => {
await axios({
method: 'get',
url: `${process.env.BACKEND_BASEURL}/info?api=${urlApi}`,
url: `${process.env.REACT_APP_BACKEND_BASEURL}/info?api=${urlApi}`,
})
.then((res) => {
if (res.data?.message === 'invalid api name') {
Expand Down