Skip to content

Commit

Permalink
fix type errors from frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
kahlstrm committed May 19, 2024
1 parent 12d1730 commit 315edbd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/ilmomasiina-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@tietokilta/ilmomasiina-frontend",
"version": "2.0.0-alpha13",
"scripts": {
"build": "vite build",
"build": "pnpm typecheck && vite build",
"clean": "rimraf build dist",
"start": "vite",
"typecheck": "tsc --build"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ACTIONS = [
[AuditEvent.DELETE_USER, 'auditLog.filter.action.deleteUser'],
[AuditEvent.RESET_PASSWORD, 'auditLog.filter.action.resetPassword'],
[AuditEvent.CHANGE_PASSWORD, 'auditLog.filter.action.changeOwnPassword'],
];
] as const;

const AuditLogActionFilter = () => {
const dispatch = useTypedDispatch();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Props = {
item: AuditLogItemSchema;
};

const ACTION_STRINGS: Record<AuditEvent, string> = {
const ACTION_STRINGS = {
[AuditEvent.CREATE_EVENT]: 'auditLog.description.createEvent',
[AuditEvent.EDIT_EVENT]: 'auditLog.description.editEvent',
[AuditEvent.PUBLISH_EVENT]: 'auditLog.description.publishEvent',
Expand All @@ -25,7 +25,7 @@ const ACTION_STRINGS: Record<AuditEvent, string> = {
[AuditEvent.DELETE_USER]: 'auditLog.description.deleteUser',
[AuditEvent.RESET_PASSWORD]: 'auditLog.description.resetPassword',
[AuditEvent.CHANGE_PASSWORD]: 'auditLog.description.changeOwnPassword',
};
} as const;

function useItemDescription(item: AuditLogItemSchema) {
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ export enum EditorTab {
SIGNUPS = 'signups',
}

const tabTitles: Record<EditorTab, string> = {
const tabTitles = {
[EditorTab.BASIC_DETAILS]: 'editor.tabs.basic',
[EditorTab.QUOTAS]: 'editor.tabs.quotas',
[EditorTab.QUESTIONS]: 'editor.tabs.questions',
[EditorTab.EMAILS]: 'editor.tabs.emails',
[EditorTab.SIGNUPS]: 'editor.tabs.signups',
};
} as const;

type TabProps = Props & {
id: EditorTab;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const QuestionRow = ({ name, index, remove }: QuestionProps) => {
required
options={[
[QuestionType.TEXT, t('editor.questions.questionType.text')],
[QuestionType.TEXT_AREA, t('editor.questions.questionType.textArea')],
[QuestionType.TEXT_AREA, t('editor.questions.questionType.textarea')],
[QuestionType.NUMBER, t('editor.questions.questionType.number')],
[QuestionType.SELECT, t('editor.questions.questionType.select')],
[QuestionType.CHECKBOX, t('editor.questions.questionType.checkbox')],
Expand Down

0 comments on commit 315edbd

Please sign in to comment.