@@ -27,8 +27,6 @@ export default [
|
||||
rules: {
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react/prop-types": "off",
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"react/no-unescaped-entities": "off"
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -15,13 +15,6 @@ type ToasterToast = ToastProps & {
|
||||
action?: ToastActionElement;
|
||||
};
|
||||
|
||||
const actionTypes = {
|
||||
ADD_TOAST: "ADD_TOAST",
|
||||
UPDATE_TOAST: "UPDATE_TOAST",
|
||||
DISMISS_TOAST: "DISMISS_TOAST",
|
||||
REMOVE_TOAST: "REMOVE_TOAST",
|
||||
} as const;
|
||||
|
||||
let count = 0;
|
||||
|
||||
function genId() {
|
||||
@@ -29,23 +22,21 @@ function genId() {
|
||||
return count.toString();
|
||||
}
|
||||
|
||||
type ActionType = typeof actionTypes;
|
||||
|
||||
type Action =
|
||||
| {
|
||||
type: ActionType["ADD_TOAST"];
|
||||
type: "ADD_TOAST";
|
||||
toast: ToasterToast;
|
||||
}
|
||||
| {
|
||||
type: ActionType["UPDATE_TOAST"];
|
||||
type: "UPDATE_TOAST";
|
||||
toast: Partial<ToasterToast>;
|
||||
}
|
||||
| {
|
||||
type: ActionType["DISMISS_TOAST"];
|
||||
type: "DISMISS_TOAST";
|
||||
toastId?: ToasterToast["id"];
|
||||
}
|
||||
| {
|
||||
type: ActionType["REMOVE_TOAST"];
|
||||
type: "REMOVE_TOAST";
|
||||
toastId?: ToasterToast["id"];
|
||||
};
|
||||
|
||||
|
||||
@@ -8,10 +8,8 @@ import {
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
CardDescription,
|
||||
CardContent,
|
||||
CardFooter,
|
||||
} from "@/components/ui/card";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { Plus } from "lucide-react";
|
||||
import { OrganizationSelectionPageQuery } from "./__generated__/OrganizationSelectionPageQuery.graphql";
|
||||
|
||||
@@ -34,7 +32,6 @@ const organizationSelectionQuery = graphql`
|
||||
|
||||
export default function OrganizationSelectionPage() {
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
const data = useLazyLoadQuery<OrganizationSelectionPageQuery>(
|
||||
organizationSelectionQuery,
|
||||
{}
|
||||
@@ -45,13 +42,11 @@ export default function OrganizationSelectionPage() {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
// If there's only one organization, redirect to it automatically
|
||||
if (organizations.length === 1) {
|
||||
navigate(`/organizations/${organizations[0].id}`);
|
||||
}
|
||||
}, [organizations, navigate]);
|
||||
|
||||
// If no organizations, show a message to create one
|
||||
if (organizations.length === 0) {
|
||||
return (
|
||||
<div className="container mx-auto py-10">
|
||||
@@ -63,8 +58,8 @@ export default function OrganizationSelectionPage() {
|
||||
<CardHeader>
|
||||
<CardTitle>Welcome to Probo</CardTitle>
|
||||
<CardDescription>
|
||||
You don't have any organizations yet. Create your first one to
|
||||
get started.
|
||||
You don{"'"}t have any organizations yet. Create your first one
|
||||
to get started.
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardFooter>
|
||||
@@ -81,7 +76,6 @@ export default function OrganizationSelectionPage() {
|
||||
);
|
||||
}
|
||||
|
||||
// If multiple organizations, show a selection screen
|
||||
return (
|
||||
<div className="container mx-auto py-10">
|
||||
<Helmet>
|
||||
|
||||
@@ -164,7 +164,7 @@ function PeopleListContent({
|
||||
<div>
|
||||
<h2 className="text-2xl font-semibold mb-1">Employees</h2>
|
||||
<p className="text-muted-foreground">
|
||||
Keep track of your company's workforce and their progress towards
|
||||
Keep track of your company{"'"}s workforce and their progress towards
|
||||
completing tasks assigned to them.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user