Skip to content
Closed
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
3 changes: 3 additions & 0 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export default function RootLayout() {
<Stack.Screen name="auth" options={{ headerShown: false }} />
<Stack.Screen name="profile" options={{ headerShown: false }} />
<Stack.Screen name="home" options={{ headerShown: false }} />
{__DEV__ ? (
<Stack.Screen name="tabs" options={{ headerShown: false }} />
) : null}
<Stack.Screen name="ideal-recording" options={{ headerShown: false }} />
<Stack.Screen name="profile-detail" options={{ headerShown: false }} />
<Stack.Screen name="payment" options={{ headerShown: false }} />
Expand Down
5 changes: 5 additions & 0 deletions app/auth/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Redirect } from "expo-router";

export default function AuthIndex() {
return <Redirect href="/onboarding/splash" />;
}
8 changes: 7 additions & 1 deletion app/club/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ export default function ClubHomeScreen() {
</View>

<View style={styles.topTabs}>
<Text style={styles.inactiveTab}>홈</Text>
<Pressable
onPress={() => router.push("/home" as never)}
accessibilityRole="button"
hitSlop={10}
>
<Text style={styles.inactiveTab}>홈</Text>
</Pressable>
<View style={styles.activeTabWrap}>
<Text style={styles.activeTab}>동호회</Text>
<View style={styles.activeUnderline} />
Expand Down
5 changes: 4 additions & 1 deletion app/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ export default function HomePage() {
<HomeTabButton
label="동호회"
isActive={activeHomeTab === "club"}
onPress={() => setActiveHomeTab("club")}
onPress={() => {
setActiveHomeTab("club");
router.push("/club/home" as never);
}}
/>
</View>

Expand Down
22 changes: 20 additions & 2 deletions app/ideal-recording.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import React, { useState } from "react";
import { Pressable, StyleSheet } from "react-native";
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";

import ConfirmModal from "@/components/chat/ConfirmModal";
import MicRecorder from "@/components/MicRecorder";

export default function IdealRecordingPage() {
const router = useRouter();
const insets = useSafeAreaInsets();
const [isRecording, setIsRecording] = useState(false);
const [recordingTime, setRecordingTime] = useState(0);
const [showPaymentModal, setShowPaymentModal] = useState(false);

// 녹음 시간 관리
React.useEffect(() => {
Expand Down Expand Up @@ -38,11 +40,17 @@ export default function IdealRecordingPage() {

const handleSendPress = () => {
if (recordingTime > 0) {
Comment thread
anjaein marked this conversation as resolved.
console.log("녹음 전송:", recordingTime + "초");
handleCancelPress();
setIsRecording(false);
setShowPaymentModal(true);
}
};

const handlePaymentConfirm = () => {
setShowPaymentModal(false);
handleCancelPress();
router.push("/payment" as never);
};

const handleResetPress = () => {
setRecordingTime(0);
setIsRecording(false);
Expand Down Expand Up @@ -79,6 +87,16 @@ export default function IdealRecordingPage() {
onResetPress={handleResetPress}
containerStyle={styles.micRecorderContainer}
/>

<ConfirmModal
visible={showPaymentModal}
title="결제가 필요합니다"
subtitle="이상형 음성 분석을 이용하려면 결제 화면으로 이동해주세요."
cancelLabel="취소"
confirmLabel="결제하기"
onClose={() => setShowPaymentModal(false)}
onConfirm={handlePaymentConfirm}
/>
</SafeAreaView>
);
}
Expand Down
Loading
Loading