Skip to content

Commit eedf55f

Browse files
committed
[fix] 2 Lark type bugs
[optimize] update Upstream packages
1 parent 6d3896c commit eedf55f

File tree

5 files changed

+132
-133
lines changed

5 files changed

+132
-133
lines changed

models/Activity.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
BiDataQueryOptions,
33
BiDataTable,
44
BiSearch,
5+
BiTableSchema,
56
LarkPageData,
67
makeSimpleFilter,
78
normalizeText,
@@ -34,7 +35,9 @@ export type Activity = LarkBase &
3435
| 'liveLink'
3536
| `database${'' | 'Schema'}`,
3637
TableCellValue
37-
>;
38+
> & {
39+
databaseSchema: BiTableSchema;
40+
};
3841

3942
export class ActivityModel extends BiDataTable<Activity>() {
4043
client = larkClient;

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
},
1616
"dependencies": {
1717
"@giscus/react": "^3.1.0",
18-
"@koa/router": "^15.1.1",
18+
"@koa/router": "^15.2.0",
1919
"@mdx-js/loader": "^3.1.1",
2020
"@mdx-js/react": "^3.1.1",
2121
"@next/mdx": "^16.1.1",
2222
"core-js": "^3.47.0",
2323
"echarts-jsx": "^0.6.0",
24-
"file-type": "^21.2.0",
24+
"file-type": "^21.3.0",
2525
"idea-react": "^2.0.0-rc.13",
2626
"jsonwebtoken": "^9.0.3",
2727
"koa": "^3.1.1",
@@ -33,7 +33,7 @@
3333
"mobx": "^6.15.0",
3434
"mobx-github": "^0.6.2",
3535
"mobx-i18n": "^0.7.2",
36-
"mobx-lark": "^2.6.3",
36+
"mobx-lark": "^2.6.4",
3737
"mobx-react": "^9.2.1",
3838
"mobx-react-helper": "^0.5.1",
3939
"mobx-restful": "^2.1.4",
@@ -82,7 +82,7 @@
8282
"lint-staged": "^16.2.7",
8383
"next-with-less": "^3.0.1",
8484
"prettier": "^3.7.4",
85-
"prettier-plugin-css-order": "^2.1.2",
85+
"prettier-plugin-css-order": "^2.2.0",
8686
"sass": "^1.97.1",
8787
"typescript": "~5.9.3",
8888
"typescript-eslint": "^8.51.0"

pages/hackathon/[id].tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export const getServerSideProps = compose<{ id: string }>(
3535
async ({ params }) => {
3636
const activity = await new ActivityModel().getOne(params!.id);
3737

38-
// @ts-expect-error Upstream compatibility
3938
const { appId, tableIdMap } = activity.databaseSchema as BiTableSchema;
4039

4140
const [people, organizations, agenda, prizes, templates, projects] = await Promise.all([

pages/hackathon/[id]/team/[tid].tsx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,20 @@ export const getServerSideProps = compose<Record<'id' | 'tid', string>>(
3737
async ({ params }) => {
3838
const activity = await new ActivityModel().getOne(params!.id);
3939

40-
// @ts-expect-error Upstream compatibility
4140
const { appId, tableIdMap } = activity.databaseSchema;
4241

4342
const project = await new ProjectModel(appId, tableIdMap.Project).getOne(params!.tid);
4443

4544
// Get approved members for this project
46-
const members = await new MemberModel(appId, tableIdMap.Member).getAll({
47-
project: project.name as string,
48-
status: 'approved',
49-
});
50-
51-
// Get products for this project
52-
const products = await new ProductModel(appId, tableIdMap.Product).getAll({
53-
project: project.name as string,
54-
});
55-
45+
const [members, products] = await Promise.all([
46+
new MemberModel(appId, tableIdMap.Member).getAll({
47+
project: project.name as string,
48+
status: 'approved',
49+
}),
50+
new ProductModel(appId, tableIdMap.Product).getAll({
51+
project: project.name as string,
52+
}),
53+
]);
5654
return { props: { activity, project, members, products } };
5755
},
5856
);
@@ -128,8 +126,7 @@ const ProjectPage: FC<ProjectPageProps> = observer(({ activity, project, members
128126
<Col as="li" key={id as string}>
129127
<Card className={styles.darkCard} body>
130128
<div className="d-flex gap-3 align-items-center">
131-
{/* @ts-expect-error Upstream compatibility */}
132-
<Avatar src={(person as TableCellUser).avatar_url} size={60} />
129+
<Avatar src={(person as TableCellUser).avatar_url} />
133130
<div className="flex-grow-1">
134131
<h3 className="fs-6 m-0 fw-bold text-white">
135132
{(person as TableCellUser).name}

0 commit comments

Comments
 (0)