generated from webbertakken/simple-react-app
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: self-contained and improved ssi dive log tool (#168)
- Loading branch information
1 parent
94dabb6
commit 8bf8540
Showing
12 changed files
with
181 additions
and
96 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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react' | ||
import { QRCodeSVG } from 'qrcode.react' | ||
|
||
interface QrCodeProps extends React.SVGProps<SVGSVGElement> { | ||
value: string | ||
sizePx?: number | ||
includeMargin?: boolean | ||
} | ||
|
||
const QrCode: React.FC<QrCodeProps> = ({ value, sizePx = 400, includeMargin = true }) => { | ||
return <QRCodeSVG value={value} size={sizePx} includeMargin={includeMargin} /> | ||
} | ||
|
||
export default QrCode |
Binary file added
BIN
+55 KB
.../tools/GarminToSsiDiveLogHelper/assets/exporting-dive-activity-from-garmin-dashboard.webp
Binary file not shown.
Binary file added
BIN
+102 KB
...components/tools/GarminToSsiDiveLogHelper/assets/ssi-app-showing-the-qr-code-scanner.webp
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import toast from 'react-hot-toast' | ||
|
||
/** | ||
* Requires <Toaster /> to be included in the root of the app. | ||
*/ | ||
export function useNotification() { | ||
return { | ||
success: toast.success, | ||
error: toast.error, | ||
loading: toast.loading, | ||
promise: toast.promise, | ||
} | ||
} |
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
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,11 +1,17 @@ | ||
import React, { memo, StrictMode } from 'react' | ||
import React, { StrictMode } from 'react' | ||
import { Toaster } from 'react-hot-toast' | ||
|
||
interface RootProps { | ||
children: React.ReactNode | ||
} | ||
|
||
const Root: React.FC<RootProps> = memo(({ children }) => { | ||
return <StrictMode>{children}</StrictMode> | ||
}) | ||
const Root: React.FC<RootProps> = ({ children }) => { | ||
return ( | ||
<StrictMode> | ||
<Toaster /> | ||
{children} | ||
</StrictMode> | ||
) | ||
} | ||
|
||
export default Root |
Oops, something went wrong.