/**
 * Copyright (c) 2023-present Plane Software, Inc. and contributors
 * SPDX-License-Identifier: AGPL-3.0-only
 * See the LICENSE file for details.
 */

import { useEffect } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
import { LogoSpinner } from "@/components/common/logo-spinner";
import { useAppRouter } from "@/hooks/use-app-router";

function BillingSettingsPage() {
  const router = useAppRouter();
  const { workspaceSlug } = useParams();

  useEffect(() => {
    if (workspaceSlug) {
      router.replace(`/${workspaceSlug}/settings`);
    }
  }, [router, workspaceSlug]);

  return (
    <div className="grid h-full place-items-center">
      <LogoSpinner />
    </div>
  );
}

export default observer(BillingSettingsPage);
