Skip to content

Commit

Permalink
revert: conditionally show link to family
Browse files Browse the repository at this point in the history
  • Loading branch information
cybercoder-naj committed Sep 29, 2024
1 parent eaf5d8e commit 2f44b9a
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions app/pages/portal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ const { currentState } = useAppState();
definePageMeta({
middleware: ['require-auth']
});
const { status } = useFetch('/api/family/myFamily', {
lazy: false
});
</script>

<template>
Expand Down Expand Up @@ -57,14 +53,11 @@ const { status } = useFetch('/api/family/myFamily', {
</CardDetails>
<CardDetails v-else>
<strong>Parent's survey & proposals. [CLOSED]</strong>
<CardText v-if="status == 'success'">
<CardText>
Visit your
<NuxtLink to="/family">family page</NuxtLink>
to see your family details.
</CardText>
<CardText v-else-if="status == 'error'">
Sorry, we could not fetch your family details. Please try again.
</CardText>
</CardDetails>
</div>
<div v-else-if="currentState == 'freshers_open'">
Expand All @@ -78,14 +71,11 @@ const { status } = useFetch('/api/family/myFamily', {
</CardDetails>
<CardDetails v-else>
<strong>Parent's survey & proposals. [CLOSED]</strong>
<CardText v-if="status == 'success'">
<CardText>
Visit your
<NuxtLink to="/family">family page</NuxtLink>
to see your family details.
</CardText>
<CardText v-else-if="status == 'error'">
Sorry, we could not fetch your family details. Please try again.
</CardText>
</CardDetails>
</div>
<div v-else-if="currentState == 'closed'">
Expand All @@ -98,14 +88,11 @@ const { status } = useFetch('/api/family/myFamily', {
}}
[CLOSED]
</strong>
<CardText v-if="status == 'success'">
<CardText>
Visit your
<NuxtLink to="/family">family page</NuxtLink>
to see your family details.
</CardText>
<CardText v-else-if="status == 'error'">
Sorry, we could not fetch your family details. Please try again.
</CardText>
</CardDetails>
</div>
</div>
Expand Down

0 comments on commit 2f44b9a

Please sign in to comment.