Fix centered layout height
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import type { OrganizationsPageQuery as OrganizationsPageQueryType } from "./__g
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { Link, useNavigate } from "react-router";
|
import { Link, useNavigate } from "react-router";
|
||||||
import { Avatar, Button, Card, IconPlusLarge } from "@probo/ui";
|
import { Avatar, Button, Card, IconPlusLarge } from "@probo/ui";
|
||||||
|
import { usePageTitle } from "@probo/hooks";
|
||||||
|
|
||||||
const OrganizationsPageQuery = graphql`
|
const OrganizationsPageQuery = graphql`
|
||||||
query OrganizationsPageQuery {
|
query OrganizationsPageQuery {
|
||||||
@@ -34,6 +35,8 @@ export default function OrganizationsPage() {
|
|||||||
(edge) => edge.node
|
(edge) => edge.node
|
||||||
);
|
);
|
||||||
|
|
||||||
|
usePageTitle(__("Select an organization"));
|
||||||
|
|
||||||
// Redirect to the first organization if only one exists
|
// Redirect to the first organization if only one exists
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (organizations.length === 1) {
|
if (organizations.length === 1) {
|
||||||
@@ -43,8 +46,7 @@ export default function OrganizationsPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<title>{__("Select an organization")}</title>
|
<div className="space-y-6 w-full py-6">
|
||||||
<div className="space-y-6 w-full">
|
|
||||||
<h1 className="text-3xl font-bold text-center">
|
<h1 className="text-3xl font-bold text-center">
|
||||||
{__("Select an organization")}
|
{__("Select an organization")}
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Skeleton } from "../Atoms/Skeleton/Skeleton";
|
|||||||
|
|
||||||
export function CenteredLayout({ children }: PropsWithChildren) {
|
export function CenteredLayout({ children }: PropsWithChildren) {
|
||||||
return (
|
return (
|
||||||
<div className="grid place-items-center h-screen text-txt-primary bg-level-0">
|
<div className="grid place-items-center min-h-screen text-txt-primary bg-level-0">
|
||||||
<div className="w-full max-w-2xl flex flex-col items-center">
|
<div className="w-full max-w-2xl flex flex-col items-center">
|
||||||
{children ?? <Outlet />}
|
{children ?? <Outlet />}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user