Skip to content

Commit

Permalink
cleanup: imports and formatting (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
natesawant authored Nov 18, 2024
1 parent fd32a5a commit 46e33f1
Show file tree
Hide file tree
Showing 15 changed files with 58 additions and 68 deletions.
18 changes: 9 additions & 9 deletions frontend/app/(app)/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import React from 'react';
import Home from '../../../assets/house.svg';
import Search from '../../../assets/search.svg';
import Plus from '../../../assets/plus.svg';
import Star from '../../../assets/Star.svg';
import Profile from '../../../assets/profile.svg';
import {
faCircleUser,
faHouse,
faPlusSquare,
faSearch,
faStar,
faCircleUser,
faPlusSquare,
} from '@fortawesome/free-solid-svg-icons';
import { Tabs } from 'expo-router';
import React from 'react';
import { SafeAreaView, Text } from 'react-native';
import Home from '../../../assets/house.svg';
import Plus from '../../../assets/plus.svg';
import Profile from '../../../assets/profile.svg';
import Search from '../../../assets/search.svg';
import Star from '../../../assets/Star.svg';
import IconButton from '../../../components/icon-button';
import { Text, SafeAreaView } from 'react-native';

const Layout = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/(app)/(tabs)/explore.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { View, Text } from 'react-native';
import { Text, View } from 'react-native';

const Explore = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/(app)/(tabs)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { View, Text } from 'react-native';
import { router } from 'expo-router';
import { Text, View } from 'react-native';
import { useAuthStore } from '../../../auth/authStore';
import Button from '../../../components/button';

Expand Down
15 changes: 7 additions & 8 deletions frontend/app/(app)/(tabs)/notification.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { useState, useEffect } from 'react';
import { SafeAreaView, SectionList, FlatList, Text, View } from 'react-native';
import { useAuthStore } from '../../../auth/authStore';
import { categorizeTime } from '../../../utils/profile';
import { useUserNotification } from '../../../hooks/user';
import { useFocusEffect } from 'expo-router';
import React from 'react';
import NotificationSkeleton from '../../../components/notification/skeleton';
import NotificationEntry from '../../../components/notification/notification';
import React, { useEffect, useState } from 'react';
import { FlatList, SafeAreaView, SectionList, Text, View } from 'react-native';
import { useAuthStore } from '../../../auth/authStore';
import Divider from '../../../components/divider';
import NotificationEntry from '../../../components/notification/notification';
import NotificationSkeleton from '../../../components/notification/skeleton';
import { useUserNotification } from '../../../hooks/user';
import { categorizeTime } from '../../../utils/profile';

const Notification = () => {
const { supabaseId } = useAuthStore();
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/(app)/(tabs)/post/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Stack } from 'expo-router';
import React from 'react';
import { router, Stack } from 'expo-router';
import { useForm, FormProvider } from 'react-hook-form';
import { FormProvider, useForm } from 'react-hook-form';

export type Location = {
type: string;
Expand Down
5 changes: 2 additions & 3 deletions frontend/app/(app)/(tabs)/post/components/fish-search.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { TextInput, View, Image, Text, TouchableOpacity } from 'react-native';
import React, { useEffect, useState } from 'react';
import { useFormContext } from 'react-hook-form';
import { useState, useEffect } from 'react';
import { Text, TouchableOpacity, View } from 'react-native';

type FishData = {
name: string;
Expand Down
6 changes: 3 additions & 3 deletions frontend/app/(app)/(tabs)/post/components/page-button.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { TouchableOpacity, Text, View } from 'react-native';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { faChevronRight } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';

interface ButtonProps {
text?: string;
Expand Down
22 changes: 11 additions & 11 deletions frontend/app/(app)/(tabs)/post/components/post-creation-form.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React, { useState } from 'react';
import { View, Text, Modal } from 'react-native';
import { useFormContext, Controller } from 'react-hook-form';
import ImagePicker from '../../../../../components/image-picker';
import BigText from '../../../../../components/bigtext';
import Button from '../../../../../components/button';
import PageButton from './page-button';
import { faAngleLeft } from '@fortawesome/free-solid-svg-icons';
import { router } from 'expo-router';
import Tag from '../../../../../components/tag';
import React, { useState } from 'react';
import { Controller, useFormContext } from 'react-hook-form';
import { Modal, Text, View } from 'react-native';
import { apiConfig } from '../../../../../api/apiContext';
import { useAuthStore } from '../../../../../auth/authStore';
import Map from '../../../../../components/map';
import BigText from '../../../../../components/bigtext';
import Button from '../../../../../components/button';
import IconButton from '../../../../../components/icon-button';
import { faAngleLeft } from '@fortawesome/free-solid-svg-icons';
import { Location, FormFields } from '../_layout';
import ImagePicker from '../../../../../components/image-picker';
import Map from '../../../../../components/map';
import Tag from '../../../../../components/tag';
import { FormFields, Location } from '../_layout';
import PageButton from './page-button';

export default function PostCreationForm() {
const [modalVisible, setModalVisible] = useState(false);
Expand Down
9 changes: 1 addition & 8 deletions frontend/app/(app)/(tabs)/post/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import React from 'react';
import { View, Text, ScrollView } from 'react-native';
import {
useForm,
FormProvider,
useFormContext,
Form,
Controller,
} from 'react-hook-form';
import { ScrollView, Text, View } from 'react-native';
import PostCreationForm from './components/post-creation-form';

export default function PostCreation() {
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/(app)/(tabs)/post/tag-fish.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { View, Text, Image, TextInput } from 'react-native';
import { useFormContext } from 'react-hook-form';
import { Image, Text, TextInput, View } from 'react-native';
import Tag from '../../../../components/tag';
import { FormFields } from './_layout';
import FishSearch from './components/fish-search';
import { Location, FormFields } from './_layout';

export default function TagFish() {
const { setValue, watch } = useFormContext<FormFields>();
Expand Down
8 changes: 4 additions & 4 deletions frontend/app/(app)/(tabs)/profile.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { View, Text } from 'react-native';
import User from '../user/components/user-profile';
import { useAuthStore } from '../../../auth/authStore';
import { Stack } from 'expo-router';
import { faBars } from '@fortawesome/free-solid-svg-icons';
import { Stack } from 'expo-router';
import { Text, View } from 'react-native';
import { useAuthStore } from '../../../auth/authStore';
import IconButton from '../../../components/icon-button';
import User from '../user/components/user-profile';

const Profile = () => {
const { supabaseId } = useAuthStore();
Expand Down
16 changes: 8 additions & 8 deletions frontend/app/(app)/divelog/[id].tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { router, useLocalSearchParams } from 'expo-router';
import {
SafeAreaView,
View,
Text,
Image,
Pressable,
SafeAreaView,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { useDiveLog } from '../../../hooks/divelog';
import Profile from '../../../components/profile';
import { PROFILE_PHOTO } from '../../../consts/profile';
import PopulatedInfoPopupButton from '../../../components/populated-info-popup';
import InfoPopup from '../../../components/info-popup';
import { useAuthStore } from '../../../auth/authStore';
import LikeAndShare from '../../../components/divelog/like-share';
import InfoPopup from '../../../components/info-popup';
import PopulatedInfoPopupButton from '../../../components/populated-info-popup';
import Profile from '../../../components/profile';
import { PROFILE_PHOTO } from '../../../consts/profile';
import { useDiveLog } from '../../../hooks/divelog';

const DiveLog = () => {
const { supabaseId } = useAuthStore();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useEffect, useRef } from 'react';
import { Animated, View } from 'react-native';
import usePulsingAnimation from '../../../../../utils/skeleton';

Expand Down
12 changes: 6 additions & 6 deletions frontend/app/(app)/user/components/user-profile.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import { View, FlatList, Pressable } from 'react-native';
import { LinearGradient } from 'expo-linear-gradient';
import Header from '.././components/header';
import Badges from '.././components/badges';
import Menu from '.././components/menu';
import { SafeAreaView } from 'react-native-safe-area-context';
import { router, Stack } from 'expo-router';
import React from 'react';
import { FlatList, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useAuthStore } from '../../../../auth/authStore';
import Arrow from '../../../../components/arrow';
import InfoPopup from '../../../../components/info-popup';
import Badges from '.././components/badges';
import Header from '.././components/header';
import Menu from '.././components/menu';

const User = ({ id }: { id: string }) => {
const { supabaseId } = useAuthStore();
Expand Down
2 changes: 1 addition & 1 deletion frontend/consts/onboarding.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { apiConfig } from "../api/apiContext";
import { apiConfig } from '../api/apiContext';

export const ONBOARDING_DATA = [
{
Expand Down

0 comments on commit 46e33f1

Please sign in to comment.