Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Add OS metadata to bug reports (#833)
Browse files Browse the repository at this point in the history
* add os metadata to bug reports

* fix ts error
  • Loading branch information
anastasiya1155 authored Aug 8, 2023
1 parent 1ea0b5d commit 54a9d14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/desktop/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
LANGUAGE_KEY,
savePlainToStorage,
} from '../../../client/src/services/storage';
import { LocaleType } from '../../../client/src/types/general';
import TextSearch from './TextSearch';

// let askedToUpdate = false;
Expand Down Expand Up @@ -98,8 +99,8 @@ function App() {
const [release, setRelease] = useState('');
const contentContainer = useRef<HTMLDivElement>(null);
const [envConfig, setEnvConfig] = useState({});
const [locale, setLocale] = useState(
getPlainFromStorage(LANGUAGE_KEY) || 'en',
const [locale, setLocale] = useState<LocaleType>(
(getPlainFromStorage(LANGUAGE_KEY) as LocaleType | null) || 'en',
);

useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions client/src/components/ReportBugModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ const ReportBugModal = ({
...values,
unique_id: envConfig.tracking_id || '',
app_version: release,
metadata: JSON.stringify(os),
});
}
setSubmitted(true);
Expand Down
1 change: 1 addition & 0 deletions client/src/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export const saveBugReport = (report: {
text: string;
unique_id: string;
app_version: string;
metadata: string;
}) => axios.post(`${DB_API}/bug_reports`, report).then((r) => r.data);

export const saveCrashReport = (report: {
Expand Down

0 comments on commit 54a9d14

Please sign in to comment.