Skip to content

Commit c44e5c7

Browse files
Fixed issue #112 (#132)
1 parent e5f7f9c commit c44e5c7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Algolyzer/home/templates/home/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ <h1 class="text-3xl font-bold mb-8">
4545
</svg>
4646
</div>
4747
<div class="stat-title">Tasks</div>
48-
<div class="stat-value text-primary">{{ completed_tasks }} Completed</div>
48+
<div class="stat-value text-primary">{{ completed_tasks }} Done</div>
4949
<div class="stat-desc">{{ pending_tasks }} Pending</div>
5050
</div>
5151

Algolyzer/home/templates/home/onboarding.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ <h1 class="text-5xl font-bold text-center my-6">Complete Your Profile</h1>
6363
</div>
6464

6565
<!-- Submit Button -->
66-
<div class="flex justify-between items-center mt-6">
67-
<a href="{% url 'dashboard' %}" class="btn btn-outline">Skip</a>
66+
<div class="flex justify-center items-center mt-6">
6867
<button type="submit" class="btn btn-primary">Submit</button>
6968
</div>
7069
</form>

Algolyzer/home/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def dashboard(request):
1919
# Fetch the user's profile
2020
user_profile = UserProfile.objects.filter(user=request.user).first()
2121

22+
# Redirect to onboarding if no profile exists
23+
if not user_profile:
24+
return redirect("onboarding")
25+
2226
# Calculate XP progress percentage
2327
next_level_xp = user_profile.get_next_level_xp()
2428
progress_percentage = (

0 commit comments

Comments
 (0)