diff --git a/client/src/app/(dashboard)/(both)/home/(messages)/latest-messages-card.tsx b/client/src/app/(dashboard)/(both)/home/(messages)/latest-messages-card.tsx
index 8f6df5b..2a53448 100644
--- a/client/src/app/(dashboard)/(both)/home/(messages)/latest-messages-card.tsx
+++ b/client/src/app/(dashboard)/(both)/home/(messages)/latest-messages-card.tsx
@@ -35,7 +35,7 @@ export async function LatestMessagesCard() {
)}
{messageChannels.map((user) => (
-
diff --git a/client/src/app/(dashboard)/(both)/home/loading.tsx b/client/src/app/(dashboard)/(both)/home/loading.tsx
new file mode 100644
index 0000000..658d3df
--- /dev/null
+++ b/client/src/app/(dashboard)/(both)/home/loading.tsx
@@ -0,0 +1,5 @@
+import LoadingSpinner from "@/components/loading-spinner";
+
+export default function Loading() {
+ return ;
+}
diff --git a/client/src/app/(dashboard)/(both)/leases/[leaseID]/(details)/lease-details-card.tsx b/client/src/app/(dashboard)/(both)/leases/[leaseID]/(details)/lease-details-card.tsx
index 8b77a12..7975979 100644
--- a/client/src/app/(dashboard)/(both)/leases/[leaseID]/(details)/lease-details-card.tsx
+++ b/client/src/app/(dashboard)/(both)/leases/[leaseID]/(details)/lease-details-card.tsx
@@ -44,6 +44,7 @@ export default function LeaseDetailsCard({ lease }: LeaseDetailsCardProps) {
{lease.property?.name}
diff --git a/client/src/app/(dashboard)/(both)/leases/invite/loading.tsx b/client/src/app/(dashboard)/(both)/leases/invite/loading.tsx
new file mode 100644
index 0000000..658d3df
--- /dev/null
+++ b/client/src/app/(dashboard)/(both)/leases/invite/loading.tsx
@@ -0,0 +1,5 @@
+import LoadingSpinner from "@/components/loading-spinner";
+
+export default function Loading() {
+ return ;
+}
diff --git a/client/src/app/(dashboard)/(both)/leases/page.tsx b/client/src/app/(dashboard)/(both)/leases/page.tsx
index bff1b73..7de5016 100644
--- a/client/src/app/(dashboard)/(both)/leases/page.tsx
+++ b/client/src/app/(dashboard)/(both)/leases/page.tsx
@@ -44,8 +44,11 @@ export default async function Page() {
+ {activeLeases.length === 0 && (
+
No active leases found.
+ )}
{activeLeases.map((lease) => (
-
+
diff --git a/client/src/app/(dashboard)/(both)/maintenance/loading.tsx b/client/src/app/(dashboard)/(both)/maintenance/loading.tsx
new file mode 100644
index 0000000..658d3df
--- /dev/null
+++ b/client/src/app/(dashboard)/(both)/maintenance/loading.tsx
@@ -0,0 +1,5 @@
+import LoadingSpinner from "@/components/loading-spinner";
+
+export default function Loading() {
+ return
;
+}
diff --git a/client/src/app/(dashboard)/(both)/maintenance/requests-table.tsx b/client/src/app/(dashboard)/(both)/maintenance/requests-table.tsx
index 639d99b..a0a2e27 100644
--- a/client/src/app/(dashboard)/(both)/maintenance/requests-table.tsx
+++ b/client/src/app/(dashboard)/(both)/maintenance/requests-table.tsx
@@ -145,7 +145,7 @@ export const columns: ColumnDef
[] = [
const lease = row.getValue("lease") as Partial;
return (
-
+
{lease?.property?.name}
diff --git a/client/src/app/(dashboard)/(both)/messages/loading.tsx b/client/src/app/(dashboard)/(both)/messages/loading.tsx
new file mode 100644
index 0000000..658d3df
--- /dev/null
+++ b/client/src/app/(dashboard)/(both)/messages/loading.tsx
@@ -0,0 +1,5 @@
+import LoadingSpinner from "@/components/loading-spinner";
+
+export default function Loading() {
+ return ;
+}
diff --git a/client/src/app/(dashboard)/(both)/messages/page.tsx b/client/src/app/(dashboard)/(both)/messages/page.tsx
index 88f7587..8086bca 100644
--- a/client/src/app/(dashboard)/(both)/messages/page.tsx
+++ b/client/src/app/(dashboard)/(both)/messages/page.tsx
@@ -34,7 +34,7 @@ export default async function Page() {
)}
{messageChannels.map((channel) => (
-
+
;
+}
diff --git a/client/src/app/(dashboard)/(landlord)/properties/[propertyID]/delete-property-client.tsx b/client/src/app/(dashboard)/(landlord)/properties/[propertyID]/delete-property-client.tsx
index 9431f99..55a6284 100644
--- a/client/src/app/(dashboard)/(landlord)/properties/[propertyID]/delete-property-client.tsx
+++ b/client/src/app/(dashboard)/(landlord)/properties/[propertyID]/delete-property-client.tsx
@@ -53,7 +53,7 @@ export function DeletePropertyClient({
{leases.map((lease) => (
-
+
{" "}
{formatTimeToDateString(
lease.startDate
diff --git a/client/src/app/(dashboard)/(landlord)/properties/page.tsx b/client/src/app/(dashboard)/(landlord)/properties/page.tsx
index 51c2f4a..f1853be 100644
--- a/client/src/app/(dashboard)/(landlord)/properties/page.tsx
+++ b/client/src/app/(dashboard)/(landlord)/properties/page.tsx
@@ -45,6 +45,7 @@ export default async function Page() {
Create
{" "}
@@ -57,6 +58,7 @@ export default async function Page() {
key={property.id}
href={`/properties/${property.id}`}
className="flex-grow flex-shrink basis-0 max-w-80"
+ prefetch={false}
>
diff --git a/client/src/app/(dashboard)/(landlord)/tenants/tenants-table.tsx b/client/src/app/(dashboard)/(landlord)/tenants/tenants-table.tsx
index bc0fa13..97d9873 100644
--- a/client/src/app/(dashboard)/(landlord)/tenants/tenants-table.tsx
+++ b/client/src/app/(dashboard)/(landlord)/tenants/tenants-table.tsx
@@ -138,7 +138,7 @@ export const columns: ColumnDef
[] = [
const lease = row.getValue("lease") as Partial;
return (
-
+
{lease?.property?.name}
diff --git a/client/src/app/documents/[documentID]/page.tsx b/client/src/app/documents/[documentID]/page.tsx
index 44e5833..d75b371 100644
--- a/client/src/app/documents/[documentID]/page.tsx
+++ b/client/src/app/documents/[documentID]/page.tsx
@@ -35,7 +35,7 @@ export default async function Page({ params: { documentID } }: PageProps) {
If the document does not open, click{" "}
- here
+ here
.
@@ -46,7 +46,7 @@ export default async function Page({ params: { documentID } }: PageProps) {
Click{" "}
- here
+ here
{" "}
to go back to the dashboard.
diff --git a/client/src/app/login/page.tsx b/client/src/app/login/page.tsx
index c1dfe60..ecec6f8 100644
--- a/client/src/app/login/page.tsx
+++ b/client/src/app/login/page.tsx
@@ -19,7 +19,7 @@ export default async function Page({ searchParams }: PageProps) {
return (
<>
-
+
-
+
- Login
+ Login
- Signup
+ Signup
@@ -42,7 +42,7 @@ export default async function Home() {
- Get started
+ Get started
{icon}
- )) || {icon}
+ )) || {icon}
) : (
icon
)}
diff --git a/client/src/components/buttons/main-button.tsx b/client/src/components/buttons/main-button.tsx
index 2a14e4a..b3baf1f 100644
--- a/client/src/components/buttons/main-button.tsx
+++ b/client/src/components/buttons/main-button.tsx
@@ -37,7 +37,7 @@ export function MainButton({
icon,
href,
onClick,
- linkPrefetch = true,
+ linkPrefetch = false,
linkProps = {},
}: MainButtonProps) {
const buttonContent = (
diff --git a/client/src/components/forms/create-lease-form.tsx b/client/src/components/forms/create-lease-form.tsx
index 8568554..3a4dd72 100644
--- a/client/src/components/forms/create-lease-form.tsx
+++ b/client/src/components/forms/create-lease-form.tsx
@@ -59,6 +59,7 @@ export function CreateLeaseForm({
create a new property
diff --git a/client/src/components/loading-spinner.tsx b/client/src/components/loading-spinner.tsx
index 3dea172..67fa97f 100644
--- a/client/src/components/loading-spinner.tsx
+++ b/client/src/components/loading-spinner.tsx
@@ -1,12 +1,27 @@
import { cn } from "@/utils/tw-merge";
interface LoadingSpinnerProps {
- size?: number;
+ size?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
loadingText?: string;
textOff?: boolean;
className?: string;
}
+// Specify tailwind classes so tailwind builds these classes
+// https://stackoverflow.com/questions/71886011/why-tailwind-dynamic-class-is-not-present
+const sizeToTwClasses = {
+ 1: "w-1 h-1",
+ 2: "w-2 h-2",
+ 3: "w-3 h-3",
+ 4: "w-4 h-4",
+ 5: "w-5 h-5",
+ 6: "w-6 h-6",
+ 7: "w-7 h-7",
+ 8: "w-8 h-8",
+ 9: "w-9 h-9",
+ 10: "w-10 h-10",
+};
+
export default function LoadingSpinner({
size = 8,
loadingText = "Loading...",
@@ -21,7 +36,7 @@ export default function LoadingSpinner({
-
+
{createIcon(item.icon)}
{item.name}
@@ -146,7 +151,7 @@ export function Sidebar({ sideBarItems }: SidebarProps) {
className="w-full justify-start"
asChild
>
-
+
=> {
const cookie = cookies().get("connect.sid");
if (!cookie) {
+ console.error("No cookie found");
throw new UnauthorizedError("Not logged in");
}
const response = await fetchDataServer("/users/me", {
next: {
- revalidate: 30,
+ revalidate: 0,
},
});
return await response.json();
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index 6daa5f5..2649427 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -42,37 +42,37 @@ services:
ports:
- ${REDIS_INSIGHT_PORT}:8001
- server:
- build: ./server
- ports:
- - 5000:5000
- depends_on:
- - db
- - redis
- env_file:
- - ./.env.server
- networks:
- - backend
+ # server:
+ # build: ./server
+ # ports:
+ # - 5000:5000
+ # depends_on:
+ # - db
+ # - redis
+ # env_file:
+ # - ./.env.server
+ # networks:
+ # - backend
- client:
- build: ./client
- ports:
- - 3000:3000
- depends_on:
- - server
- networks:
- - backend
+ # client:
+ # build: ./client
+ # ports:
+ # - 3000:3000
+ # depends_on:
+ # - server
+ # networks:
+ # - backend
- azure-function:
- build: ./azure
- ports:
- - "7071:80"
- env_file:
- - ./.env.azure
- volumes:
- - ./etc/test-secrets:/azure-functions-host/Secrets
- networks:
- - backend
+ # azure-function:
+ # build: ./azure
+ # ports:
+ # - "7071:80"
+ # env_file:
+ # - ./.env.azure
+ # volumes:
+ # - ./etc/test-secrets:/azure-functions-host/Secrets
+ # networks:
+ # - backend
# depends_on:
# - azurite