Skip to content

Commit

Permalink
Update IdSetSource to use shifting instead of popping
Browse files Browse the repository at this point in the history
  • Loading branch information
cevatbarisyilmaz committed Nov 5, 2024
1 parent 46d4014 commit d80718f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,12 @@ import { Grid, newFilteredSearchSource } from 'react-streaming-availability';
export default function MyComponent() {
return (
<Grid
source={
newFilteredSearchSource({
country: "us",
orderBy: "popularity_1year",
orderDirection: "desc",
limit: 100,
})
}
source={newFilteredSearchSource({
country: "us",
orderBy: "popularity_1year",
orderDirection: "desc",
limit: 100,
})}
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion demo/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028",
"next": "15.0.2",
"react-streaming-availability": "^0.1.0"
"react-streaming-availability": "^0.1.3"
},
"devDependencies": {
"typescript": "^5",
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-streaming-availability",
"version": "0.1.0",
"version": "0.1.3",
"description": "A React component library to display streaming availability data for movies and TV shows including deep links",
"homepage": "https://github.com/movieofthenight/react-streaming-availability",
"bugs": {
Expand All @@ -12,6 +12,13 @@
},
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"/dist",
"/LICENSE",
"/package.json",
"/package-lock.json",
"/README.md"
],
"type": "module",
"repository": "github:movieofthenight/react-streaming-availability",
"scripts": {
Expand All @@ -25,9 +32,6 @@
"server-only": "^0.0.1",
"streaming-availability": "^4.4.0"
},
"peerDependencies": {
"react": ">=18"
},
"devDependencies": {
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class IdSetSourceFetcher implements SourceFetcher {
constructor(private props: IdSetSourceProps) {}

async fetch(): Promise<SourceItem | undefined> {
const id = this.props.ids.pop();
const id = this.props.ids.shift();
if (!id) {
return undefined;
}
Expand Down

0 comments on commit d80718f

Please sign in to comment.