-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: align to new backend responses
- Loading branch information
1 parent
e0444fa
commit e68b835
Showing
4 changed files
with
16 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
import type { DynamicRoute } from "@/lib/types"; | ||
import { getGuild } from "./fetchers"; | ||
import GuildPage from "./[roleGroupId]/page"; | ||
|
||
const DefaultGuildPage = async ({ | ||
params, | ||
}: DynamicRoute<{ guildId: string }>) => { | ||
const { guildId: urlName } = await params; | ||
const guild = await getGuild(urlName); | ||
// const paginatedRoleGroup = (await ( | ||
// await fetch( | ||
// `${env.NEXT_PUBLIC_API}/role-group/search?customQuery=@guildId:{${guild.id}}`, | ||
// ) | ||
// ).json()) as PaginatedResponse<RoleGroup>; | ||
// const roleGroups = paginatedRoleGroup.items; | ||
// const roleGroup = roleGroups.at(0); | ||
// if (roleGroup) { | ||
// redirect(`/${guildIdParam}/${roleGroup.urlName}`); | ||
// } | ||
return `Default guild page - ${guild.name}`; | ||
//const guild = await getGuild(urlName); | ||
//return `Default guild page - ${guild.name}`; | ||
return <GuildPage params={{ guildId: urlName, roleGroupId: "" }} />; | ||
}; | ||
|
||
export default DefaultGuildPage; |