Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
team query ordering
Aashish-Upadhyay-10163c19eaca3f6
diff --git a/context/team-context.tsx b/context/team-context.tsxindex fce9d862..5030ed19 100644--- a/context/team-context.tsx+++ b/context/team-context.tsx@@ -21,8 +21,6 @@ const initialState = {const TeamContext = createContext<TeamContextType | null>(initialState);export const TeamProvider = ({ children }: TeamContextProps): JSX.Element => {- //TODO: check if there is team, if not, create a new default one with User's name-const { teams, loading } = useTeams();const currentTeamId = localStorage.getItem("currentTeamId");diff --git a/pages/api/teams/index.ts b/pages/api/teams/index.tsindex b53378c9..69a1b1ac 100644--- a/pages/api/teams/index.ts+++ b/pages/api/teams/index.ts@@ -32,6 +32,11 @@ export default async function handle(},},},+ orderBy: {+ team: {+ createdAt: "asc",+ },+ },});const teams = userTeams.map((userTeam) => userTeam.team);