Skip to content
Open
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
88 changes: 88 additions & 0 deletions .idea/caches/deviceStreaming.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion app/(setting)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@ import SettinglView from "@/components/view/SettingView";
import { Entypo } from "@expo/vector-icons";
import { useRouter } from "expo-router";
import { Pressable, Text } from "react-native";
import { authService } from "../services/authService";

export default function SettingScreen() {
const router = useRouter();
const handleLogout = async () => {
try {
await authService.logout();
} catch (error) {
console.error("설정 화면에서 로그아웃 처리 중 에러:", error);
}
};
return (
<SettinglView>
<Pressable
Expand Down Expand Up @@ -36,7 +44,7 @@ export default function SettingScreen() {
<Entypo name="chevron-right" size={24} color="black" />
</Pressable>
<Pressable
onPress={() => router.push("/(auth)/login")}
onPress={handleLogout}
className="flex-row justify-between border-b border-[#B6B6B6] w-full py-6 px-4 active:bg-[#f0f0f0] active:opacity-80"
>
<Text className="font-bold text-lg">로그아웃</Text>
Expand Down
5 changes: 1 addition & 4 deletions app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ import { HapticTab } from "@/components/HapticTab";
import { IconSymbol } from "@/components/ui/IconSymbol";
import TabBarBackground from "@/components/ui/TabBarBackground";
import { Colors } from "@/constants/Colors";
import { useColorScheme } from "@/hooks/useColorScheme";
import { FontAwesome, MaterialCommunityIcons } from "@expo/vector-icons";

export default function TabLayout() {
const colorScheme = useColorScheme();

return (
<Tabs
screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? "light"].tint,
tabBarActiveTintColor: Colors.light.tint,
headerShown: false,
tabBarButton: HapticTab,
tabBarBackground: TabBarBackground,
Expand Down
10 changes: 2 additions & 8 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
DarkTheme,
DefaultTheme,
ThemeProvider,
} from "@react-navigation/native";
import { DefaultTheme, ThemeProvider } from "@react-navigation/native";
import { useFonts } from "expo-font";
import { SplashScreen, Stack } from "expo-router";
import { StatusBar } from "expo-status-bar";
Expand All @@ -11,7 +7,6 @@ import { GestureHandlerRootView } from "react-native-gesture-handler";
import "react-native-reanimated";

import "@/global.css";
import { useColorScheme } from "@/hooks/useColorScheme";
import { useEffect } from "react";
import { Text as RNText, TextInput as RNTextInput } from "react-native";
interface DefaultPropsCompat {
Expand All @@ -21,7 +16,6 @@ interface DefaultPropsCompat {
SplashScreen.preventAutoHideAsync();

export default function RootLayout() {
const colorScheme = useColorScheme();
const [loaded] = useFonts({
"Pretendard-Regular": require("../assets/fonts/Pretendard-Regular.ttf"),
"Pretendard-Bold": require("../assets/fonts/Pretendard-Bold.ttf"),
Expand Down Expand Up @@ -52,7 +46,7 @@ export default function RootLayout() {
}, [loaded]);

return (
<ThemeProvider value={colorScheme === "dark" ? DarkTheme : DefaultTheme}>
<ThemeProvider value={DefaultTheme}>
<GestureHandlerRootView style={{ flex: 1 }}>
<Stack
screenOptions={{
Expand Down
8 changes: 4 additions & 4 deletions app/apis/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ export function memberLoginByBody(body: LoginBody) {
idToken: body.idToken,
};

console.log("🔍 [API] 로그인 요청 시작:", payload);
console.log("🔍 [API] Base URL:", api.defaults.baseURL);

return api
.post<LoginResponse>("/api/v1/member/login", payload, {
headers: {
Expand All @@ -37,7 +34,10 @@ export function memberLoginByBody(body: LoginBody) {
throw error;
});
}

export function memberLogout() {
//로그아웃
return api.post("/api/v1/member/phone/logout");
}
export function getMemberData() {
//본인 정보 조회
return api.get<AuthMember>("/api/v1/member");
Expand Down
Loading