-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: typescript errors with esm and cjs (#38)
* chore: fix types * chore: fixes for build using esm and cjs * chore: linter
- Loading branch information
1 parent
dd4bcd1
commit f779593
Showing
101 changed files
with
3,072 additions
and
3,169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"correctness": { | ||
"noUnusedVariables": "warn", | ||
"useExhaustiveDependencies": "off" | ||
}, | ||
"complexity": { "noStaticOnlyClass": "off" } | ||
} | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "space" | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "single" | ||
} | ||
} | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"correctness": { | ||
"noUnusedVariables": "warn", | ||
"noUnusedImports": "warn", | ||
"useExhaustiveDependencies": "off" | ||
}, | ||
"complexity": { "noStaticOnlyClass": "off", "noForEach": "info" } | ||
} | ||
}, | ||
"formatter": { | ||
"enabled": true | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"jsxQuoteStyle": "single", | ||
"quoteStyle": "single" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,4 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"correctness": { | ||
"noUnusedVariables": "warn", | ||
"useExhaustiveDependencies": "off" | ||
}, | ||
"complexity": { "noStaticOnlyClass": "off", "noForEach": "off" } | ||
} | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "space" | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "single" | ||
} | ||
} | ||
"extends": ["../biome.json"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
function fallbackCopyTextToClipboard(text: string) { | ||
const textArea = document.createElement('textarea'); | ||
textArea.value = text; | ||
const textArea = document.createElement('textarea'); | ||
textArea.value = text; | ||
|
||
// Avoid scrolling to bottom | ||
textArea.style.top = '0'; | ||
textArea.style.left = '0'; | ||
textArea.style.position = 'fixed'; | ||
// Avoid scrolling to bottom | ||
textArea.style.top = '0'; | ||
textArea.style.left = '0'; | ||
textArea.style.position = 'fixed'; | ||
|
||
document.body.appendChild(textArea); | ||
textArea.focus(); | ||
textArea.select(); | ||
document.body.appendChild(textArea); | ||
textArea.focus(); | ||
textArea.select(); | ||
|
||
try { | ||
const successful = document.execCommand('copy'); | ||
const msg = successful ? 'successful' : 'unsuccessful'; | ||
console.log(`Fallback: Copying text command was ${msg}`); | ||
} catch (err) { | ||
console.error('Fallback: Oops, unable to copy', err); | ||
} | ||
try { | ||
const successful = document.execCommand('copy'); | ||
const msg = successful ? 'successful' : 'unsuccessful'; | ||
console.log(`Fallback: Copying text command was ${msg}`); | ||
} catch (err) { | ||
console.error('Fallback: Oops, unable to copy', err); | ||
} | ||
|
||
document.body.removeChild(textArea); | ||
document.body.removeChild(textArea); | ||
} | ||
export function copyTextToClipboard(text: string) { | ||
if (!navigator.clipboard) { | ||
fallbackCopyTextToClipboard(text); | ||
return; | ||
} | ||
navigator.clipboard.writeText(text).then( | ||
() => { | ||
console.log('Async: Copying to clipboard was successful!'); | ||
}, | ||
(err) => { | ||
console.error('Async: Could not copy text: ', err); | ||
}, | ||
); | ||
if (!navigator.clipboard) { | ||
fallbackCopyTextToClipboard(text); | ||
return; | ||
} | ||
navigator.clipboard.writeText(text).then( | ||
() => { | ||
console.log('Async: Copying to clipboard was successful!'); | ||
}, | ||
(err) => { | ||
console.error('Async: Could not copy text: ', err); | ||
}, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
export default function Navbar() { | ||
return ( | ||
<> | ||
<nav className="p-4 border-b-2 border-blue-500"> | ||
<div className="container mx-auto flex justify-between items-center"> | ||
<div className="text-slate-950 text-2xl font-bold"> | ||
<img | ||
className="w-20" | ||
src="/public/logotypeLinx.png" | ||
alt="Logotype Linx" | ||
/> | ||
</div> | ||
<ul className="flex space-x-4"> | ||
<li> | ||
<a href="#product" className="text-slate-950 hover:text-blue-700"> | ||
Product | ||
</a> | ||
</li> | ||
<li> | ||
<a href="#login" className="text-slate-950 hover:text-blue-700"> | ||
Login | ||
</a> | ||
</li> | ||
<li> | ||
<a href="#signup" className="text-slate-950 hover:text-blue-700"> | ||
Sign Up | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
</> | ||
); | ||
return ( | ||
<> | ||
<nav className='p-4 border-b-2 border-blue-500'> | ||
<div className='container mx-auto flex justify-between items-center'> | ||
<div className='text-slate-950 text-2xl font-bold'> | ||
<img | ||
className='w-20' | ||
src='/public/logotypeLinx.png' | ||
alt='Logotype Linx' | ||
/> | ||
</div> | ||
<ul className='flex space-x-4'> | ||
<li> | ||
<a href='#product' className='text-slate-950 hover:text-blue-700'> | ||
Product | ||
</a> | ||
</li> | ||
<li> | ||
<a href='#login' className='text-slate-950 hover:text-blue-700'> | ||
Login | ||
</a> | ||
</li> | ||
<li> | ||
<a href='#signup' className='text-slate-950 hover:text-blue-700'> | ||
Sign Up | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
</> | ||
); | ||
} |
Oops, something went wrong.