Skip to content

Commit d8cdee6

Browse files
fix: update projectInformation field to be optional in organizationInformation type and adjust related component rendering
1 parent f4e9fe7 commit d8cdee6

3 files changed

Lines changed: 22 additions & 17 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ Information about the organization and project.
425425
| `name` | string | Yes | Organization name |
426426
| `description` | string | Yes | Organization description |
427427
| `logo` | `Image` / string | No | Organization logo |
428-
| `projectInformation` | `projectInformation` | Yes | Project details |
428+
| `projectInformation` | `projectInformation` | No | Project details |
429429

430430
</details>
431431

src/components/SupportUsButton.tsx

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -193,40 +193,45 @@ function SupportUsButton({
193193
</div>
194194

195195
{/* Line */}
196-
<div
197-
className={`
196+
{organizationInformation.projectInformation && (
197+
<div
198+
className={`
198199
border
199200
${Theme === "AOSSIE" && "border-[#f1c514]/50"}
200201
${Theme === "light" && "border-gray-300/50"}
201202
${Theme === "dark" && "border-gray-700/50"}
202203
${Theme === "minimal" && "border-gray-800/50"}
203204
${Theme === "corporate" && "border-blue-600/50"}`}
204-
></div>
205+
></div>
206+
)}
205207

206208
{/* Project information */}
207-
<div className="flex flex-col gap-2">
208-
<h3
209-
className={`font-bold w-fit uppercase text-sm p-2 rounded-lg
209+
{organizationInformation.projectInformation && (
210+
<div className="flex flex-col gap-2">
211+
<h3
212+
className={`font-bold w-fit uppercase text-sm p-2 rounded-lg
210213
${Theme === "AOSSIE" && "bg-[#edc214]"}
211214
${Theme === "light" && "bg-gray-300/50"}
212215
${Theme === "dark" && "bg-gray-700/50"}
213216
${Theme === "minimal" && "bg-gray-800/50"}
214217
${Theme === "corporate" && "bg-blue-600/50"}`}
215-
>
216-
ABOUT PROJECT: {organizationInformation.projectInformation.name}
217-
</h3>
218-
<p
219-
className={`italic font-semibold
218+
>
219+
ABOUT PROJECT:{" "}
220+
{organizationInformation.projectInformation.name}
221+
</h3>
222+
<p
223+
className={`italic font-semibold
220224
${Theme === "AOSSIE" && "text-[#614f08]"}
221225
${Theme === "light" && "text-gray-600"}
222226
${Theme === "dark" && "text-gray-400"}
223227
${Theme === "minimal" && "text-gray-800"}
224228
${Theme === "corporate" && "text-blue-600/80"}
225229
`}
226-
>
227-
"{organizationInformation.projectInformation.description}"
228-
</p>
229-
</div>
230+
>
231+
"{organizationInformation.projectInformation.description}"
232+
</p>
233+
</div>
234+
)}
230235
</div>
231236
</div>
232237
</div>

src/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export type organizationInformation = {
5656
/** Organization logo */
5757
logo?: Image | string;
5858

59-
projectInformation: projectInformation;
59+
projectInformation?: projectInformation;
6060
};
6161

6262
/* =========================

0 commit comments

Comments
 (0)