Skip to content

Commit

Permalink
refactor: 잘못된 필터링을 수정하고 UX을 개선한다 (#591)
Browse files Browse the repository at this point in the history
* fix: 잘못된 필터링 제거

[#588]

* refactor: 불필요한 출력문 제거

[#588]

* refactor: 비로그인자의 토큰 전달 시도를 막도록 하는 기능 구현

[#588]

* refactor: 충전기 혼잡도 그룹 순서 변경

[#588]
  • Loading branch information
gabrielyoon7 authored Aug 17, 2023
1 parent 9b0570e commit 46e4137
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
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 @@ -38,20 +38,20 @@ const CongestionStatistics = ({ stationId }: CongestionStatisticsProps) => {
/>
<FlexBox nowrap>
<ButtonNext
variant={chargingSpeed === 'quick' ? 'contained' : 'outlined'}
variant={chargingSpeed === 'standard' ? 'contained' : 'outlined'}
size="xs"
onClick={() => setChargingSpeed('quick')}
onClick={() => setChargingSpeed('standard')}
fullWidth
>
급속 충전기 그룹
완속 충전기 그룹
</ButtonNext>
<ButtonNext
variant={chargingSpeed === 'standard' ? 'contained' : 'outlined'}
variant={chargingSpeed === 'quick' ? 'contained' : 'outlined'}
size="xs"
onClick={() => setChargingSpeed('standard')}
onClick={() => setChargingSpeed('quick')}
fullWidth
>
완속 충전기 그룹
급속 충전기 그룹
</ButtonNext>
</FlexBox>
</FlexBox>
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

0 comments on commit 46e4137

Please sign in to comment.