Skip to content

Commit

Permalink
⬆️ Upgraded latest rules widget package (#704)
Browse files Browse the repository at this point in the history
* upgraded widget package

* added new env variable

* refactored widget component
  • Loading branch information
babakamyljanovssw authored Nov 25, 2024
1 parent 9e44ce3 commit dd08fd7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SITE_URL=#{SITE_URL}
GOOGLE_GTM_ID=#{GOOGLE_GTM_ID}
GOOGLE_ANALYTICS=#{GOOGLE_ANALYTICS}
YOUTUBE_API_KEY=#{YOUTUBE_API_KEY}
Expand All @@ -11,4 +12,4 @@ CRM_APP_SECRET=#{CRM_APP_SECRET}
CRM_SCOPE=#{CRM_SCOPE}
CRM_VIEW_CURRENT=#{CRM_VIEW_CURRENT}
CRM_VIEW_PAST=#{CRM_VIEW_PAST}
APPLICATIONINSIGHTS_CONNECTION_STRING=#{APPLICATIONINSIGHTS_CONNECTION_STRING}
APPLICATIONINSIGHTS_CONNECTION_STRING=#{APPLICATIONINSIGHTS_CONNECTION_STRING}
1 change: 1 addition & 0 deletions .github/workflows/template-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
tokenSuffix: '}'
files: .env.template
env:
SITE_URL: ${{ vars.SITE_URL }}
GOOGLE_GTM_ID: ${{ secrets.GOOGLE_GTM_ID }}
GOOGLE_ANALYTICS: ${{ secrets.GOOGLE_ANALYTICS }}
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"react-responsive-modal": "^6.4.2",
"react-youtube": "^10.1.0",
"ssw.megamenu": "^4.6.2",
"ssw.rules.widget": "^2.0.5",
"ssw.rules.widget": "^2.0.8",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"styled-components": "^6.1.13",
Expand Down
8 changes: 7 additions & 1 deletion src/templates/person.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ const Person = ({ pageContext }) => {
const [WidgetComponent, setWidgetComponent] = useState();

const initWidget = () => {
return <RulesWidget numberOfRules={5} author={githubUsername} />;
return (
<RulesWidget
location={process.env.SITE_URL}
numberOfRules={5}
author={githubUsername}
/>
);
};

useEffect(() => {
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21477,7 +21477,7 @@ __metadata:
react-responsive-modal: "npm:^6.4.2"
react-youtube: "npm:^10.1.0"
ssw.megamenu: "npm:^4.6.2"
ssw.rules.widget: "npm:^2.0.5"
ssw.rules.widget: "npm:^2.0.8"
stream-browserify: "npm:^3.0.0"
stream-http: "npm:^3.2.0"
styled-components: "npm:^6.1.13"
Expand Down Expand Up @@ -21506,9 +21506,9 @@ __metadata:
languageName: node
linkType: hard

"ssw.rules.widget@npm:^2.0.5":
version: 2.0.5
resolution: "ssw.rules.widget@npm:2.0.5"
"ssw.rules.widget@npm:^2.0.8":
version: 2.0.8
resolution: "ssw.rules.widget@npm:2.0.8"
dependencies:
"@tanstack/react-query": "npm:^5.14.1"
date-fns: "npm:^2.30.0"
Expand All @@ -21517,7 +21517,7 @@ __metadata:
react-icons: "npm:^4.12.0"
style-inject: "npm:^0.3.0"
vite-plugin-css-injected-by-js: "npm:^3.3.0"
checksum: 10c0/1a56e610d079f59feb58c33d8de27ff38ed9b1e69b41de3b13731b6a058b81227a472ea6e84e6da5c00a1053cfb6999c33017e177ea226316d6bedecda8cb68f
checksum: 10c0/4e6e7371b3072c254f02af8809d95e9ba6ddd6c58cbe84c9c3a2ec756dd968cc9689d488427d3ced65bf230c1a8abd624b57812eb0aa8110dfaf79419508cef6
languageName: node
linkType: hard

Expand Down

0 comments on commit dd08fd7

Please sign in to comment.