Your music, beautifully tracked. All yours. (coming soon) teal.fm
teal-fm atproto

it works

+38 -17
+32 -15
apps/amethyst/app/(tabs)/index.tsx
··· 1 1 import * as React from "react"; 2 2 import { View } from "react-native"; 3 - import { Avatar, AvatarFallback, AvatarImage } from "../../components/ui/avatar"; 3 + import { 4 + Avatar, 5 + AvatarFallback, 6 + AvatarImage, 7 + } from "../../components/ui/avatar"; 4 8 import { 5 9 Card, 6 10 CardContent, 7 - CardDescription, 8 - CardFooter, 9 11 CardHeader, 10 12 CardTitle, 11 13 } from "../../components/ui/card"; 12 14 import { Text } from "../../components/ui/text"; 13 - import AuthOptions from "../auth/options"; 14 15 import { useStore } from "../../stores/mainStore"; 16 + import AuthOptions from "../auth/options"; 15 17 16 18 import { Response } from "@atproto/api/src/client/types/app/bsky/actor/getProfile"; 17 19 ··· 27 29 const isReady = useStore((state) => state.isAgentReady); 28 30 React.useEffect(() => { 29 31 if (agent) { 30 - agent.getProfile({actor: "natalie.sh"}).then((profile) => { 31 - console.log(profile) 32 - return setProfile(profile); 33 - }).catch((e)=>{ 34 - console.log(e) 35 - }) 32 + agent 33 + .getProfile({ actor: agent.did ?? "teal.fm" }) 34 + .then((profile) => { 35 + console.log(profile); 36 + return setProfile(profile); 37 + }) 38 + .catch((e) => { 39 + console.log(e); 40 + }); 36 41 } else { 37 - console.log("No agent") 42 + console.log("No agent"); 38 43 } 39 44 }, [isReady]); 40 45 ··· 51 56 <Card className="w-full max-w-full p-6 rounded-2xl"> 52 57 <CardHeader className="items-center"> 53 58 <Avatar alt="Rick Sanchez's Avatar" className="w-24 h-24"> 54 - <AvatarImage source={{ uri: profile?.data.avatar ?? GITHUB_AVATAR_URI }} /> 59 + <AvatarImage 60 + source={{ uri: profile?.data.avatar ?? GITHUB_AVATAR_URI }} 61 + /> 55 62 <AvatarFallback> 56 - <Text>{profile?.data.displayName?.substring(0,1) ?? " Richard"}</Text> 63 + <Text> 64 + {profile?.data.displayName?.substring(0, 1) ?? " Richard"} 65 + </Text> 57 66 </AvatarFallback> 58 67 </Avatar> 59 68 <View className="p-3" /> 60 - <CardTitle className="text-center">{profile?.data.displayName ?? " Richard"}</CardTitle> 69 + <CardTitle className="text-center"> 70 + {profile?.data.displayName ?? " Richard"} 71 + </CardTitle> 61 72 <CardContent className="text-center w-full"> 62 - {profile ? (profile.data?.description?.split('\n').map((str,i) => <Text className="text-center" key={i}>{str}</Text>) || "A very mysterious person") : "Loading..."} 73 + {profile 74 + ? profile.data?.description?.split("\n").map((str, i) => ( 75 + <Text className="text-center" key={i}> 76 + {str} 77 + </Text> 78 + )) || "A very mysterious person" 79 + : "Loading..."} 63 80 </CardContent> 64 81 </CardHeader> 65 82 </Card>
+3 -2
apps/amethyst/package.json
··· 29 29 "@rn-primitives/slot": "^1.1.0", 30 30 "@rn-primitives/tooltip": "^1.1.0", 31 31 "@rn-primitives/types": "^1.1.0", 32 + "@teal/lexicons": "workspace:*", 32 33 "class-variance-authority": "^0.7.1", 33 34 "clsx": "^2.1.1", 34 35 "eslint-plugin-react-compiler": "19.0.0-beta-37ed2a7-20241206", 35 36 "expo": "~52.0.17", 37 + "expo-constants": "^17.0.3", 36 38 "expo-font": "~13.0.1", 37 39 "expo-linking": "~7.0.3", 38 40 "expo-router": "~4.0.1", ··· 53 55 "react-native-svg": "15.8.0", 54 56 "react-native-web": "~0.19.13", 55 57 "tailwind-merge": "^2.5.5", 56 - "zustand": "^5.0.1", 57 - "@teal/lexicons": "workspace:*" 58 + "zustand": "^5.0.1" 58 59 }, 59 60 "devDependencies": { 60 61 "@babel/core": "^7.26.0",
+3
pnpm-lock.yaml
··· 80 80 expo: 81 81 specifier: ~52.0.17 82 82 version: 52.0.23(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@expo/metro-runtime@4.0.0(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@types/react@18.3.12)(react@18.3.1)))(babel-plugin-react-compiler@19.0.0-beta-37ed2a7-20241206)(react-compiler-runtime@19.0.0-beta-37ed2a7-20241206(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@types/react@18.3.12)(react@18.3.1))(react@18.3.1) 83 + expo-constants: 84 + specifier: ^17.0.3 85 + version: 17.0.3(expo@52.0.23(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@expo/metro-runtime@4.0.0(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@types/react@18.3.12)(react@18.3.1)))(babel-plugin-react-compiler@19.0.0-beta-37ed2a7-20241206)(react-compiler-runtime@19.0.0-beta-37ed2a7-20241206(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@types/react@18.3.12)(react@18.3.1))(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@types/react@18.3.12)(react@18.3.1)) 83 86 expo-font: 84 87 specifier: ~13.0.1 85 88 version: 13.0.2(expo@52.0.23(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@expo/metro-runtime@4.0.0(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@types/react@18.3.12)(react@18.3.1)))(babel-plugin-react-compiler@19.0.0-beta-37ed2a7-20241206)(react-compiler-runtime@19.0.0-beta-37ed2a7-20241206(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@types/react@18.3.12)(react@18.3.1))(react@18.3.1))(react@18.3.1)