-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from UPbrella/develop
deploy
Showing
99 changed files
with
2,375 additions
and
687 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { $axios } from "@/lib/axios"; | ||
import { TApiResponse } from "@/types/commonTypes"; | ||
import { TConditionRes, TImprovementRes } from "@/types/admin/FeedBackTypes"; | ||
|
||
const API = { | ||
HISTORIES_STATUS: () => `/admin/rent/histories/status`, | ||
HISTORIES_IMPROVEMENTS: () => `/admin/rent/histories/improvements`, | ||
} as const; | ||
|
||
// 신고 내역 조회 | ||
export const getHistoriesStatus = async () => { | ||
const res = await $axios.get<TApiResponse<TConditionRes>>(API.HISTORIES_STATUS(), { | ||
withCredentials: true, | ||
}); | ||
return res.data; | ||
}; | ||
|
||
// 개선 요청 내역 조회 | ||
export const getHistoriesImprovements = async () => { | ||
const res = await $axios.get<TApiResponse<TImprovementRes>>(API.HISTORIES_IMPROVEMENTS(), { | ||
withCredentials: true, | ||
}); | ||
return res.data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export type TButtonProps = { | ||
isActive: boolean; | ||
}; | ||
|
||
const Button = ({ isActive }: TButtonProps) => { | ||
return ( | ||
<div> | ||
<button | ||
type="submit" | ||
className={`w-full h-48 bg-primary-500 rounded-8 text-white text-16 leading-24 font-semibold ${ | ||
isActive ? "" : "opacity-50 cursor-not-allowed" | ||
}`} | ||
disabled={!isActive} | ||
> | ||
문의하기 | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
export type ContactInputProps = { | ||
label: string; | ||
optional?: boolean; | ||
placeholder: string; | ||
setValue: (value: string) => void; | ||
name: string; | ||
value?: string; | ||
}; | ||
|
||
const Input = ({ label, optional, placeholder, setValue, name, value }: ContactInputProps) => { | ||
return ( | ||
<div className="flex flex-col p-5 mb-32 w-full"> | ||
<div className="flex items-center"> | ||
<div className="flex items-center mb-4 text-gray-700 text-15 leading-22 mr-4">{label}</div> | ||
{optional && <div className="text-13 leading-16 text-gray-500">(선택)</div>} | ||
</div> | ||
<input | ||
className="w-full h-48 mt-4 rounded-8 p-12 gap-2.5 text-15 text-black leading-22 placeholder-gray-300 border border-gray-300 focus:border-black focus:outline-none" | ||
placeholder={placeholder} | ||
onChange={(e) => setValue(e.target.value)} | ||
name={name} | ||
value={value} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from "react"; | ||
|
||
const Instagram = () => { | ||
return ( | ||
<div className="max-w-314 w-full h-184 flex flex-col justify-between items-start py-24 px-20 border border-gray-200 rounded-12 bg-white lg:px-20 sm:px-0"> | ||
<div className="text-16 leading-24 text-gray-700"> | ||
업브렐라 이용 안내 관련 및 급한 문의는 | ||
<br /> | ||
업브렐라 인스타그램 계정으로 부탁드려요! | ||
</div> | ||
<a | ||
className=" bg-primary-200 rounded-8 px-20 py-12 font-semibold text-16 leading-24 text-primary-500" | ||
href="https://www.instagram.com/direct/t/17846148278607764" | ||
> | ||
업브렐라 DM으로 문의하기 | ||
</a> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Instagram; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { useRef, useEffect, useState, ChangeEvent } from "react"; | ||
|
||
export type TextAreaProps = { | ||
label: string; | ||
placeholder: string; | ||
setValue: (value: string) => void; | ||
name: string; | ||
value: string; | ||
}; | ||
|
||
const TextArea = ({ label, placeholder, setValue, name, value }: TextAreaProps) => { | ||
const textareaRef = useRef<HTMLTextAreaElement>(null); | ||
const [isWriting, setIsWriting] = useState(false); | ||
|
||
useEffect(() => { | ||
// 컴포넌트가 마운트될 때마다 textarea의 높이를 자동으로 설정 | ||
if (textareaRef.current) { | ||
textareaRef.current.style.height = "auto"; | ||
textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`; | ||
} | ||
}, []); | ||
|
||
const handleTextareaChange = (event: ChangeEvent<HTMLTextAreaElement>) => { | ||
// textarea의 내용이 변경될 때마다 높이를 자동으로 조정 | ||
if (textareaRef.current) { | ||
textareaRef.current.style.height = "auto"; // text를 추가할 때 높이 조정 | ||
textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`; // text를 지웠을 때 높이 조정 | ||
} | ||
|
||
const { value } = event.target; | ||
setIsWriting(Boolean(value)); | ||
setValue(event.target.value); | ||
}; | ||
|
||
const borderColor = isWriting ? "gray-600" : "gray-300"; | ||
const textColor = isWriting ? "black" : "gray-400"; | ||
|
||
return ( | ||
<div className="flex-col p-5 mb-32"> | ||
<div className="flex items-center mb-4 text-gray-700 text-15 leading-22 font-normal"> | ||
{label} | ||
</div> | ||
<textarea | ||
ref={textareaRef} | ||
onChange={handleTextareaChange} | ||
rows={3} | ||
className={`w-full mt-4 rounded-8 border border-${borderColor} p-10 text-15 text-${textColor} leading-22 placeholder-gray-300 resize-none overflow-hidden focus:border-gray-600 focus:outline-none`} | ||
placeholder={placeholder} | ||
spellCheck={false} | ||
name={name} | ||
value={value} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TextArea; |
Oops, something went wrong.