Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const CommunityDetail: React.FC<CommunityDetailProps> = (props) => {
</Descriptions.Item>
);
}
return <></>;
return null;
};

const domainDetails = () => {
Expand All @@ -27,7 +27,7 @@ export const CommunityDetail: React.FC<CommunityDetailProps> = (props) => {
</Descriptions.Item>
);
}
return <></>;
return null;
};

const handleDetails = () => {
Expand All @@ -38,7 +38,7 @@ export const CommunityDetail: React.FC<CommunityDetailProps> = (props) => {
</Descriptions.Item>
);
}
return <></>;
return null;
};

const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,21 @@ import styles from './header.module.css';
export const Header: React.FC = () => {
const handleLogin = () => {
// biome-ignore lint:useLiteralKeys
window.location.href = `${import.meta.env['VITE_AAD_B2C_REDIRECT_URI']}`;
globalThis.location.href = `${import.meta.env['VITE_AAD_B2C_REDIRECT_URI']}`;
};

const {
token: { colorBgContainer },
} = theme.useToken();

return (
<>
<div
className={`${styles['top-bar']} flex gap-2`}
style={{ backgroundColor: colorBgContainer }}
>
<Button type="primary" onClick={handleLogin}>
Log In v6
</Button>
</div>
</>
<div
className={`${styles['top-bar']} flex gap-2`}
style={{ backgroundColor: colorBgContainer }}
>
<Button type="primary" onClick={handleLogin}>
Log In v6
</Button>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@ export const CommunitiesDropdown: React.FC<CommunitiesDropdownProps> = (
if (!communityId) return;

// Initialize community in itemsMap if it doesn't exist
if (!itemsMap[communityId]) {
itemsMap[communityId] = {
key: communityId,
label: member?.community?.name,
children: [],
};
}
itemsMap[communityId] ??= {
key: communityId,
label: member?.community?.name,
children: [],
};

// Add member to the community's children
const memberPath = `/community/${communityId}/member/${member?.id}`;
Expand Down Expand Up @@ -77,9 +75,9 @@ export const CommunitiesDropdown: React.FC<CommunitiesDropdownProps> = (
children: { key: string; label: string; onClick: () => void }[];
};
} = {};
props.data.members?.forEach((member: Member) =>
populateItems(member, itemsMap),
);
props.data.members?.forEach((member: Member) => {
populateItems(member, itemsMap);
});

const items: MenuProps['items'] = Object.values(itemsMap);

Expand Down
36 changes: 24 additions & 12 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
"$schema": "https://biomejs.dev/schemas/2.4.2/schema.json",
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
"files": { "ignoreUnknown": false },
"css": { "parser": { "cssModules": true } },
"files": {
"ignoreUnknown": false,
"includes": ["**", "!!build", "!**/generated.tsx"]
},
"css": { "parser": { "cssModules": true } },
"formatter": {
"enabled": true,
"indentStyle": "tab",
"indentWidth": 2
"indentWidth": 2,
"lineWidth": 230
},
"linter": {
"enabled": true,
Expand Down Expand Up @@ -91,18 +95,17 @@
}
},
"includes": [
"apps/**",
"packages/**",
"build-pipeline/scripts/**",
"**/src/**",
"!*.config.*",
"!**/*.config.*",
"!**/node_modules/**",
"!**/dist/**",
"!**/*.d.ts",
"!**/package.json",
"!**/coverage/**",
"!**/generated.ts",
"!**/generated.tsx"
"!**/coverage/**",
"!**/generated.ts",
"!**/generated.tsx",
"!**/App.css"
]
},
"javascript": { "formatter": { "quoteStyle": "single" }, "globals": [] },
Expand Down Expand Up @@ -140,7 +143,10 @@
}
},
{ "includes": ["**/src/**/*.ts"], "javascript": { "globals": [] } },
{ "includes": ["build-pipeline/scripts/**/*.{c|m}js"], "linter": { "rules": { "style": { "noCommonJs": "off" } } } },
{
"includes": ["build-pipeline/scripts/**/*.{c|m}js"],
"linter": { "rules": { "style": { "noCommonJs": "off" } } }
},
{
"includes": ["packages/cellix/domain-seedwork/**/*.ts"],
"linter": {
Expand All @@ -159,10 +165,16 @@
"performance": { "noBarrelFile": "error", "noReExportAll": "error" }
}
}
},
{
"includes": ["tailwind.config.js", "craco.config.js"],
"linter": {
"enabled": false
}
}
],
"assist": {
"enabled": true,
"actions": { "source": { "organizeImports": "on" } }
}
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@amiceli/vitest-cucumber": "^5.1.2",
"@biomejs/biome": "2.0.0",
"@biomejs/biome": "^2.4.2",
"@graphql-codegen/cli": "^5.0.7",
"@graphql-codegen/introspection": "^4.0.3",
"@graphql-codegen/typed-document-node": "^5.1.2",
Expand Down Expand Up @@ -85,7 +85,8 @@
},
"overrides": {
"vite": "catalog:",
"jiti": "2.6.1"
"jiti": "2.6.1",
"minimatch": "10.2.1"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export class MongoosePropArray<
}
removeAll(): void {
const ids = this.docArray.map((doc) => doc._id);
ids.forEach((id) => this.docArray.pull({ _id: id }));
ids.forEach((id) => {
this.docArray.pull({ _id: id });
});
}
/**
* Creates a new Mongoose document with a generated ObjectId, adds it to the document array,
Expand All @@ -61,11 +63,6 @@ export class MongoosePropArray<
* - The document array is mutated by this operation.
*/
getNewItem(): propType {
/*
if (!this.docArray) {
this.docArray = new Types.DocumentArray<docType>([]);
}
*/
const item = this.docArray.create({ _id: new Types.ObjectId() });
this.docArray.push(item);
return new this.adapter(item);
Expand Down
Loading
Loading