Skip to content

Commit

Permalink
style(frontend): tidying up comments and code readability [2024-12-21]
Browse files Browse the repository at this point in the history
  • Loading branch information
CHRISCARLON committed Dec 21, 2024
1 parent 2ac919c commit 08f4b98
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions gridwalk-ui/src/app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export async function saveEmail(email: string) {
}

// Register Beta Interest Action
// TODO have this dump to a Google Sheets as well as email
const transporter = nodemailer.createTransport({
host: "smtp.gmail.com",
port: 587,
Expand Down
2 changes: 1 addition & 1 deletion gridwalk-ui/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const geistMono = localFont({

export const metadata: Metadata = {
title: "GridWalk",
description: "Geospatial insights",
description: "Geospatial Insights",
};

export default function RootLayout({
Expand Down
8 changes: 4 additions & 4 deletions gridwalk-ui/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export default function Home() {
<p className="mt-6 text-xl leading-8 text-gray-300 max-w-2xl mx-auto">
GridWalk provides a collaborative environment to manage your
location data and turn it into crystal-clear insights. Build
beautiful maps, analyse patterns, and share discoveries with
your team in minutes.
maps, analyse patterns, and share discoveries with your team in
minutes.
</p>
</div>
</div>
Expand All @@ -73,7 +73,7 @@ export default function Home() {
Powerful Features
</div>
<h2 className="text-3xl font-bold tracking-tight text-white sm:text-4xl">
Everything You Need from a Modern Mapping Application
Everything You Need from a Modern Geospatial Mapping Application
</h2>
</div>
<div className="mx-auto mt-16 max-w-7xl">
Expand All @@ -98,7 +98,7 @@ export default function Home() {
title: "Intuitive Workflows",
description:
"Intuitive workflows and UI to make sure you have more time to focus on your analysis and stakeholders.",
benefit: "Streamlined experience",
benefit: "Streamlined user experience",
},
].map((feature, index) => (
<div
Expand Down
1 change: 1 addition & 0 deletions gridwalk-ui/src/app/registerInterest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Input } from "@/components/ui/input";
import { useFormStatus } from "react-dom";
import { sendEmail } from "@/app/actions";

// Create the submit button
function SubmitButton() {
const { pending } = useFormStatus();

Expand Down
11 changes: 9 additions & 2 deletions gridwalk-ui/src/app/workspace/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ import { getWorkspaceMembers } from "@/app/workspace/[workspaceId]/actions/works
import { HelpSupportModal } from "./supportModal";
import { useWorkspaces } from "./workspaceContext";

// Stat cards for the user
interface StatCardProps {
title: string;
value: string | number;
icon: LucideIcon;
description?: string;
}

// Workspace details
interface WorkspaceWithDetails {
id: string;
name: string;
Expand All @@ -34,6 +36,11 @@ interface WorkspaceWithDetails {
readOnlyCount: number;
}

// Plan card value
// TODO need this to refelct the actual plans people will have
const currentPlan = "Private Beta";

// Create statcard
const StatCard = ({ title, value, icon: Icon, description }: StatCardProps) => (
<div className="bg-white p-6 rounded-xl border border-gray-500 shadow-sm">
<div className="flex items-center gap-4">
Expand All @@ -52,6 +59,7 @@ const StatCard = ({ title, value, icon: Icon, description }: StatCardProps) => (
);

export default function WorkspacePage() {
// Set state variables
const { workspaces } = useWorkspaces();
const [isModalOpen, setIsModalOpen] = useState(false);
const [isHelpSupportModalOpen, setIsHelpSupportModalOpen] = useState(false);
Expand All @@ -62,6 +70,7 @@ export default function WorkspacePage() {
const [totalMembers, setTotalMembers] = useState(0);
const [loading, setLoading] = useState(true);

// Fetch workspace and project data
useEffect(() => {
const fetchWorkspaceDetails = async () => {
setLoading(true);
Expand Down Expand Up @@ -133,8 +142,6 @@ export default function WorkspacePage() {
}
}, [workspaces]);

const currentPlan = "Private Beta";

return (
<div className="w-full min-h-screen bg-gray-50">
<div className="max-w-7xl mx-auto p-6 md:p-8">
Expand Down
1 change: 1 addition & 0 deletions gridwalk-ui/src/app/workspace/profileModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const ProfileModal = ({ profileData }: ProfileModalProps) => {
</div>
</div>
</div>
{/* TODO implement account settings functionality */}
<div className="flex space-x-2">
<Button className="flex-1">
<Settings className="h-4 w-4 mr-2" />
Expand Down

0 comments on commit 08f4b98

Please sign in to comment.