Skip to content

Commit

Permalink
Merge pull request #417 from commons-stack/fix/revert_remove_name_set…
Browse files Browse the repository at this point in the history
…ting

Revert removal of NAME setting
  • Loading branch information
kristoferlund authored May 26, 2022
2 parents 9430413 + 91efbae commit ec5c7ac
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { SettingGroup } from '@settings/types';
import { SettingsModel } from '@settings/entities';

const deleteSettings = [
{
key: 'NAME',
label: 'App Name',
description: null,
group: SettingGroup.APPLICATION,
value: 'Praise',
type: 'String',
},
];

const up = async (): Promise<void> => {
await SettingsModel.insertMany(deleteSettings);
};

const down = async (): Promise<void> => {
const deleteSettingKeys = deleteSettings.map((s) => s.key);

await SettingsModel.deleteMany({ key: { $in: deleteSettingKeys } });
};

export { up, down };
9 changes: 6 additions & 3 deletions packages/frontend/src/layouts/AuthenticatedLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@ const AuthenticatedLayout = (): JSX.Element | null => {
aria-hidden="true"
/>
</button>
<div className="w-full flex justify-center">
<h1 className="font-lg">{siteNameSetting?.value}</h1>
</div>

{siteNameSetting && (
<div className="flex-grow flex justify-center">
<h1 className="font-lg">{siteNameSetting.value}</h1>
</div>
)}
</div>
<main className="flex-1 flex justify-center px-4 py-4">
<div className="block max-w-5xl w-full">
Expand Down

0 comments on commit ec5c7ac

Please sign in to comment.