Skip to content

Commit 482b47a

Browse files
committed
chore: clean up imports
1 parent 4c4633d commit 482b47a

11 files changed

+32
-31
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ yarn-error.*
3737

3838
app-example
3939
.env
40+
41+
target/

app/(threads)/t/[thread_id]/index.tsx

+4-9
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,13 @@
1414
limitations under the License.
1515
*/
1616

17-
import { useEffect } from "react";
1817
import Sidebar from "@/components/Sidebar";
19-
import { getCurrentProfile, getThread, Profile, Thread } from "@/lib/api";
18+
import { getThread } from "@/lib/api";
2019
import PostList from "@/components/PostList";
2120
import { Text, View } from "react-native";
22-
import { Link, useLocalSearchParams, useRouter } from "expo-router";
21+
import { Link, useLocalSearchParams } from "expo-router";
2322
import ThreadComp from "@/components/ThreadDisplay";
24-
import {
25-
tokenStorage,
26-
useCurrentProfileStore,
27-
useCurrentTrackStore,
28-
} from "@/lib/state";
23+
import { useCurrentTrackStore } from "@/lib/state";
2924
import { useQuery } from "@tanstack/react-query";
3025
import { Image } from "expo-image";
3126

@@ -49,7 +44,7 @@ export default function ThreadView() {
4944
return (
5045
<View
5146
className={
52-
"flex flex-row justify-center w-full h-full m-auto bg-white dark:bg-primary gap-4 overflow-y-auto scroll-smooth"
47+
"flex flex-row justify-center w-full h-full m-auto bg-white no-scrollbar dark:bg-primary gap-4 overflow-y-auto scroll-smooth"
5348
}
5449
>
5550
<Sidebar curPage={undefined} />

app/[user].tsx

+7-10
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,17 @@
1414
limitations under the License.
1515
*/
1616

17-
import { useEffect, useState } from "react";
17+
import { useState } from "react";
1818
import Sidebar from "../components/Sidebar";
19-
import {
20-
getCurrentProfile,
21-
getProfile,
22-
getUserTracks,
23-
Profile,
24-
} from "@/lib/api";
19+
import { getCurrentProfile, getProfile, getUserTracks } from "@/lib/api";
2520
import PostList from "@/components/PostList";
2621
import { View } from "react-native";
2722
import { useLocalSearchParams, useRouter } from "expo-router";
2823
import NotFoundScreen from "./+not-found";
2924
import ProfileDisplay from "@/components/ProfileDisplay";
3025
import { tokenStorage } from "@/lib/state";
3126
import { useQuery } from "@tanstack/react-query";
27+
import PostCreate from "@/components/PostCreate";
3228

3329
// TODO: support handles
3430
export default function UserProfile() {
@@ -64,9 +60,8 @@ export default function UserProfile() {
6460

6561
if (found) {
6662
return (
67-
<View className="flex flex-row justify-center w-full h-screen mb-20 max-lg:no-scrollbar bg-white dark:bg-primary overflow-y-auto overflow-x-hidden scroll-smooth">
68-
<Sidebar curPage={user} />
69-
<View className="lg:mt-9 rounded-3xl max-lg:w-full">
63+
<View className="flex flex-row justify-center w-full h-screen mb-20 no-scrollbar bg-white dark:bg-primary overflow-y-auto overflow-x-hidden scroll-smooth">
64+
<View className="flex lg:mt-9 rounded-3xl max-lg:w-full">
7065
<ProfileDisplay
7166
profile={profileQuery.data}
7267
currentUser={
@@ -82,6 +77,8 @@ export default function UserProfile() {
8277
loading={query.isLoading}
8378
/>
8479
</View>
80+
<PostCreate />
81+
<Sidebar curPage={user} />
8582
</View>
8683
);
8784
} else {

app/_layout.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { useFonts } from "expo-font";
18-
import { Slot, Stack } from "expo-router";
18+
import { Stack } from "expo-router";
1919
import * as SplashScreen from "expo-splash-screen";
2020
import { useEffect } from "react";
2121
import "react-native-reanimated";

app/edit-self.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
limitations under the License.
1515
*/
1616

17-
import { getCurrentProfile, Profile, userEdit } from "@/lib/api";
18-
import { tokenStorage, useCurrentProfileStore } from "@/lib/state";
17+
import { getCurrentProfile, userEdit } from "@/lib/api";
18+
import { tokenStorage } from "@/lib/state";
1919
import Octicons from "@expo/vector-icons/Octicons";
2020
import { useMutation, useQuery } from "@tanstack/react-query";
2121
import { Link, useRouter } from "expo-router";

app/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
import { useEffect } from "react";
1818
import Sidebar from "../components/Sidebar";
19-
import { getCurrentProfile, Profile, scrollGlobal, Thread } from "@/lib/api";
19+
import { getCurrentProfile, scrollGlobal } from "@/lib/api";
2020
import PostList from "@/components/PostList";
21-
import { Text, View } from "react-native";
21+
import { View } from "react-native";
2222
import { tokenStorage, useCurrentProfileStore } from "@/lib/state";
2323
import { useQuery } from "@tanstack/react-query";
2424
import PostCreate from "@/components/PostCreate";

bun.lockb

0 Bytes
Binary file not shown.

components/LogoHead.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
import { Image, Pressable, View } from "react-native";
17+
import { Image, View } from "react-native";
1818

1919
export default function LogoHead() {
2020
return (

components/PostList.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ import { FlashList } from "@shopify/flash-list";
1919
import { ActivityIndicator, Text, View } from "react-native";
2020
import TrackComp from "./Track";
2121

22-
export default function PostList({ threads, loading }: { threads: Thread[], loading: boolean }) {
22+
export default function PostList({
23+
threads,
24+
loading,
25+
}: {
26+
threads: Thread[];
27+
loading: boolean;
28+
}) {
2329
// TODO: markdown formatting
2430
return (
2531
<View className="w-full lg:w-[602px] mb-20 lg:mb-5 lg:mt-5 z-[1] no-scrollbar">
@@ -31,14 +37,14 @@ export default function PostList({ threads, loading }: { threads: Thread[], load
3137
renderItem={({ item }) => <TrackComp item={item} />}
3238
/>
3339
)}
34-
{(threads.length === 0 && loading === false) && (
40+
{threads.length === 0 && loading === false && (
3541
<View className="flex justify-start items-start h-screen w-full p-4 rounded-xl rounded-t-none border-t border-borders">
3642
<Text className="text-graaaay dark:text-white/70 font-semibold">
3743
Oh no! It seems empty here... You can be the first to reply!
3844
</Text>
3945
</View>
4046
)}
41-
{(threads.length === 0 && loading === true) && (
47+
{threads.length === 0 && loading === true && (
4248
<View className="flex justify-center items-center h-screen w-full p-4 rounded-xl rounded-t-none border-t border-borders">
4349
<ActivityIndicator size="large" className="text-brand" />
4450
</View>

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"web": "expo start --web",
1010
"test": "jest --watchAll",
1111
"lint": "expo lint",
12-
"fmt": "prettier . --write"
12+
"fmt": "prettier . --write",
13+
"build:web": "expo export --platform web"
1314
},
1415
"jest": {
1516
"preset": "jest-expo"

tailwind.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ module.exports = {
1313
brand: "rgb(59, 134, 255)",
1414
"brand-dark": "rgb(25, 106, 189)",
1515
borders: "rgb(61, 68, 77)",
16-
primary: "rgb(16, 16, 16)",
17-
secondary: "rgb(24, 24, 24)",
16+
primary: "rgb(22, 22, 23)",
17+
secondary: "rgb(44, 44, 46)",
1818
bobo: "rgb(45, 45, 45)",
1919
tertiary: "rgb(10, 10, 10)",
2020
"tender-surrender": "rgba(252,194,156,255)",

0 commit comments

Comments
 (0)