infra: add linting and formatting for js projects (#230)
* wip * wip * wip * format * wip(mobile): lint and format * cleanup * nits * nits * idiomatic react * nit * format all root files
This commit was merged in pull request #230.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { Square } from "lucide-react";
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { Square } from 'lucide-react';
|
||||
|
||||
export function ScreenRecordControlApp() {
|
||||
const [elapsed, setElapsed] = useState(0);
|
||||
@@ -12,7 +12,7 @@ export function ScreenRecordControlApp() {
|
||||
|
||||
const minutes = Math.floor(elapsed / 60);
|
||||
const seconds = elapsed % 60;
|
||||
const display = `${minutes}:${seconds.toString().padStart(2, "0")}`;
|
||||
const display = `${minutes}:${seconds.toString().padStart(2, '0')}`;
|
||||
|
||||
const handleStop = useCallback(() => {
|
||||
window.electronScreenRecord.stop();
|
||||
|
||||
@@ -5,5 +5,7 @@ import '@/styles/globals.css';
|
||||
|
||||
initSentryRenderer();
|
||||
|
||||
const root = createRoot(document.getElementById('root')!);
|
||||
const container = document.getElementById('root');
|
||||
if (!container) throw new Error('Root element #root not found');
|
||||
const root = createRoot(container);
|
||||
root.render(<ScreenRecordControlApp />);
|
||||
|
||||
Reference in New Issue
Block a user