import { useGuild } from "../../App/useGuild";
import { Guild } from "./Guild";
import { User } from "./User";

export const TopBar = ({ toggleCollapsed, isCreating }) => {
    const guild = useGuild();

    if (guild) {
        return <Guild toggleCollapsed={toggleCollapsed} isCreating={isCreating} />;
    } else {
        return <User toggleCollapsed={toggleCollapsed} />;
    }
};
