Fakultas Ilmu Komputer UI

Commit d627b3ce authored by Bagus Prabowo's avatar Bagus Prabowo
Browse files

Refactor: Eslint Configuration Fix

parent 6a930499
import { useNavigation } from "@react-navigation/core";
import * as React from "react";
import { StyleSheet, Image } from "react-native";
import { Text, View } from "../../components/Themed";
......@@ -9,7 +8,6 @@ import { MaterialIcons } from "@expo/vector-icons";
import Layout from "../../constants/Layout";
const EcosystemDetailScreen = () => {
const nav = useNavigation();
return (
<View style={styles.container}>
<View style={styles.imageWrapper}>
......
import { useNavigation } from "@react-navigation/core";
import * as React from "react";
import { StyleSheet } from "react-native";
import { Text, View } from "../../components/Themed";
import Colors from "../../constants/Colors";
const EcosystemListScreen = () => {
const nav = useNavigation();
return (
<View style={styles.container}>
<View>
......
import { useNavigation } from "@react-navigation/core";
import * as React from "react";
import { StyleSheet } from "react-native";
import { View } from "../../components/Themed";
......@@ -7,7 +6,6 @@ import PlainButton from "../../components/button/PlainButton";
import Spacer from "../../components/Spacer/Spacer";
const EcosystemMapScreen = () => {
const nav = useNavigation();
return (
<View style={styles.container}>
<View style={styles.bodyWrapper}>
......
import { useNavigation } from "@react-navigation/core";
import * as React from "react";
import { StyleSheet } from "react-native";
import { Text, View } from "../../../components/Themed";
import Colors from "../../../constants/Colors";
const JoinedEcosystemScreen = () => {
const nav = useNavigation();
return (
<View style={styles.container}>
<View>
......
import { useNavigation } from "@react-navigation/core";
import * as React from "react";
import { StyleSheet } from "react-native";
import { Text, View } from "../../../components/Themed";
import Colors from "../../../constants/Colors";
const LatestEcosystemScreen = () => {
const nav = useNavigation();
return (
<View style={styles.container}>
<View>
......
import { useNavigation } from "@react-navigation/core";
import * as React from "react";
import { StyleSheet } from "react-native";
import { Text, View } from "../../../components/Themed";
import Colors from "../../../constants/Colors";
const MyEcosystemScreen = () => {
const nav = useNavigation();
return (
<View style={styles.container}>
<View>
......
import { useNavigation } from "@react-navigation/core";
import * as React from "react";
import { StyleSheet } from "react-native";
import { Text, View } from "../../../components/Themed";
import Colors from "../../../constants/Colors";
const PopularEcosystemScreen = () => {
const nav = useNavigation();
return (
<View style={styles.container}>
<View>
......
......@@ -15,6 +15,7 @@ import { IUser } from "../../types/firestore/User";
import { useAppDispatch, useAppSelector } from "../../hooks/reduxHooks";
export default function AccountSettingsScreen({
// eslint-disable-next-line @typescript-eslint/no-unused-vars
navigation,
}: RootTabScreenProps<"Profile">) {
const user: IUser = useAppSelector((state) => state.user);
......@@ -122,8 +123,9 @@ export default function AccountSettingsScreen({
<Spacer variant="xl" />
<View style={styles.componentWrapper}>
<Button
//TODO: Redirect yang bener
onPress={() => nav.navigate("ChangePassword")}
onPress={() =>
nav.navigate("Profile", { screen: "AccountSettings" })
}
title="Change Password"
/>
</View>
......
......@@ -12,6 +12,7 @@ import { changePassword } from "../../redux/user/actions";
import { ActionErrorRes } from "../../types/redux";
const ChangePasswordScreen = ({
// eslint-disable-next-line @typescript-eslint/no-unused-vars
navigation,
}: RootTabScreenProps<"Profile">) => {
const nav = useNavigation();
......
import { useNavigation } from "@react-navigation/core";
import * as React from "react";
import { useState } from "react";
import { StyleSheet, Image, TouchableOpacity } from "react-native";
import { Text, View } from "../../components/Themed";
......@@ -15,6 +14,7 @@ import { logoutUser } from "../../redux/user/actions";
import { IUser } from "../../types/firestore/User";
export default function ProfileScreen({
// eslint-disable-next-line @typescript-eslint/no-unused-vars
navigation,
}: RootTabScreenProps<"Profile">) {
const nav = useNavigation();
......@@ -50,7 +50,9 @@ export default function ProfileScreen({
</Title>
<Spacer variant={"xl"} />
<SmallButton
onPress={() => nav.navigate("AccountSettings")}
onPress={() =>
nav.navigate("Profile", { screen: "AccountSettings" })
}
text="Pengaturan Akun"
colors="primary"
/>
......
import { BottomTabScreenProps } from "@react-navigation/bottom-tabs";
import {
CompositeScreenProps,
NavigatorScreenParams,
} from "@react-navigation/native";
import { CompositeScreenProps } from "@react-navigation/native";
import { NativeStackScreenProps } from "@react-navigation/native-stack";
import { RootStackParamList } from ".";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment