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
112 changes: 0 additions & 112 deletions app/(tabs)/_layout.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions app/(tabs)/explore.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions app/(tabs)/index.tsx.backup

This file was deleted.

165 changes: 0 additions & 165 deletions app/(tabs)/more.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SplashScreen.preventAutoHideAsync().catch(() => {
});

export const unstable_settings = {
anchor: '(tabs)',
anchor: 'index',
};

type BootstrapStatus = 'idle' | 'running' | 'success' | 'failed';
Expand Down Expand Up @@ -144,7 +144,7 @@ export default function RootLayout() {
<SubscribedClubsProvider refreshKey={subscribedClubsRefreshKey}>
<ThemeProvider value={DefaultTheme}>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen name="index" options={{ headerShown: false }} />
<Stack.Screen name="club/[id]" options={{ headerShown: false }} />
<Stack.Screen name="clubDetail/[id]" options={{ headerShown: false }} />
<Stack.Screen name="webview/[slug]" options={{ headerShown: false }} />
Expand Down
2 changes: 1 addition & 1 deletion app/(tabs)/index.tsx → app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HomeScreen } from '@/ui/home/home-screen';
import { HomeWebViewScreen } from '@/ui/home/home-webview-screen';
import React, { useState } from 'react';

export default function HomeTab() {
export default function Home() {
const [webViewFailed, setWebViewFailed] = useState(false);

if (webViewFailed) {
Expand Down
2 changes: 1 addition & 1 deletion app/webview/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import { ActivityIndicator, TouchableOpacity } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import { WebView } from "react-native-webview";
import styled from "styled-components/native";

Check warning on line 16 in app/webview/[slug].tsx

View workflow job for this annotation

GitHub Actions / android-check

Using exported name 'styled' as identifier for default import

const webviewUrl =
process.env.EXPO_PUBLIC_WEBVIEW_URL || "https://develop.moadong.com";
Expand Down Expand Up @@ -83,7 +83,7 @@
if (router.canGoBack()) {
router.back();
} else {
router.push("/(tabs)/more");
router.push("/");
}
};

Expand Down
2 changes: 1 addition & 1 deletion ui/club-detail/club-detail-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function ClubWebViewScreen() {
if (router.canGoBack()) {
router.back();
} else {
router.push("/(tabs)");
router.push("/");
}
};

Expand Down
8 changes: 8 additions & 0 deletions ui/home/home-webview-screen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useMixpanelContext } from '@/contexts';
import { useSubscribedClubsContext } from '@/contexts/subscribed-clubs-context';
import { appendSessionId, getWebViewUserAgent } from '@/utils/webview';
import Constants from 'expo-constants';
import { useRouter } from 'expo-router';
import * as WebBrowser from 'expo-web-browser';
import React, { useCallback, useEffect, useRef, useState } from 'react';
Expand Down Expand Up @@ -81,6 +82,13 @@ export function HomeWebViewScreen({ onError }: HomeWebViewScreenProps) {
case 'OPEN_EXTERNAL_URL':
await WebBrowser.openBrowserAsync(payload.url);
break;

case 'REQUEST_APP_VERSION':
sendMessage({
type: 'APP_VERSION',
payload: { version: Constants.expoConfig?.version ?? 'unknown' },
});
break;
}
} catch {
// 파싱 실패 무시
Expand Down
Loading
Loading