Skip to content

Commit

Permalink
Merge pull request #21 from LHRUN/feature/1.1.0
Browse files Browse the repository at this point in the history
Feature/1.1.0
  • Loading branch information
LHRUN authored Jan 7, 2024
2 parents b325e03 + e296fa9 commit 34919d0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.1.0

### Feat

- dynamic loading clarity

# 1.0.0

### Feat
Expand Down
7 changes: 0 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,5 @@
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<!-- <script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "k06rclje17");
</script> -->
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "paint-board",
"private": true,
"version": "1.0.0",
"version": "1.1.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
13 changes: 13 additions & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ import App from './App'
import './index.css'
import './i18n'

if (import.meta.env.PROD) {
const script = document.createElement('script')
script.textContent = `
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "k06rclje17");
`
script.async = true
document.body.appendChild(script)
}

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<App />
Expand Down
2 changes: 1 addition & 1 deletion src/store/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ interface FileAction {
}

const initId = uuidv4()
export const BOARD_VERSION = '1.0.0'
export const BOARD_VERSION = '1.1.0'

const useFileStore = create<FileState & FileAction>()(
persist(
Expand Down

0 comments on commit 34919d0

Please # to comment.