File tree Expand file tree Collapse file tree
app/pages/profile/[handle] Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import { updateProfile as updateProfileUtil } from ' ~/utils/atproto/profile'
33
4- const route = useRoute (' / profile/[ handle] ' )
4+ const route = useRoute (' profile- handle' )
55const handle = computed (() => route .params .handle )
66
7- const { data : profile }: { data? : NPMXProfile } = useFetch (
8- () => ` /api/social/profile/${handle .value } ` ,
9- {
10- default : () => ({ profile: { displayName: handle .value } }),
11- server: false ,
12- },
13- )
7+ const { data : profile } = useFetch <NPMXProfile >(() => ` /api/social/profile/${handle .value } ` , {
8+ default : () => ({ displayName: handle .value , description: ' ' , website: ' ' }),
9+ server: false ,
10+ })
1411
1512const { user } = useAtproto ()
1613const isEditing = ref (false )
@@ -30,7 +27,7 @@ watchEffect(() => {
3027})
3128
3229async function updateProfile() {
33- if (! user .value .handle || ! displayNameInput .value ) {
30+ if (! user .value ? .handle || ! displayNameInput .value ) {
3431 return
3532 }
3633
You can’t perform that action at this time.
0 commit comments