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

refactor: 잘못된 필터링을 수정하고 불필요한 출력문을 제거한다 #591

Merged
merged 4 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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 frontend/src/components/google-maps/map/CarFfeineMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const CarFfeineMapListener = () => {
const queryClient = useQueryClient();

const debouncedIdleHandler = debounce(() => {
console.log('idle (테스트용: 제거 예정)');
// console.log('idle (테스트용: 제거 예정)');
if (googleMap.getZoom() < INITIAL_ZOOM_SIZE) {
toastActions.showToast('지도를 조금만 더 확대해주세요', 'warning', 'bottom-center');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ const StationInformation = ({ station }: StationInformationProps) => {
{stationName}
</Text>
<Text variant="body" mb={1.5}>
{contact?.length > 0 || !address || address === 'null' ? '주소 미확인' : address}
{!address || address?.length === 0 ? '주소 미확인' : address}
</Text>
<Text variant="caption" mb={1}>
{contact?.length > 0 || !address || detailLocation === 'null'
? '상세주소 미확인'
: detailLocation}
{!detailLocation || detailLocation?.length === 0 ? '상세주소 미확인' : detailLocation}
</Text>
</Box>
<Divider />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ import { QUERY_KEY_STATION_CHARGER_REPORT } from '@constants/queryKeys';
const fetchStationChargerReport = (stationId: string) => {
const mode = serverStore.getState();
const memberToken = memberTokenStore.getState();
const headers =
memberToken === ''
? {
'Content-Type': 'application/json',
}
: {
Authorization: `Bearer ${memberToken}`,
'Content-Type': 'application/json',
};

return fetch(`${SERVERS[mode]}/stations/${stationId}/reports/me`, {
method: 'GET',
headers: {
Authorization: `Bearer ${memberToken}`,
'Content-Type': 'application/json',
},
headers: headers,
}).then<boolean>(async (response) => {
const data = await response.json();
return data.isReported;
Expand Down
Loading