-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/navigation bar #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1,55 @@ | ||
| import { Icon } from "@/shared/ui/icon"; | ||
| import { DefaultNavigationOptions } from "@/shared/ui/navigation"; | ||
| import { Tabs } from "expo-router"; | ||
| import { useMemo } from "react"; | ||
| import { SafeAreaView } from "react-native-safe-area-context"; | ||
|
|
||
| export default function TabsLayout() { | ||
| return ( | ||
| <Tabs | ||
| screenOptions={{ | ||
| headerShown: false, | ||
| }} | ||
| > | ||
| <Tabs.Screen | ||
| name="home" | ||
| options={{ | ||
| title: "홈", | ||
| }} | ||
| /> | ||
|
|
||
| <Tabs.Screen | ||
| name="archive" | ||
| options={{ | ||
| title: "아카이브", | ||
| }} | ||
| /> | ||
|
|
||
| <Tabs.Screen | ||
| name="upload" | ||
| options={{ | ||
| title: "업로드", | ||
| }} | ||
| /> | ||
| export default function TabLayout() { | ||
| const screenOptions = useMemo(() => { | ||
| return { | ||
| ...DefaultNavigationOptions, | ||
| }; | ||
| }, []); | ||
|
|
||
| <Tabs.Screen | ||
| name="awards" | ||
| options={{ | ||
| title: "우수작", | ||
| }} | ||
| /> | ||
|
|
||
| <Tabs.Screen | ||
| name="profile" | ||
| options={{ | ||
| title: "마이", | ||
| }} | ||
| /> | ||
| </Tabs> | ||
| return ( | ||
| <SafeAreaView edges={["top"]} style={{ flex: 1 }}> | ||
| <Tabs screenOptions={screenOptions}> | ||
| <Tabs.Screen | ||
| name="home" | ||
| options={{ | ||
| title: "홈", | ||
| tabBarIcon: ({ focused }) => <Icon name={focused ? "home_active" : "home"} />, | ||
| }} | ||
| /> | ||
| <Tabs.Screen | ||
| name="archive" | ||
| options={{ | ||
| title: "아카이빙", | ||
| tabBarIcon: ({ focused }) => <Icon name={focused ? "archiving_active" : "archiving"} />, | ||
| }} | ||
| /> | ||
| <Tabs.Screen | ||
| name="upload" | ||
| options={{ | ||
| title: "업로드", | ||
| tabBarIcon: ({ focused }) => <Icon name={focused ? "uploading_active" : "uploading"} />, | ||
| }} | ||
| /> | ||
| <Tabs.Screen | ||
| name="awards" | ||
| options={{ | ||
| title: "우수작", | ||
| tabBarIcon: ({ focused }) => <Icon name={focused ? "ranking_active" : "ranking"} />, | ||
| }} | ||
| /> | ||
| <Tabs.Screen | ||
| name="profile" | ||
| options={{ | ||
| title: "마이", | ||
| tabBarIcon: ({ focused }) => <Icon name={focused ? "my_active" : "my"} />, | ||
| }} | ||
| /> | ||
| </Tabs> | ||
| </SafeAreaView> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,19 @@ | ||
| const { getDefaultConfig } = require("expo/metro-config"); | ||
|
|
||
| /** @type {import('expo/metro-config').MetroConfig} */ | ||
| const config = getDefaultConfig(__dirname); | ||
| config.resolver.sourceExts.push("css"); | ||
| config.resolver.assetExts.push("png", "jpg", "jpeg", "gif", "svg"); | ||
| module.exports = (() => { | ||
| const config = getDefaultConfig(__dirname); | ||
|
|
||
| module.exports = config; | ||
| const { transformer, resolver } = config; | ||
|
|
||
| config.transformer = { | ||
| ...transformer, | ||
| babelTransformerPath: require.resolve("react-native-svg-transformer/expo"), | ||
| }; | ||
| config.resolver = { | ||
| ...resolver, | ||
| assetExts: resolver.assetExts.filter(ext => ext !== "svg"), | ||
| sourceExts: [...resolver.sourceExts, "svg"], | ||
| }; | ||
|
|
||
| return config; | ||
| })(); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
SVG 변환기 패키지 의존성을 확인하세요.
react-native-svg-transformer/expo를 사용하고 있으므로 이 패키지가 package.json에 올바르게 설치되어 있는지 확인해야 합니다.다음 스크립트를 실행하여 패키지 설치 상태를 확인하세요:
🏁 Script executed:
Length of output: 566
SVG 변환기 패키지 설치 필요
package.json에는react-native-svg-transformer가 선언되어 있으나, 현재node_modules에 설치되어 있지 않습니다.npm install또는yarn install을 실행해 의존성을 설치해주세요.babelTransformerPath: require.resolve("react-native-svg-transformer/expo")가 정상 동작하는지 확인 바랍니다.🤖 Prompt for AI Agents