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

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

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