Skip to content

Commit d258ed6

Browse files
committed
style: 수락 버튼이 셀 안에서 수직 중앙 정렬되지 않는 문제 수정
1 parent 6b4d968 commit d258ed6

2 files changed

Lines changed: 22 additions & 8 deletions

File tree

front/src/redux/actions/riderAction.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export const getOrderData = () => async (dispatch: any) => {
2828
try {
2929
const res = await appAxios.get("/rider/getOrderData"); // 서버로 GET 요청
3030
if (res.data.success) {
31-
console.log("주문 데이터를 성공적으로 가져옴:", res.data.orders);
3231
return res.data.orders; // 주문 데이터를 반환
3332
} else {
3433
console.log("주문 데이터 없음:", res.data.message);

front/src/screens/delivery/SelectDeliveryComponents/DeliveryCustomList.tsx

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,21 @@ const DeliveryCustomList: React.FC<DeliveryCustomListProps> = ({
165165
{item.deliveryFee.toLocaleString()}
166166
</Text>
167167
</View>
168-
<View>
168+
<View
169+
style={{
170+
width: 80,
171+
alignItems: "center",
172+
justifyContent: "center",
173+
}}
174+
>
169175
<TouchableOpacity
170176
onPress={handleAcceptPress}
171177
style={[
172178
styles.acceptButton,
173179
trackingOrders[item._id] && styles.disabledButton,
174180
isEnded && styles.endedButton,
175181
isMyOrder && styles.disabledButton,
182+
{ width: "100%" },
176183
]}
177184
disabled={trackingOrders[item._id] || isEnded || isMyOrder}
178185
>
@@ -181,6 +188,7 @@ const DeliveryCustomList: React.FC<DeliveryCustomListProps> = ({
181188
styles.buttonText,
182189
isEnded && styles.endedButtonText,
183190
trackingOrders[item._id] && styles.disabledButtonText,
191+
{ textAlign: "center", width: "100%" },
184192
]}
185193
>
186194
{isEnded
@@ -192,11 +200,17 @@ const DeliveryCustomList: React.FC<DeliveryCustomListProps> = ({
192200
: "수락"}
193201
</Text>
194202
</TouchableOpacity>
195-
{isMyOrder && (
196-
<Text style={{ color: "#9CA3AF", fontSize: 12, marginTop: 4 }}>
197-
본인이 주문한 배달입니다
198-
</Text>
199-
)}
203+
<View
204+
style={{ height: isMyOrder ? 18 : 0, marginTop: isMyOrder ? 4 : 0 }}
205+
>
206+
{isMyOrder && (
207+
<Text
208+
style={{ color: "#9CA3AF", fontSize: 12, textAlign: "center" }}
209+
>
210+
본인이 주문한 배달입니다
211+
</Text>
212+
)}
213+
</View>
200214
</View>
201215
</View>
202216
);
@@ -390,7 +404,8 @@ const styles = StyleSheet.create({
390404
backgroundColor: "#2563EB",
391405
borderRadius: 8,
392406
paddingVertical: 8,
393-
paddingHorizontal: 12,
407+
paddingHorizontal: 10, // reduced from 12
408+
alignItems: "center", // ✅ added for Android support
394409
},
395410
disabledButton: {
396411
backgroundColor: "#9CA3AF",

0 commit comments

Comments
 (0)