- );
-}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index e9bd239..d1d00a3 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -5,11 +5,11 @@ import SelectRole from "../components/select-role";
import React, { Suspense } from "react";
import { type Session } from "next-auth";
import { db } from "~/server/db";
+import RoleSelectionSkeleton from "~/components/loading/role-selection-loader";
const Home: React.FC = async () => {
const session = await getServerAuthSession();
- // Use Suspense to suspend rendering while the data is being fetched
return (
@@ -44,7 +44,7 @@ const Home: React.FC = async () => {
{/* If the user is logged in, show the SelectRole component */}
{session && (
- Loading...
}>
+ }>
diff --git a/src/app/result/[role]/page.tsx b/src/app/result/[role]/page.tsx
index 38731c2..45d7e92 100644
--- a/src/app/result/[role]/page.tsx
+++ b/src/app/result/[role]/page.tsx
@@ -14,6 +14,8 @@ import { slugify } from "~/utils/slugify";
import ResultsWrapper from "~/components/results";
import { type Metadata } from "next";
+import ButtonSkeleton from "~/components/loading/button-loader";
+import LegendSkeleton from "~/components/loading/results-loader";
export const metadata: Metadata = {
title: "Results",
@@ -30,11 +32,11 @@ const Results: React.FC = async () => {
Tech Survey - Results
- Loading...
}>
+ }>
- Loading...}>
+ }>
{!session && (
diff --git a/src/app/survey/[role]/page.tsx b/src/app/survey/[role]/page.tsx
index 0403b53..eeb657e 100644
--- a/src/app/survey/[role]/page.tsx
+++ b/src/app/survey/[role]/page.tsx
@@ -2,7 +2,7 @@ import { getServerAuthSession } from "~/server/auth";
import { type AnswerOption, type Question } from "~/models/types";
import { Suspense } from "react";
import { SurveyQuestionnaire } from "~/components/survey-questionnaire";
-import Loading from "~/app/loading";
+import SurveyQuestionLoader from "~/components/loading/survey-question-loader";
import { db } from "~/server/db";
import { type Metadata } from "next";
@@ -12,7 +12,7 @@ export const metadata: Metadata = {
};
const SuspenseSurveyData = () => (
- }>
+ }>
);
diff --git a/src/app/thank-you/page.tsx b/src/app/thank-you/page.tsx
index 6eed521..1449353 100644
--- a/src/app/thank-you/page.tsx
+++ b/src/app/thank-you/page.tsx
@@ -9,6 +9,7 @@ import {
} from "~/models/types";
import { type Metadata } from "next";
+import ButtonSkeleton from "~/components/loading/button-loader";
export const metadata: Metadata = {
title: "Thank You",
@@ -88,7 +89,7 @@ const ThankYou = async () => {
We appreciate your time and effort in completing the survey.