Prettier format pending files

This commit is contained in:
Builder.io 2025-09-30 04:18:12 +00:00
parent d79788aa57
commit a31db0a7a7
2 changed files with 58 additions and 18 deletions

View file

@ -40,22 +40,34 @@ const missingProviderFallback: AuthContextType = {
loading: true, loading: true,
profileComplete: false, profileComplete: false,
signIn: async () => { signIn: async () => {
throw new Error("AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>."); throw new Error(
"AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>.",
);
}, },
signUp: async () => { signUp: async () => {
throw new Error("AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>."); throw new Error(
"AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>.",
);
}, },
signInWithOAuth: async () => { signInWithOAuth: async () => {
throw new Error("AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>."); throw new Error(
"AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>.",
);
}, },
signOut: async () => { signOut: async () => {
throw new Error("AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>."); throw new Error(
"AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>.",
);
}, },
updateProfile: async () => { updateProfile: async () => {
throw new Error("AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>."); throw new Error(
"AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>.",
);
}, },
refreshProfile: async () => { refreshProfile: async () => {
throw new Error("AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>."); throw new Error(
"AuthProvider is not mounted. Please ensure your app is wrapped with <AuthProvider>.",
);
}, },
}; };
@ -63,7 +75,9 @@ export const useAuth = () => {
const context = useContext(AuthContext); const context = useContext(AuthContext);
if (context === undefined) { if (context === undefined) {
if (!warnedMissingProvider) { if (!warnedMissingProvider) {
console.warn("useAuth called without an AuthProvider. Falling back to safe defaults."); console.warn(
"useAuth called without an AuthProvider. Falling back to safe defaults.",
);
warnedMissingProvider = true; warnedMissingProvider = true;
} }
return missingProviderFallback; return missingProviderFallback;

View file

@ -10,7 +10,13 @@ import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input"; import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea"; import { Textarea } from "@/components/ui/textarea";
import { Label } from "@/components/ui/label"; import { Label } from "@/components/ui/label";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { aethexToast } from "@/lib/aethex-toast"; import { aethexToast } from "@/lib/aethex-toast";
import { Mail, Phone, MessageSquare } from "lucide-react"; import { Mail, Phone, MessageSquare } from "lucide-react";
import { useState } from "react"; import { useState } from "react";
@ -84,15 +90,29 @@ export default function Contact() {
<Card className="bg-card/50 border-border/50"> <Card className="bg-card/50 border-border/50">
<CardHeader> <CardHeader>
<CardTitle>Related resources</CardTitle> <CardTitle>Related resources</CardTitle>
<CardDescription>Find quick answers and community links.</CardDescription> <CardDescription>
Find quick answers and community links.
</CardDescription>
</CardHeader> </CardHeader>
<CardContent className="grid sm:grid-cols-2 gap-3 text-sm"> <CardContent className="grid sm:grid-cols-2 gap-3 text-sm">
<a href="/community" className="underline text-aethex-300">Community hub</a> <a href="/community" className="underline text-aethex-300">
<a href="/docs" className="underline text-aethex-300">Docs</a> Community hub
<a href="/changelog" className="underline text-aethex-300">Changelog</a> </a>
<a href="/blog" className="underline text-aethex-300">Blog</a> <a href="/docs" className="underline text-aethex-300">
<a href="/feed" className="underline text-aethex-300">Live feed</a> Docs
<a href="/support" className="underline text-aethex-300">Support</a> </a>
<a href="/changelog" className="underline text-aethex-300">
Changelog
</a>
<a href="/blog" className="underline text-aethex-300">
Blog
</a>
<a href="/feed" className="underline text-aethex-300">
Live feed
</a>
<a href="/support" className="underline text-aethex-300">
Support
</a>
</CardContent> </CardContent>
</Card> </Card>
</div> </div>
@ -129,13 +149,17 @@ export default function Contact() {
<div> <div>
<Label>Topic</Label> <Label>Topic</Label>
<Select value={topic} onValueChange={setTopic}> <Select value={topic} onValueChange={setTopic}>
<SelectTrigger className="w-full"><SelectValue placeholder="Choose a topic" /></SelectTrigger> <SelectTrigger className="w-full">
<SelectValue placeholder="Choose a topic" />
</SelectTrigger>
<SelectContent> <SelectContent>
<SelectItem value="general">General</SelectItem> <SelectItem value="general">General</SelectItem>
<SelectItem value="sales">Sales</SelectItem> <SelectItem value="sales">Sales</SelectItem>
<SelectItem value="support">Support</SelectItem> <SelectItem value="support">Support</SelectItem>
<SelectItem value="community">Community</SelectItem> <SelectItem value="community">Community</SelectItem>
<SelectItem value="collaboration">Collaboration</SelectItem> <SelectItem value="collaboration">
Collaboration
</SelectItem>
<SelectItem value="press">Press/Media</SelectItem> <SelectItem value="press">Press/Media</SelectItem>
</SelectContent> </SelectContent>
</Select> </Select>
@ -143,7 +167,9 @@ export default function Contact() {
<div> <div>
<Label>Urgency</Label> <Label>Urgency</Label>
<Select value={urgency} onValueChange={setUrgency}> <Select value={urgency} onValueChange={setUrgency}>
<SelectTrigger className="w-full"><SelectValue placeholder="Urgency" /></SelectTrigger> <SelectTrigger className="w-full">
<SelectValue placeholder="Urgency" />
</SelectTrigger>
<SelectContent> <SelectContent>
<SelectItem value="low">Low</SelectItem> <SelectItem value="low">Low</SelectItem>
<SelectItem value="normal">Normal</SelectItem> <SelectItem value="normal">Normal</SelectItem>