From c37bcb663632255eab292adf8b5f416f1286214d Mon Sep 17 00:00:00 2001 From: Chengxun Lee <24319042+bclswl0827@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:32:33 +0800 Subject: [PATCH] Code style improvements again --- .github/ISSUE_TEMPLATE/bug_report.md | 17 +++++++++++------ .github/ISSUE_TEMPLATE/feature_request.md | 12 ++++++++---- frontend/src/src/App.tsx | 4 ++-- frontend/src/src/components/Code.tsx | 2 +- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f026f3ce..65c9cd3b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -3,20 +3,25 @@ name: Bug report about: Create a report to help us improve --- -**Description** +### Description + -**Expected behaviour** +### Expected behaviour + -**What is happening instead?** +### What is happening instead? + -**Additional context** +### Additional context + -**How to reproduce?** +### How to reproduce? -**Files** +### Files + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 4bdb0367..d227a475 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -3,14 +3,18 @@ name: Feature request about: Suggest an idea for this project --- -**Is your feature request related to a problem? Please describe.** +### Is your feature request related to a problem? Please describe. + -**Describe the solution you'd like** +### Describe the solution you'd like + -**Describe alternatives you've considered** +### Describe alternatives you've considered + -**Additional context** +### Additional context + diff --git a/frontend/src/src/App.tsx b/frontend/src/src/App.tsx index 1d728f03..5c31508e 100644 --- a/frontend/src/src/App.tsx +++ b/frontend/src/src/App.tsx @@ -50,7 +50,7 @@ const App = () => { const [currentLocale, setCurrentLocale] = useState(fallback); const setCurrentLocaleToState = async () => { - void setCurrentLocale(await getCurrentLocale(i18n)); + setCurrentLocale(await getCurrentLocale(i18n)); }; const getCurrentTitle = useCallback(() => { @@ -98,7 +98,7 @@ const App = () => { }, [getStationAttributes]); const handleSwitchLocale = (locale: string) => { - setUserLocale(i18n, locale); + void setUserLocale(i18n, locale); }; const locales = Object.entries(resources).reduce((acc, [key, value]) => { diff --git a/frontend/src/src/components/Code.tsx b/frontend/src/src/components/Code.tsx index 0197bb75..cf890894 100644 --- a/frontend/src/src/components/Code.tsx +++ b/frontend/src/src/components/Code.tsx @@ -39,7 +39,7 @@ export const Code = (props: CodeProps) => {
{ - handleCopy(children); + void handleCopy(children); }} >