Skip to content

Commit 3b63920

Browse files
authored
[Fix] context props (#6)
* restrict access token to be passed * 1.4.0
1 parent c02481e commit 3b63920

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "spotify-connect",
33
"description": "Get useful analytics from the spotify API in your React app",
4-
"version": "1.3.0",
4+
"version": "1.4.0",
55
"main": "./dist/index.js",
66
"module": "./dist/index.mjs",
77
"types": "./dist/index.d.ts",

src/context/SpotifyConnect.context.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ export const SpotifyConnectContextProvider = ({
1616
refreshToken,
1717
}: {
1818
children: React.ReactNode;
19-
} & TSpotifyConnectContext) => {
19+
} & Pick<
20+
TSpotifyConnectContext,
21+
"clientId" | "clientSecret" | "refreshToken"
22+
>) => {
2023
const [accessToken, setAccessToken] =
2124
useState<TSpotifyConnectContext["accessToken"]>("");
2225

0 commit comments

Comments
 (0)