-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. 将当前创作者页面左侧的课程等数量显示在右侧相应的选项卡上,格式为「Open Course (15)」这种; 2. 将当前创作者页面右侧展示的内容通过另外的 URL 进行访问(暂定为 /u/:slug/creator) 3. 无论是普通用户还是创作者,访问 /u/:slug 时,显示的内容与普通用户看到的页面一致。
- Loading branch information
1 parent
49b659a
commit 4cea2a0
Showing
3 changed files
with
139 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Copyright 2024 OpenBuild | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
//20250212 modify begin | ||
import { get } from '@/utils/request'; | ||
|
||
import ProjectOwner from '../ProjectOwner'; | ||
|
||
export default async function CreatorProfile({ params }) { | ||
const config = { isServer: true }; | ||
const { data } = await get(`ts/v1/user/info/handle/${params.handle}`, config); | ||
//钱包信息不再需要了,因为后面这个data被覆盖了 | ||
// if (data?.social.user_wallet && data?.base.user_show_wallet) { | ||
// data.web3Bio = await get(`https://api.web3.bio/profile/${data?.social.user_wallet}`, { | ||
// ...config, | ||
// headers: { | ||
// 'X-API-KEY': process.env.NEXT_PUBLIC_WEB3BIO, | ||
// }, | ||
// }); | ||
// } | ||
if (!data?.base?.user_project_owner) { | ||
return <div>you do not have authority</div>; | ||
} | ||
const { data: activityData } = await get(`ts/v1/user/info/${data?.base.user_id}/creator/activity`, config); | ||
return <ProjectOwner data={data} activities={activityData?.list || []} />; | ||
} | ||
//20250212 modify end |
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